Skip to content

Commit

Permalink
fix(daemon): in mail remove redundant SELF lookup #2085
Browse files Browse the repository at this point in the history
  • Loading branch information
kumavis authored Feb 17, 2024
2 parents cacb843 + fe3caf5 commit 0c52db1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/daemon/src/mail.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,20 +128,16 @@ export const makeMailboxMaker = ({
// naming hub's formula identifier and the pet name path.
// A "naming hub" is an objected with a variadic lookup method. It includes
// objects such as guests and hosts.
const hubFormulaIdentifier = identifyLocal('SELF');
if (hubFormulaIdentifier === undefined) {
throw new Error('No SELF found during LookupFormula creation.');
}
const digester = makeSha512();
digester.updateText(`${hubFormulaIdentifier},${petNamePath.join(',')}`);
digester.updateText(`${selfFormulaIdentifier},${petNamePath.join(',')}`);
const lookupFormulaNumber = digester.digestHex();

// TODO:lookup Check if the lookup formula already exists in the store
/** @type {import('./types.js').LookupFormula} */
const lookupFormula = {
/** @type {'lookup'} */
type: 'lookup',
hub: hubFormulaIdentifier,
hub: selfFormulaIdentifier,
path: petNamePath,
};

Expand Down

0 comments on commit 0c52db1

Please sign in to comment.