Skip to content

fix: initialToken couldnt find MATIC due to lowerCase method #660

New issue

Have a question about this project? Sign up for a free account to open an issue and contact its maintainers and the community.

By clicking “Sign up for ”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on ? Sign in to your account

Merged
merged 1 commit into from
May 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: initialToken couldnt find MATIC due to lowerCase
  • Loading branch information
@imagobea
imagobea committedMay 12, 2022
commit 0dae48fcba092a3688407d7a6b93dbe8ed7ab50f
3 changes: 1 addition & 2 deletions wallet/src/components/BridgeComponent/index.jsx
Original file line numberDiff line numberDiff line change
Expand Up@@ -137,9 +137,8 @@ const BridgeComponent = () => {
const initialTx = history?.location?.tokenState?.initialTxType ?? 'deposit';
const initialToken =
supportedTokens.find(
t => t.address.toLowerCase() === history?.location?.tokenState?.tokenAddress,
t => t.address.toLowerCase() === history?.location?.tokenState?.tokenAddress.toLowerCase(),
) ?? supportedTokens[0];

const [token, setToken] = useState(initialToken);
const [txType, setTxType] = useState(initialTx);
const [transferValue, setTransferValue] = useState('0');
Expand Down