Skip to content

Commit 6cd23de

Browse files
committed
chore(tokens): update buy (with external wallet) to use maxPerDay limit instead of nextTransaction
Signed-off-by: Brandon McAnsh <git@bmcreations.dev>
1 parent ea755ee commit 6cd23de

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,9 @@ class BuySellSwapTokenViewModel @Inject constructor(
152152
amountEntryState.limits?.sendLimitFor(
153153
it
154154
)
155-
}
156-
?: SendLimit.Zero
155+
} ?: SendLimit.Zero
157156

158-
sendLimit.nextTransaction.toFiat(enteredAmount.currencyCode)
157+
sendLimit.maxPerDay.toFiat(enteredAmount.currencyCode)
159158
}
160159

161160
is TokenSwapPurpose.Sell -> tokenBalance
@@ -450,7 +449,7 @@ class BuySellSwapTokenViewModel @Inject constructor(
450449
}
451450
.onEach { (limits, currency) ->
452451
val sendLimit = limits?.sendLimitFor(currency) ?: SendLimit.Zero
453-
val nextTransactionLimit = sendLimit.nextTransaction
452+
val nextTransactionLimit = sendLimit.maxPerDay
454453
dispatchEvent(Event.OnMaxDetermined(nextTransactionLimit, currency))
455454
}.launchIn(viewModelScope)
456455

0 commit comments

Comments
 (0)