Skip to content

Commit

Permalink
fix: fix wallet modal closing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
RyukTheCoder authored and RanGojo committed Aug 10, 2024
1 parent 1b93333 commit 146f7e2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
dismissible={!showMoreWalletFor}
container={modalContainer}
{...(!showMoreWalletFor && {
styles: { container: { height: '100%' } },
footer: (
<ConfirmButton>
<Button
Expand All @@ -350,7 +351,7 @@ export function ConfirmWalletsModal(props: PropTypes) {
),
})}
{...(showMoreWalletFor && {
styles: { container: { padding: '$0' } },
styles: { container: { height: '100%', padding: '$0' } },
header: (
<ShowMoreHeader>
<NavigateBack
Expand Down
6 changes: 4 additions & 2 deletions widget/embedded/src/pages/WalletsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,14 @@ export function WalletsPage() {
setSelectedWalletType(type);
}, TIME_TO_IGNORE_MODAL);
},
onConnect: () => {
onConnect: (type) => {
if (modalTimerId) {
clearTimeout(modalTimerId);
}
setTimeout(() => {
setOpenModal(false);
if (selectedWalletType === type) {
setOpenModal(false);
}
}, TIME_TO_CLOSE_MODAL);
},
});
Expand Down

0 comments on commit 146f7e2

Please sign in to comment.