File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
apps/flipcash/features/onramp/src/main/kotlin/com/flipcash/app/onramp/internal Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ import com.getcode.opencode.model.financial.Currency
20
20
import com.getcode.opencode.model.financial.CurrencyCode
21
21
import com.getcode.opencode.model.financial.Fiat
22
22
import com.getcode.opencode.model.financial.Limits
23
+ import com.getcode.opencode.model.financial.LocalFiat
23
24
import com.getcode.opencode.model.financial.SendLimit
24
25
import com.getcode.ui.components.text.AmountAnimatedInputUiModel
25
26
import com.getcode.ui.components.text.NumberInputHelper
@@ -251,7 +252,13 @@ internal class OnRampViewModel @Inject constructor(
251
252
252
253
val localizedAmount = Fiat (data.amountData.amount, rate.currency)
253
254
254
- dispatchEvent(Event .OnAmountAccepted (localizedAmount))
255
+ val amountFiat = LocalFiat (
256
+ usdc = localizedAmount.convertingTo(exchange.rateToUsd(rate.currency)!! ),
257
+ converted = localizedAmount,
258
+ rate = rate,
259
+ )
260
+
261
+ dispatchEvent(Event .OnAmountAccepted (amountFiat.usdc))
255
262
}.launchIn(viewModelScope)
256
263
257
264
userManager.state
You can’t perform that action at this time.
0 commit comments