Skip to content

Commit a153892

Browse files
committed
RampCreateScene not auto-populating a $500 buy amount
1 parent c9c477f commit a153892

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- fixed: `AirshipToast` font scaling
1111
- fixed: Swap provider selection modal scrolling on Android
1212
- fixed: `BuyCrypto` not auto-populating buy asset
13+
- fixed: `RampCreateScene` not auto-populating a $500 buy amount
1314

1415
## 4.37.0 (2025-10-21)
1516

src/components/scenes/RampCreateScene.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -246,12 +246,12 @@ export const RampCreateScene: React.FC<Props> = (props: Props) => {
246246
if (fiatUsdRate == null) return
247247
let abort = false
248248
const applyInitial = async (): Promise<void> => {
249-
if (abort) return
249+
if (abort || direction !== 'buy') return
250250
// Don't override if the user has started typing or fiat input is disabled
251251
if (
252252
hasAppliedInitialAmount.current ||
253253
amountTypeSupport.onlyCrypto ||
254-
'empty' in exchangeAmount ||
254+
!('empty' in exchangeAmount) ||
255255
lastUsedInput != null ||
256256
shouldShowRegionSelect
257257
) {
@@ -287,7 +287,8 @@ export const RampCreateScene: React.FC<Props> = (props: Props) => {
287287
selectedFiatCurrencyCode,
288288
shouldShowRegionSelect,
289289
fiatUsdRate,
290-
exchangeAmount
290+
exchangeAmount,
291+
direction
291292
])
292293

293294
// Create rampQuoteRequest based on current form state

0 commit comments

Comments
 (0)