mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
fix: make the gas price regex case sensitive
This commit is contained in:
parent
8ca4560b6e
commit
075b54cc89
@ -37,7 +37,7 @@ export class GasPrice {
|
||||
*/
|
||||
public static fromString(gasPrice: string): GasPrice {
|
||||
// Use Decimal.fromUserInput and checkDenom for detailed checks and helpful error messages
|
||||
const matchResult = gasPrice.match(/^([0-9.]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/i);
|
||||
const matchResult = gasPrice.match(/^([0-9.]+)([a-zA-Z][a-zA-Z0-9/:._-]*)$/);
|
||||
if (!matchResult) {
|
||||
throw new Error("Invalid gas price string");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user