Warn if amount is over 21m bitcoin

This commit is contained in:
benthecarman
2023-07-26 19:32:22 -05:00
committed by Paul Miller
parent dd28f5be04
commit 43647cb403
2 changed files with 8 additions and 3 deletions

View File

@@ -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");
}
};

View File

@@ -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.",
};