mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
faucet: Update error message in parseBankToken
This commit is contained in:
parent
ae024e51c4
commit
92fa8a6e08
@ -3,7 +3,7 @@ const parseBankTokenPattern = /^([a-zA-Z]{2,20})$/;
|
||||
export function parseBankToken(input: string): string {
|
||||
const match = input.replace(/\s/g, "").match(parseBankTokenPattern);
|
||||
if (!match) {
|
||||
throw new Error("Token could not be parsed. Format: {DISPLAY}=10^{DIGITS}{base}, e.g. ATOM=10^6uatom");
|
||||
throw new Error("Token could not be parsed");
|
||||
}
|
||||
return match[1];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user