Skip to content

Commit

Permalink
fix(vats): minor adjustments to legacy bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Jan 26, 2022
1 parent e1bb213 commit 877f30a
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions packages/vats/src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ async function makeChainBundler(
sharingService,
board,
chainTimerService,
{ zoeService: zoe, feeMintAccess, feeCollectionPurse },
{ zoeService: zoe, feeMintAccess },
{ priceAuthority, adminFacet: priceAuthorityAdmin },
walletManager,
] = await Promise.all([
Expand All @@ -262,8 +262,6 @@ async function makeChainBundler(
E(vats.walletManager).buildWalletManager(vatAdminSvc),
]);

const zoeWUnlimitedPurse = E(zoe).bindDefaultFeePurse(feeCollectionPurse);

const {
nameHub: agoricNames,
nameAdmin: agoricNamesAdmin,
Expand Down Expand Up @@ -308,7 +306,7 @@ async function makeChainBundler(
chainTimerService,
nameAdmins,
priceAuthority,
zoe: zoeWUnlimitedPurse,
zoe,
bootstrapPaymentValue,
feeMintAccess,
}),
Expand All @@ -317,7 +315,7 @@ async function makeChainBundler(
board,
nameAdmins,
namesByAddress,
zoe: zoeWUnlimitedPurse,
zoe,
}),
]);

Expand All @@ -334,7 +332,7 @@ async function makeChainBundler(
creatorFacet: attestationCreatorFacet,
} = await bootstrapAttestation(
attestationBundle,
zoeWUnlimitedPurse,
zoe,
bldIssuer || assert.fail('bld issuer!?!@@'),
makeStakeReporter(
bridgeManager,
Expand Down Expand Up @@ -455,7 +453,7 @@ async function makeChainBundler(
E(vats.distributeFees)
.buildDistributor(
[treasuryCreator, ammFacets.ammCreatorFacet].map(cf =>
E(vats.distributeFees).makeFeeCollector(zoeWUnlimitedPurse, cf),
E(vats.distributeFees).makeFeeCollector(zoe, cf),
),
feeCollectorDepositFacet,
epochTimerService,
Expand Down Expand Up @@ -637,7 +635,7 @@ async function makeChainBundler(
give: { Secondary: secondaryAmount, Central: centralAmount },
});

E(zoeWUnlimitedPurse).offer(
E(zoe).offer(
E(ammFacets.ammPublicFacet).makeAddLiquidityInvitation(),
proposal,
harden({
Expand Down Expand Up @@ -681,7 +679,7 @@ async function makeChainBundler(

const [ammPublicFacet, pegasus] = await Promise.all(
[ammInstance, pegasusInstance].map(instance =>
E(zoeWUnlimitedPurse).getPublicFacet(instance),
E(zoe).getPublicFacet(instance),
),
);
await addAllCollateral();
Expand Down Expand Up @@ -889,7 +887,6 @@ async function makeChainBundler(
);

const userFeePurse = await E(zoe).makeFeePurse();
const zoeWUserFeePurse = await E(zoe).bindDefaultFeePurse(userFeePurse);

const faucet = Far('faucet', {
// A method to reap the spoils of our on-chain provisioning.
Expand Down Expand Up @@ -924,7 +921,7 @@ async function makeChainBundler(
agoricNames,
namesByAddress,
myAddressNameAdmin,
zoe: zoeWUserFeePurse,
zoe,
board,
timerDevice,
timerDeviceScale: CHAIN_TIMER_DEVICE_SCALE,
Expand Down Expand Up @@ -971,7 +968,7 @@ async function makeChainBundler(
namesByAddress,
priceAuthority,
board,
zoe: zoeWUserFeePurse,
zoe,
});

return bundle;
Expand Down

0 comments on commit 877f30a

Please sign in to comment.