Skip to content

Commit

Permalink
refactor(runStakeKit): getNotifier → getSubscriber
Browse files Browse the repository at this point in the history
  • Loading branch information
turadg committed Jul 12, 2022
1 parent 9a2f99e commit fb4b156
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/run-protocol/src/runStake/runStake.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ export const start = async (
return harden({
publicNotifiers: {
asset: manager.getAssetSubscriber(),
vault: pot.getNotifier(),
vault: pot.getSubscriber(),
},
invitationMakers: Far('invitation makers', {
AdjustBalances: () =>
Expand Down
8 changes: 4 additions & 4 deletions packages/run-protocol/src/runStake/runStakeKit.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import { AmountMath, AssetKind } from '@agoric/ertp';
import { assertProposalShape } from '@agoric/zoe/src/contractSupport/index.js';
import { ceilMultiplyBy } from '@agoric/zoe/src/contractSupport/ratio.js';
import { makeNotifierKit } from '@agoric/notifier';
import { makePublishKit } from '@agoric/notifier';
import { M, matches } from '@agoric/store';
import { defineKindMulti } from '@agoric/vat-data';
import { makeTracer } from '../makeTracer.js';
Expand Down Expand Up @@ -111,7 +111,7 @@ const initState = (zcf, startSeat, manager) => {
})();
manager.applyDebtDelta(emptyDebt, initialDebt);

const { notifier, publisher } = makeNotifierKit();
const { publisher, subscriber } = makePublishKit();

/** @type {ImmutableState} */
const immutable = {
Expand Down Expand Up @@ -192,7 +192,7 @@ const helperBehavior = {
trace('updateUiState', uiState);

if (active) {
publisher.updateState(uiState);
publisher.publish(uiState);
} else {
publisher.finish(uiState);
state.publisher = null;
Expand Down Expand Up @@ -362,7 +362,7 @@ const helperBehavior = {

const potBehavior = {
/** @param {MethodContext} context */
getNotifier: ({ state }) => state.notifier,
getSubscriber: ({ state }) => state.subscriber,
/** @param {MethodContext} context */
makeAdjustBalancesInvitation: ({ state, facets }) => {
const { zcf } = state;
Expand Down

0 comments on commit fb4b156

Please sign in to comment.