Skip to content

Commit

Permalink
feat(smartWallet): entries, keys in agoricNames from vstorage
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Jan 10, 2024
1 parent 736c8aa commit e5dce34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/ag-trade/src/smartWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,11 @@ const makeQueryKit = lcd => {
}
const entries = await queryData(`published.agoricNames.${kind}`);
const record = Object.fromEntries(entries);
const hub = Far('NameHub', { lookup: name => record[name] });
const hub = Far('NameHub', {
lookup: name => record[name],
keys: () => entries.map(e => e[0]),
entries: () => entries,
});
nameHubCache.set(kind, hub);
return hub;
};
Expand Down

0 comments on commit e5dce34

Please sign in to comment.