Skip to content

Commit a04ac22

Browse files
authored
fix(shared/tokens): update hasGiveableBalance to use hasDisplayableBalance to assert against smallest unit (#898)
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent ae07291 commit a04ac22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/flipcash/shared/tokens/src/main/kotlin/com/flipcash/app/tokens/TokenCoordinator.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ class TokenCoordinator @Inject constructor(
186186
fun hasGiveableBalance(): Boolean =
187187
_state.value.balances
188188
.values
189-
.any { it.isPositive }
189+
.any { it.hasDisplayableValue }
190190

191191
fun balanceForToken(token: Token): Fiat = _state.value.balances[token.address] ?: Fiat.Zero
192192

0 commit comments

Comments
 (0)