Skip to content

Commit

Permalink
try: observe inconsistent behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Lopes committed Nov 25, 2024
1 parent bed8ef1 commit 7532428
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
retryUntilCondition,
makeWalletUtils,
} from '@agoric/client-utils';
import { makeVstorageKit as mockVstorageKit } from './rpc.js';

/**
* @param {typeof window.fetch} fetch
Expand Down Expand Up @@ -224,7 +223,7 @@ export const getGovernanceProposalsHistory = async (
const {
marshaller,
vstorage: { readFully },
} = await mockVstorageKit({ fetch }, networkConfig);
} = await makeVstorageKit({ fetch }, networkConfig);

const rawHistory = await readFully(nodePath);

Expand Down
7 changes: 5 additions & 2 deletions packages/vats/src/proposals/upgrade-vaultFactory-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ export const upgradeVaultFactory = async (powers, options) => {
await null;

const subscription = E(publicFacet).getElectorateSubscription();
const after = await E(subscription).subscribeAfter();
const { current } = after.head.value;
const notifier = makeNotifierFromAsyncIterable(subscription);
const { updateCount } = await notifier.getUpdateSince();

// subscribeAfter(<some known state>) retrieves the latest value.
const after = await E(subscription).subscribeAfter(updateCount);
const { current } = after.head.value;
return harden({
MinInitialDebt: current.MinInitialDebt.value,
ReferencedUI: current.ReferencedUI.value,
Expand Down

0 comments on commit 7532428

Please sign in to comment.