Skip to content

Commit

Permalink
fix(daemon): rename "makeRemote" to "provideRemoteValue"
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis committed Mar 7, 2024
1 parent 01812a2 commit f0451bd
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/daemon/src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@ const makeDaemonCore = async (
);
// Behold, forward reference:
// eslint-disable-next-line no-use-before-define
return makeRemote(peerIdentifier, formulaIdentifier, context);
return provideRemoteValue(peerIdentifier, formulaIdentifier, context);
}
if (
[
Expand Down Expand Up @@ -1389,20 +1389,22 @@ const makeDaemonCore = async (
};

/**
* This is used to provide a value for a formula identifier that is known to
* originate from the specified peer.
* @param {string} peerFormulaIdentifier
* @param {string} remoteFormulaIdentifier
* @param {string} remoteValueFormulaIdentifier
* @param {import('./types.js').Context} context
* @returns {Promise<import('./types.js').ControllerPartial<unknown, undefined>>}
*/
const makeRemote = async (
const provideRemoteValue = async (
peerFormulaIdentifier,
remoteFormulaIdentifier,
remoteValueFormulaIdentifier,
context,
) => {
const peer = /** @type {import('./types.js').EndoPeer} */ (
await provideValueForFormulaIdentifier(peerFormulaIdentifier)
);
const remoteValueP = peer.provide(remoteFormulaIdentifier);
const remoteValueP = peer.provide(remoteValueFormulaIdentifier);
const external = remoteValueP;
const internal = Promise.resolve(undefined);
return harden({ internal, external });
Expand Down

0 comments on commit f0451bd

Please sign in to comment.