diff --git a/packages/smart-wallet/src/smartWallet.js b/packages/smart-wallet/src/smartWallet.js index 8c034bac4123..26b2eda82a8e 100644 --- a/packages/smart-wallet/src/smartWallet.js +++ b/packages/smart-wallet/src/smartWallet.js @@ -95,13 +95,10 @@ const mapToRecord = map => Object.fromEntries(map.entries()); * walletStorageNode: StorageNode, * }} UniqueParams * + * @typedef {Pick, 'has' | 'get' | 'values'>} ReadOnlyMapStore * @typedef {{ * agoricNames: ERef, - * registry: { - * has: (b: Brand) => boolean, - * get: (b: Brand) => BrandDescriptor, - * values: () => BrandDescriptor[], - * }, + * registry: ReadOnlyMapStore, * invitationIssuer: Issuer<'set'>, * invitationBrand: Brand<'set'>, * invitationDisplayInfo: DisplayInfo, @@ -144,7 +141,7 @@ export const prepareSmartWallet = (baggage, shared) => { invitationDisplayInfo: DisplayInfoShape, publicMarshaller: M.remotable('Marshaller'), zoe: M.eref(M.remotable('ZoeService')), - registry: M.remotable('AssetRegistry'), + registry: M.remotable('AssetRegistry'), // XXX too strict }), ); diff --git a/packages/smart-wallet/src/walletFactory.js b/packages/smart-wallet/src/walletFactory.js index 7b3c25ed60a6..bd70c185cf30 100644 --- a/packages/smart-wallet/src/walletFactory.js +++ b/packages/smart-wallet/src/walletFactory.js @@ -99,7 +99,7 @@ const makeAssetRegistry = assetPublisher => { has: brand => brandDescriptors.has(brand), /** @param {Brand} brand */ get: brand => brandDescriptors.get(brand), - values: () => [...brandDescriptors.values()], + values: () => brandDescriptors.values(), }); return registry; }; diff --git a/packages/smart-wallet/test/contexts.js b/packages/smart-wallet/test/contexts.js index 708d076f09b9..440eb6c99fcb 100644 --- a/packages/smart-wallet/test/contexts.js +++ b/packages/smart-wallet/test/contexts.js @@ -55,6 +55,7 @@ export const makeDefaultTestContext = async (t, makeSpace) => { // copied from makeClientBanks() const bank = E(consume.bankManager).getBankForAddress(address); + /** @type {[ReturnType>, boolean]} */ const [wallet, _isNew] = await E( walletFactory.creatorFacet, ).provideSmartWallet(address, bank, consume.namesByAddressAdmin);