Skip to content

Commit

Permalink
feat: look up last value of vault parametes when upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris-Hibbert committed Sep 6, 2024
1 parent bd19a6f commit b0dabba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/inter-protocol/src/proposals/upgrade-vaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,13 @@ export const upgradeVaults = async (

const subscription = E(directorPF).getElectorateSubscription();
const notifier = makeNotifierFromAsyncIterable(subscription);
let { value, updateCount } = await notifier.getUpdateSince(0n);
let { value, updateCount } = await notifier.getUpdateSince();
// @ts-expect-error It's an amount.
while (AmountMath.isEmpty(value.current.MinInitialDebt.value)) {
({ value, updateCount } = await notifier.getUpdateSince(updateCount));
({ value, updateCount } = await notifier.getUpdateSince());
trace(
`minInitialDebt was empty, retried`,
updateCount,
value.current.MinInitialDebt.value,
);
}
Expand Down

0 comments on commit b0dabba

Please sign in to comment.