Skip to content

Commit 302164d

Browse files
committed
fix(perps): scope deposit toast dismiss to specific id to avoid dismissing unrelated toasts
1 parent 7bcad9b commit 302164d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

ui/components/app/perps/perps-deposit-toast.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export function PerpsDepositToast() {
5353

5454
return () => {
5555
clearTimeout(timeoutId);
56-
toast.dismiss();
56+
toast.dismiss(id);
5757
};
5858
}, [
5959
hasDepositResult,
@@ -69,12 +69,12 @@ export function PerpsDepositToast() {
6969
}
7070

7171
if (!shouldShowDepositToast) {
72-
toast.dismiss();
72+
toast.dismiss(id);
7373
return;
7474
}
7575

7676
if (!depositInProgress) {
77-
toast.dismiss();
77+
toast.dismiss(id);
7878
return;
7979
}
8080

@@ -87,7 +87,7 @@ export function PerpsDepositToast() {
8787
});
8888

8989
return () => {
90-
toast.dismiss();
90+
toast.dismiss(id);
9191
};
9292
}, [depositInProgress, hasDepositResult, shouldShowDepositToast, t]);
9393

0 commit comments

Comments
 (0)