Commit 148e415f authored by Eugene Sokovikov's avatar Eugene Sokovikov Committed by GitHub

fix: handle non existing inputCurrency from url #3056 (#3857)

- fix: handle non existing inputCurrency from url

oppening an url swap?inputCurrency=not_existing_address
cause a state where you are not able to change input currency
parent fd964c5b
...@@ -426,7 +426,7 @@ export default function Swap({ history }: RouteComponentProps) { ...@@ -426,7 +426,7 @@ export default function Swap({ history }: RouteComponentProps) {
} }
value={formattedAmounts[Field.INPUT]} value={formattedAmounts[Field.INPUT]}
showMaxButton={showMaxButton} showMaxButton={showMaxButton}
currency={currencies[Field.INPUT]} currency={currencies[Field.INPUT] ?? null}
onUserInput={handleTypeInput} onUserInput={handleTypeInput}
onMax={handleMaxInput} onMax={handleMaxInput}
fiatValue={fiatValueInput ?? undefined} fiatValue={fiatValueInput ?? undefined}
...@@ -454,7 +454,7 @@ export default function Swap({ history }: RouteComponentProps) { ...@@ -454,7 +454,7 @@ export default function Swap({ history }: RouteComponentProps) {
hideBalance={false} hideBalance={false}
fiatValue={fiatValueOutput ?? undefined} fiatValue={fiatValueOutput ?? undefined}
priceImpact={priceImpact} priceImpact={priceImpact}
currency={currencies[Field.OUTPUT]} currency={currencies[Field.OUTPUT] ?? null}
onCurrencySelect={handleOutputSelect} onCurrencySelect={handleOutputSelect}
otherCurrency={currencies[Field.INPUT]} otherCurrency={currencies[Field.INPUT]}
showCommonBases={true} showCommonBases={true}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment