-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(vat-upgrade): improve code quality, switch using t.like
Refs: #10408
- Loading branch information
1 parent
0cbed4b
commit 0ec42bd
Showing
3 changed files
with
61 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 21 additions & 12 deletions
33
a3p-integration/proposals/p:upgrade-19/writeToAgoricNames/write-to-agoricNames.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,30 @@ | ||
// @ts-nocheck | ||
/* eslint-disable no-undef */ | ||
const writeToAgoricNames = async powers => { | ||
const { | ||
consume: { | ||
agoricNamesAdmin, | ||
} | ||
consume: { agoricNamesAdmin }, | ||
} = powers; | ||
|
||
console.log('writing to agoricNames...'); | ||
await Promise.all([ | ||
E(E(agoricNamesAdmin).lookupAdmin('issuer')).update('testIssuer', 'testIssuer'), | ||
E(E(agoricNamesAdmin).lookupAdmin('brand')).update('testBrand', 'testBrand'), | ||
E(E(agoricNamesAdmin).lookupAdmin('installation')).update('testInstallation', 'testInstallation'), | ||
E(E(agoricNamesAdmin).lookupAdmin('vbankAsset')).update('testAsset', 'testAsset'), | ||
E(E(agoricNamesAdmin).lookupAdmin('instance')).update('testInstance', 'testInstance'), | ||
E(E(agoricNamesAdmin).lookupAdmin('oracleBrand')).update('testOracleBrand', 'testOracleBrand'), | ||
]); | ||
const agoricNamesChildren = [ | ||
'brand', | ||
'installation', | ||
'instance', | ||
'issuer', | ||
'oracleBrand', | ||
'vbankAsset', | ||
]; | ||
|
||
await Promise.all( | ||
agoricNamesChildren.map(async (child, index) => | ||
E(E(agoricNamesAdmin).lookupAdmin(child)).update( | ||
`test${child}`, | ||
Far(`test${child}`, { getBoardId: () => `board${index}` }), | ||
), | ||
), | ||
); | ||
|
||
console.log('DONE'); | ||
}; | ||
|
||
writeToAgoricNames; | ||
writeToAgoricNames; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters