diff --git a/packages/governance/test/unitTests/test-paramGovernance.js b/packages/governance/test/unitTests/test-paramGovernance.js index 836197c1695..1b836aeef18 100644 --- a/packages/governance/test/unitTests/test-paramGovernance.js +++ b/packages/governance/test/unitTests/test-paramGovernance.js @@ -40,7 +40,7 @@ const setUpZoeForTest = async setJig => { * * @typedef {object} TestContext * @property {ZCF} zcf - * @property {IssuerRecord} runIssuerRecord + * @property {IssuerRecord} mintedIssuerRecord * @property {IssuerRecord} govIssuerRecord */ diff --git a/packages/run-protocol/src/runStake/runStakeKit.js b/packages/run-protocol/src/runStake/runStakeKit.js index e11ff3e62df..0eb5f4c3b9c 100644 --- a/packages/run-protocol/src/runStake/runStakeKit.js +++ b/packages/run-protocol/src/runStake/runStakeKit.js @@ -142,7 +142,7 @@ const helperBehavior = { * @param {MethodContext} context * @param {ZCFSeat} seat */ - getRunAllocated: ({ state }, seat) => + getDebtAllocated: ({ state }, seat) => seat.getAmountAllocated(KW.Debt, state.debtBrand), /** * @param {MethodContext} context @@ -235,11 +235,11 @@ const helperBehavior = { /** * @param {MethodContext} context */ - assertVaultHoldsNoRun: ({ state, facets }) => { + assertVaultHoldsNoDebt: ({ state, facets }) => { const { vaultSeat } = state; const { helper } = facets; assert( - AmountMath.isEmpty(helper.getRunAllocated(vaultSeat)), + AmountMath.isEmpty(helper.getDebtAllocated(vaultSeat)), X`Vault should be empty of debt`, ); }, @@ -315,7 +315,7 @@ const helperBehavior = { manager.burnDebt(give, vaultSeat); - helper.assertVaultHoldsNoRun(); + helper.assertVaultHoldsNoDebt(); void helper.updateUiState(); clientSeat.exit(); @@ -358,7 +358,7 @@ const helperBehavior = { state.open = false; helper.updateDebtSnapshot(AmountMath.makeEmpty(debtBrand)); void helper.updateUiState(); - helper.assertVaultHoldsNoRun(); + helper.assertVaultHoldsNoDebt(); seat.exit(); return 'Your RUNstake is closed; thank you for your business.'; diff --git a/packages/run-protocol/src/vaultFactory/vault.js b/packages/run-protocol/src/vaultFactory/vault.js index 25018322591..d156ac4e0ec 100644 --- a/packages/run-protocol/src/vaultFactory/vault.js +++ b/packages/run-protocol/src/vaultFactory/vault.js @@ -271,13 +271,13 @@ const helperBehavior = { */ getCollateralAllocated: ({ facets }, seat) => seat.getAmountAllocated('Collateral', facets.helper.collateralBrand()), - getRunAllocated: ({ facets }, seat) => + getDebtAllocated: ({ facets }, seat) => seat.getAmountAllocated('Minted', facets.helper.debtBrand()), - assertVaultHoldsNoRun: ({ state, facets }) => { + assertVaultHoldsNoDebt: ({ state, facets }) => { const { vaultSeat } = state; assert( - AmountMath.isEmpty(facets.helper.getRunAllocated(vaultSeat)), + AmountMath.isEmpty(facets.helper.getDebtAllocated(vaultSeat)), X`Vault should be empty of Minted`, ); }, @@ -404,7 +404,7 @@ const helperBehavior = { helper.updateDebtSnapshot(helper.emptyDebt()); helper.updateUiState(); - helper.assertVaultHoldsNoRun(); + helper.assertVaultHoldsNoDebt(); vaultSeat.exit(); state.manager.handleBalanceChange( @@ -522,7 +522,7 @@ const helperBehavior = { // parent needs to know about the change in debt helper.updateDebtAccounting(normalizedDebtPre, collateralPre, newDebt); state.manager.burnAndRecord(giveMinted, vaultSeat); - helper.assertVaultHoldsNoRun(); + helper.assertVaultHoldsNoDebt(); helper.updateUiState(); clientSeat.exit(); diff --git a/packages/run-protocol/src/vaultFactory/vaultFactory.js b/packages/run-protocol/src/vaultFactory/vaultFactory.js index 382ebfb68a8..a5a31eff0c8 100644 --- a/packages/run-protocol/src/vaultFactory/vaultFactory.js +++ b/packages/run-protocol/src/vaultFactory/vaultFactory.js @@ -50,7 +50,7 @@ export const start = async (zcf, privateArgs) => { privateArgs; const debtMint = await zcf.registerFeeMint('Minted', feeMintAccess); zcf.setTestJig(() => ({ - runIssuerRecord: debtMint.getIssuerRecord(), + mintedIssuerRecord: debtMint.getIssuerRecord(), })); const {