Skip to content

Commit

Permalink
fixup! chore: cleanup test etc. based on commnts
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Jun 12, 2024
1 parent 19ceaa6 commit 87566b6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/inter-protocol/src/provisionPoolKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ const { details: X, quote: q, Fail } = assert;

const trace = makeTracer('ProvPool');

const FIRST_CAP_ASCII = /^[A-Z][a-zA-Z0-9_$]*$/;
const FIRST_LOWER_ASCII = /^[a-z][a-zA-Z0-9_$]*$/;
const FIRST_UPPER_KEYWORD = /^[A-Z][a-zA-Z0-9_$]*$/;
// see https://github.com/Agoric/agoric-sdk/issues/8238
const FIRST_LOWER_NEAR_KEYWORD = /^[a-z][a-zA-Z0-9_$]*$/;

/**
* @import {ERef} from '@endo/far'
Expand Down Expand Up @@ -377,11 +378,10 @@ export const prepareProvisionPoolKit = (

/** @param {import('@agoric/vats/src/vat-bank.js').AssetDescriptor} desc */
const repairDesc = desc => {
if (desc.issuerName.match(FIRST_CAP_ASCII)) {
if (desc.issuerName.match(FIRST_UPPER_KEYWORD)) {
trace(`Saving Issuer ${desc.issuerName}`);
return desc;
} else if (desc.issuerName.match(FIRST_LOWER_ASCII)) {
// see https://github.com/Agoric/agoric-sdk/issues/8238
} else if (desc.issuerName.match(FIRST_LOWER_NEAR_KEYWORD)) {
const bad = desc.issuerName;
const goodName = bad.replace(bad[0], bad[0].toUpperCase());

Expand Down

0 comments on commit 87566b6

Please sign in to comment.