diff --git a/packages/store/src/keys/copyMap.js b/packages/store/src/keys/copyMap.js index 14eb39d9b13e..0f2517e1f1b9 100644 --- a/packages/store/src/keys/copyMap.js +++ b/packages/store/src/keys/copyMap.js @@ -2,6 +2,7 @@ import { assertChecker, + Far, getTag, makeTagged, passStyleOf, @@ -95,10 +96,10 @@ export const getCopyMapEntries = m => { payload: { keys, values }, } = m; const { length } = keys; - return harden({ + return Far('CopyMap entries iterable', { [Symbol.iterator]: () => { let i = 0; - return harden({ + return Far('CopyMap entries iterator', { next: () => { /** @type {IteratorResult<[K,V],void>} */ let result; diff --git a/packages/store/src/stores/store-utils.js b/packages/store/src/stores/store-utils.js index 10b1c6ba5e97..08402372e6a2 100644 --- a/packages/store/src/stores/store-utils.js +++ b/packages/store/src/stores/store-utils.js @@ -1,5 +1,7 @@ // @ts-check +import { Far } from '@agoric/marshal'; + const { details: X, quote: q } = assert; /** @@ -54,13 +56,13 @@ export const makeCurrentKeysKit = ( return sortedKeysMemo; }; - const iterableKeys = harden({ + const iterableKeys = Far('Iterable of keys', { [Symbol.iterator]: () => { const generation = updateCount; getSortedKeys(); const len = sortedKeysMemo.length; let i = 0; - return harden({ + return Far('Iterator of keys', { next: () => { assert.equal( generation,