Skip to content

Commit 43cdde2

Browse files
committed
chore(withdraw): allow changing currencies for withdraw
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent bea00e6 commit 43cdde2

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

apps/flipcash/core/src/main/kotlin/com/flipcash/app/core/ui/TokenBalanceRow.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ fun TokenBalanceRow(
152152
)
153153
}
154154

155+
showLogo && !showName -> {
156+
TokenIcon(
157+
token = token,
158+
modifier = Modifier.size(sizing.iconSize)
159+
)
160+
}
161+
155162
showName -> {
156163
Text(
157164
text = displayName,

apps/flipcash/features/withdrawal/src/main/kotlin/com/flipcash/app/withdrawal/WithdrawalViewModel.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,12 @@ internal class WithdrawalViewModel @Inject constructor(
182182
combine(
183183
tokenCoordinator.tokens,
184184
tokenCoordinator.balanceForToken(tokenAddress),
185-
) { tokens, balance ->
185+
exchange.observeEntryRate(),
186+
) { tokens, balance, rate ->
186187
val token = tokens.find { it.address == tokenAddress } ?: return@combine null
187188
TokenWithBalance(
188189
token = token,
189-
balance = balance
190+
balance = balance.convertingTo(rate)
190191
)
191192
}
192193
}.filterNotNull()

0 commit comments

Comments
 (0)