Skip to content

Commit

Permalink
Reload transaction page when money is received
Browse files Browse the repository at this point in the history
  • Loading branch information
Tymmmy committed Feb 27, 2025
1 parent 3731077 commit dc36927
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/wallet/frontend/src/lib/hooks/useToast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ export function toast({ ...props }: Toast) {
open: true,
onOpenChange: (open) => {
if (!open) dismiss()
if (
props.title === 'Received Money' &&
window.location.href.indexOf('/transactions') !== -1
) {
window.location.reload()
}
}
}
})
Expand Down
1 change: 1 addition & 0 deletions packages/wallet/frontend/src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export default function App({ Component, pageProps }: AppPropsWithLayout) {
into account {account.name}.
</p>
),
title: 'Received Money',
variant: 'success'
})
updateBalance(
Expand Down

0 comments on commit dc36927

Please sign in to comment.