Skip to content

Commit

Permalink
fixup! fix(inter-protocol): brands in CLI need not start with A-Z
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Oct 3, 2023
1 parent d8b848a commit 31b1bad
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/inter-protocol/src/clientSupport.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ export const makeParseAmount =
(agoricNames, makeError = msg => RangeError(msg)) =>
opt => {
assert.typeof(opt, 'string', 'parseAmount expected string');
const m = opt.match(/^(?<value>[\d_]+(\.[\d_]+)?)(?<brand>\w*?)$/);
const m = opt.match(
/^(?<value>[\d_]+(?:\.[\d_]+)?)\s*(?<brand>[A-Za-z]\w*)$/,
);
if (!m || !m.groups) {
throw makeError(`invalid amount: ${opt}`);
}
Expand Down

0 comments on commit 31b1bad

Please sign in to comment.