Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: display close tx for 10s #38

Merged
merged 2 commits into from
Feb 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/components/Transfer/Send.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ export const Send = ({
Uik.notify.success({
message:
"Tokens transfered.\nBalances will reload after blocks are finalized",
keepAlive: true,
aliveFor: 10,
});

Uik.dropConfetti();
} catch (error) {
const message = errorHandler(error.message);
Expand Down
8 changes: 4 additions & 4 deletions src/hooks/useAddLiquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ export const onAddLiquidity = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand Down Expand Up @@ -401,7 +401,7 @@ export const onAddLiquidity = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand All @@ -414,7 +414,7 @@ export const onAddLiquidity = ({

Uik.notify.success({
message: 'Successfully provided liquidity.\nBalances will reload after blocks are finalized.',
keepAlive: true,
aliveFor: 10,
});

Uik.dropConfetti();
Expand All @@ -434,7 +434,7 @@ export const onAddLiquidity = ({
dispatch(setAllTokensAction(newTokens)); */
await updateTokenState().catch(() => Uik.notify.danger({
message: 'Please reload the page to update token balances',
keepAlive: true,
aliveFor: 10,
}));
dispatch(setLoadingAction(false));
dispatch(clearTokenAmountsAction());
Expand Down
6 changes: 3 additions & 3 deletions src/hooks/useRemoveLiquidity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export const onRemoveLiquidity = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand Down Expand Up @@ -281,7 +281,7 @@ export const onRemoveLiquidity = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand All @@ -294,7 +294,7 @@ export const onRemoveLiquidity = ({

Uik.notify.success({
message: 'Tokens were successfully withdrawn.\nBalances will reload after blocks are finalized.',
keepAlive: true,
aliveFor: 10,
});

Uik.dropConfetti();
Expand Down
10 changes: 5 additions & 5 deletions src/hooks/useSwapState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export const onSwap = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand Down Expand Up @@ -360,7 +360,7 @@ export const onSwap = ({

Uik.notify.success({
message: 'Blocks have been finalized',
keepAlive: true,
aliveFor: 10,
});
}
},
Expand All @@ -373,20 +373,20 @@ export const onSwap = ({

Uik.notify.success({
message: 'Trade complete.\nBalances will reload after blocks are finalized',
keepAlive: true,
aliveFor: 10,
});

Uik.dropConfetti();
} catch (error) {
const message = errorHandler(error.message);
Uik.notify.danger({
message: `An error occurred while trying to complete your trade: ${message}`,
keepAlive: true,
aliveFor: 10,
});
} finally {
await updateTokenState().catch(() => Uik.notify.danger({
message: 'Please reload the page to update token balances',
keepAlive: true,
aliveFor: 10,
}));

dispatch(setLoadingAction(false));
Expand Down
Loading