File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments