@@ -50,6 +50,7 @@ type InternalFiatPluginEnterAmountParams = FiatPluginEnterAmountParams & {
50
50
const providerFactories = [ banxaProvider , bityProvider , kadoProvider , moonpayProvider , mtpelerinProvider , paybisProvider , simplexProvider ]
51
51
52
52
const DEFAULT_FIAT_AMOUNT = '500'
53
+ const DEFAULT_FIAT_AMOUNT_LIGHT_ACCOUNT = '50'
53
54
54
55
/**
55
56
* Amount that we will attempt to get a quote for if the user presses the MAX button
@@ -234,21 +235,23 @@ export const amountQuoteFiatPlugin: FiatPluginFactory = async (params: FiatPlugi
234
235
235
236
logEvent ( isBuy ? 'Buy_Quote' : 'Sell_Quote' )
236
237
237
- // Pick a default fiat amount that is roughly equal to DEFAULT_FIAT_AMOUNT
238
+ // Pick a default fiat amount in the foreign fiat amount that is roughly
239
+ // equal to the default USD fiat amount
238
240
let initialValue1 : string | undefined
241
+ const startingFiatAmount = isLightAccount ? DEFAULT_FIAT_AMOUNT_LIGHT_ACCOUNT : defaultFiatAmount ?? DEFAULT_FIAT_AMOUNT
239
242
if ( displayFiatCurrencyCode !== 'USD' && defaultFiatAmount == null ) {
240
243
const isoFiatCurrencyCode = `iso:${ displayFiatCurrencyCode } `
241
244
const isoNow = new Date ( ) . toISOString ( )
242
245
const ratePair = `${ isoFiatCurrencyCode } _iso:USD`
243
246
const rate = await getHistoricalRate ( ratePair , isoNow )
244
- initialValue1 = div ( DEFAULT_FIAT_AMOUNT , String ( rate ) , DECIMAL_PRECISION )
247
+ initialValue1 = div ( startingFiatAmount , String ( rate ) , DECIMAL_PRECISION )
245
248
// Round out a decimals
246
249
initialValue1 = round ( initialValue1 , 0 )
247
250
248
251
// Only leave the first decimal
249
252
initialValue1 = round ( initialValue1 , initialValue1 . length - 1 )
250
253
} else {
251
- initialValue1 = requireCrypto ? undefined : defaultFiatAmount ?? DEFAULT_FIAT_AMOUNT
254
+ initialValue1 = requireCrypto ? undefined : startingFiatAmount
252
255
}
253
256
254
257
// Navigate to scene to have user enter amount
0 commit comments