Skip to content

Commit

Permalink
fixup! chore(walletFactory): start -> prepare for compat
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Aug 16, 2023
1 parent 8eeb8d8 commit a94f564
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/inter-protocol/test/smartWallet/contexts.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const makeDefaultTestContext = async (t, makeSpace) => {
);
/**
* @type {Promise<
* Installation<import('@agoric/smart-wallet/src/walletFactory.js').prepare>
* Installation<import('@agoric/smart-wallet/src/walletFactory.js').start>
* >}
*/
const installation = E(zoe).install(bundle);
Expand Down
3 changes: 3 additions & 0 deletions packages/smart-wallet/src/walletFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,3 +305,6 @@ export const prepare = async (zcf, privateArgs, baggage) => {
};
};
harden(prepare);

// for forward compatibility with ZCF that prefers not to rename
export const start = prepare;
2 changes: 1 addition & 1 deletion packages/smart-wallet/test/contexts.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const makeDefaultTestContext = async (t, makeSpace) => {
`${dirname}/../src/walletFactory.js`,
'walletFactory',
);
/** @type {Promise<Installation<import('../src/walletFactory.js').prepare>>} */
/** @type {Promise<Installation<import('../src/walletFactory.js').start>>} */
const installation = E(zoe).install(bundle);
//#endregion

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const buildRootObject = async () => {
let wallet;

// for startInstance
/** @type {Installation<import('../../../src/walletFactory.js').prepare>} */
/** @type {Installation<import('../../../src/walletFactory.js').start>} */
let installation;
const terms = {
agoricNames,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const meta = {
harden(meta);

/**
* @type {typeof import('../../../src/walletFactory.js').prepare}
* @type {typeof import('../../../src/walletFactory.js').start}
*/
export const start = async (zcf, privateArgs, baggage) => {
// copy paste from original contract, with type imports fixed and sayHelloUpgrade method added to creatorFacet)
Expand Down
2 changes: 1 addition & 1 deletion packages/smart-wallet/test/test-startWalletFactory.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const makeTestContext = async () => {
`${dirname}/../src/walletFactory.js`,
'walletFactory',
);
/** @type {Promise<Installation<import('../src/walletFactory.js').prepare>>} */
/** @type {Promise<Installation<import('../src/walletFactory.js').start>>} */
const installation = E(zoe).install(bundle);
//#endregion

Expand Down
2 changes: 1 addition & 1 deletion packages/vats/src/core/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
* >;
* walletFactory: Promise<
* Installation<
* import('@agoric/smart-wallet/src/walletFactory.js').prepare
* import('@agoric/smart-wallet/src/walletFactory.js').start
* >
* >;
* };
Expand Down

0 comments on commit a94f564

Please sign in to comment.