Skip to content

Commit

Permalink
fix: add background state for ledger connect modal
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie committed Nov 28, 2023
1 parent 3f5718c commit 41fef37
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { useNavigate } from 'react-router-dom';
import { styled } from 'leather-styles/jsx';

import { SupportedBlockchains } from '@shared/constants';
import { RouteUrls } from '@shared/route-urls';

import { capitalize } from '@app/common/utils';
import { immediatelyAttemptLedgerConnection } from '@app/features/ledger/hooks/use-when-reattempt-ledger-connection';
Expand All @@ -19,7 +20,10 @@ export function ConnectLedgerAssetBtn({ chain }: ConnectLedgerAssetBtnProps) {
const onClick = () => {
navigate(`${chain}/connect-your-ledger`, {
replace: true,
state: { [immediatelyAttemptLedgerConnection]: true },
state: {
[immediatelyAttemptLedgerConnection]: true,
backgroundLocation: { pathname: RouteUrls.Home },
},
});
};
return (
Expand Down

0 comments on commit 41fef37

Please sign in to comment.