Skip to content

Commit

Permalink
Warn if amount is over 21m bitcoin
Browse files Browse the repository at this point in the history
  • Loading branch information
benthecarman authored and futurepaul committed Jul 27, 2023
1 parent dd28f5b commit 43647cb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/components/AmountEditable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,11 @@ export const AmountEditable: ParentComponent<{
return undefined;
}

// If over 4 million sats, warn that it's a beta bro
if (parsed >= 4000000) {
if (parsed >= 2099999997690000) {
// If over 21 million bitcoin, warn that too much
return i18n.t("more_than_21m");
} else if (parsed >= 4000000) {
// If over 4 million sats, warn that it's a beta bro
return i18n.t("too_big_for_beta");
}
};
Expand Down
4 changes: 3 additions & 1 deletion src/i18n/en/translations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,5 +52,7 @@ export default {
continue: "Continue",
keep_mutiny_open: "Keep Mutiny open to complete the payment.",
too_big_for_beta:
"That's a lot of sats. You do know Mutiny Wallet is still in beta, yeah?"
"That's a lot of sats. You do know Mutiny Wallet is still in beta, yeah?",
more_than_21m:
"There are only 21 million bitcoin.",
};

0 comments on commit 43647cb

Please sign in to comment.