diff --git a/packages/inter-protocol/src/vaultFactory/vaultManager.js b/packages/inter-protocol/src/vaultFactory/vaultManager.js index 198588c0da8..4c84e140bbe 100644 --- a/packages/inter-protocol/src/vaultFactory/vaultManager.js +++ b/packages/inter-protocol/src/vaultFactory/vaultManager.js @@ -1051,7 +1051,7 @@ export const prepareVaultManagerKit = ( ); state.lockedQuote = storedCollateralQuote; - facets.helper.writeMetrics(); + void facets.helper.writeMetrics(); return storedCollateralQuote; }, /** @param {ERef} auctionPF */ @@ -1101,6 +1101,7 @@ export const prepareVaultManagerKit = ( state.lockedQuote = undefined; if (vaultData.getSize() === 0) { + void helper.writeMetrics(); return; } trace( @@ -1164,7 +1165,7 @@ export const prepareVaultManagerKit = ( liquidatingVaults.delete(vault); } - await facets.helper.writeMetrics(); + void helper.writeMetrics(); }, }, }, diff --git a/packages/inter-protocol/test/vaultFactory/test-vaultLiquidation.js b/packages/inter-protocol/test/vaultFactory/test-vaultLiquidation.js index a79d2b96068..42cbc9cbc81 100644 --- a/packages/inter-protocol/test/vaultFactory/test-vaultLiquidation.js +++ b/packages/inter-protocol/test/vaultFactory/test-vaultLiquidation.js @@ -949,8 +949,17 @@ test('liquidate two loans', async t => { manualTimer, ); - totalDebt += 7n; + totalDebt += 6n; + await aethVaultMetrics.assertChange({ + lockedQuote: null, + totalDebt: { value: totalDebt }, + }); + totalDebt += 1n; await aethVaultMetrics.assertChange({ + lockedQuote: makeRatioFromAmounts( + aeth.make(1_000_000n), + run.make(7_000_000n), + ), totalDebt: { value: totalDebt }, }); totalDebt += 6n; @@ -3156,7 +3165,13 @@ test('Bug 7796 missing lockedPrice', async t => { const penaltyAeth = 309_850n; await aethVaultMetrics.assertChange({ - lockedQuote: { denominator: { value: 9_990_000n } }, + lockedQuote: null, + }); + await aethVaultMetrics.assertChange({ + lockedQuote: makeRatioFromAmounts( + aeth.make(1_000_000n), + run.make(9_990_000n), + ), }); await aethVaultMetrics.assertChange({ liquidatingDebt: { value: totalDebt }, @@ -3346,7 +3361,13 @@ test('Bug 7851 & no bidders', async t => { ); await aethVaultMetrics.assertChange({ - lockedQuote: { denominator: { value: 9_990_000n } }, + lockedQuote: null, + }); + await aethVaultMetrics.assertChange({ + lockedQuote: makeRatioFromAmounts( + aeth.make(1_000_000n), + run.make(9_990_000n), + ), }); await aethVaultMetrics.assertChange({ liquidatingDebt: { value: aliceDebt },