File tree Expand file tree Collapse file tree
apps/flipcash/shared/tokens/src/main/kotlin/com/flipcash/app/tokens/ui Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -160,16 +160,15 @@ class SelectTokenViewModel @Inject constructor(
160160 })
161161 .filter {
162162 val baselineAmount = 0.01 .toFiat(rate.currency)
163+ val hasBalance = it.balance.nativeAmount.valueNonZero() &&
164+ it.balance.nativeAmount.valueGreaterThanOrEqualTo(baselineAmount)
163165 when (purpose) {
164166 // show all tokens we have accounts for as deposit targets
165167 TokenPurpose .Deposit -> true
166168 // when reserves are enabled, we must prevent sending USDF directly (it's used for reserves)
167- TokenPurpose .Select -> ! state.reservesEnabled || it.token.address != Mint .usdf
169+ TokenPurpose .Select -> ( ! state.reservesEnabled || it.token.address != Mint .usdf) && hasBalance
168170 // show all tokens with non-zero balance
169- else -> {
170- it.balance.nativeAmount.valueNonZero() &&
171- it.balance.nativeAmount.valueGreaterThanOrEqualTo(baselineAmount)
172- }
171+ else -> hasBalance
173172 }
174173 }
175174 }
You can’t perform that action at this time.
0 commit comments