Skip to content

Commit

Permalink
add: warning when max
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-hash committed Dec 14, 2024
1 parent bd6ec52 commit bd26832
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/src/components/FurnacePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,13 @@ export const FurnacePage: FC = () => {
return;
}

if (signer && contractState) {
if (amount === computedBalance) {
if (!window.confirm(`Are you sure you want to burn all your ${selectedToken?.symbol} tokens?`)) {
return;
}
}

if (signer && contractState) {
const floatToDecimals = convertToInt(amount)
console.log(floatToDecimals)
const tx = await burn(
Expand Down

0 comments on commit bd26832

Please sign in to comment.