Merge pull request #480 from cosmos/477-faucet-error-message

Fix faucet error message
This commit is contained in:
Will Clark 2020-10-22 12:56:04 +02:00 committed by GitHub
commit 2b45933aa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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];
}