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) {
}
value={formattedAmounts[Field.INPUT]}
showMaxButton={showMaxButton}
currency={currencies[Field.INPUT]}
currency={currencies[Field.INPUT] ?? null}
onUserInput={handleTypeInput}
onMax={handleMaxInput}
fiatValue={fiatValueInput ?? undefined}
......@@ -454,7 +454,7 @@ export default function Swap({ history }: RouteComponentProps) {
hideBalance={false}
fiatValue={fiatValueOutput ?? undefined}
priceImpact={priceImpact}
currency={currencies[Field.OUTPUT]}
currency={currencies[Field.OUTPUT] ?? null}
onCurrencySelect={handleOutputSelect}
otherCurrency={currencies[Field.INPUT]}
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