We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 504b359 commit 28f7c63Copy full SHA for 28f7c63
1 file changed
apps/flipcash/shared/tokens/src/main/kotlin/BuySellSwapTokenViewModel.kt
@@ -430,10 +430,13 @@ class BuySellSwapTokenViewModel @Inject constructor(
430
is TokenSwapPurpose.FundWithWallet -> {
431
val rate = exchange.entryRate
432
// funding through external wallet
433
+ val nativeAmount = Fiat(data.amountData.amount, rate.currency)
434
+ val underlyingAmount = nativeAmount.convertingToUsdIfNeeded(rate)
435
val amountFiat = LocalFiat(
- usdf = Fiat(data.amountData.amount, rate.currency),
- rate = rate
436
+ usdf = underlyingAmount,
437
+ nativeAmount = nativeAmount,
438
)
439
+
440
dispatchEvent(Event.OnAmountAccepted(amountFiat))
441
dispatchEvent(
442
Event.CreateAndSendTransactionToWallet(
0 commit comments