Skip to content

Commit

Permalink
Merge pull request #422 from hyperlane-xyz/fix/url-params
Browse files Browse the repository at this point in the history
fix: url params persistence when one chain is not defined
  • Loading branch information
Xaroz authored Feb 5, 2025
2 parents 57bf8e8 + cc8feb4 commit 554d79d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/features/transfer/TransferTokenForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,11 @@ function useFormInitialValues(): TransferFormValues {
return useMemo(() => {
const firstToken = warpCore.tokens[0];
const connectedToken = firstToken.connections?.[0];
const chainsValid = originQuery && destinationQuery;

return {
origin: originQuery ? originQuery : firstToken.chainName,
destination: destinationQuery ? destinationQuery : connectedToken?.token?.chainName || '',
origin: chainsValid ? originQuery : firstToken.chainName,
destination: chainsValid ? destinationQuery : connectedToken?.token?.chainName || '',
tokenIndex: tokenIndex,
amount: '',
recipient: '',
Expand Down

0 comments on commit 554d79d

Please sign in to comment.