Skip to content

Commit

Permalink
fix: after auth page problem
Browse files Browse the repository at this point in the history
  • Loading branch information
AMIRKHANEF committed Nov 26, 2024
1 parent 731db22 commit d94ffbc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function AuthFullScreenMode ({ onNextAuth, onPreviousAuth, requestIndex, request

const onApprove = useCallback((): void => {
approveAuthRequest(selectedAccounts, requests[requestIndex].id)
.then(() => onAction())
.then(() => onAction('/'))
.catch((error: Error) => console.error(error));
}, [onAction, requestIndex, requests, selectedAccounts]);

Expand All @@ -70,7 +70,7 @@ function AuthFullScreenMode ({ onNextAuth, onPreviousAuth, requestIndex, request
(alreadySelectedAccounts.length
? approveAuthRequest(alreadySelectedAccounts, id)
: ignoreAuthRequest(id)
).then(() => onAction())
).then(() => onAction('/'))
.catch((error: Error) => console.error(error));
}, [alreadySelectedAccounts, onAction, requestIndex, requests]);

Expand Down
4 changes: 2 additions & 2 deletions packages/extension-polkagate/src/popup/authorize/Request.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function Request ({ authRequest, hasBanner }: Props): React.React

const onApprove = useCallback((): void => {
approveAuthRequest(selectedAccounts, authRequest.id)
.then(() => onAction())
.then(() => onAction('/'))
.catch((error: Error) => console.error(error));
}, [authRequest.id, onAction, selectedAccounts]);

Expand All @@ -63,7 +63,7 @@ export default function Request ({ authRequest, hasBanner }: Props): React.React
(alreadySelectedAccounts.length
? approveAuthRequest(alreadySelectedAccounts, id)
: ignoreAuthRequest(id)
).then(() => onAction())
).then(() => onAction('/'))
.catch((error: Error) => console.error(error));
}, [alreadySelectedAccounts, authRequest.id, onAction]);

Expand Down

0 comments on commit d94ffbc

Please sign in to comment.