Skip to content

Commit

Permalink
feat: record displayInfo in the issuerTable
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Nov 5, 2020
1 parent eac7af9 commit 72a2137
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/zoe/src/issuerTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,21 @@ const makeIssuerTable = () => {
initIssuer: async issuerP => {
const brandP = E(issuerP).getBrand();
const brandIssuerMatchP = E(brandP).isMyIssuer(issuerP);
const displayInfoP = E(brandP).getDisplayInfo();
const amountMathKindP = E(issuerP).getAmountMathKind();
/** @type {[Issuer,Brand,boolean,AmountMathKind]} */
/** @type {[Issuer,Brand,boolean,AmountMathKind,any]} */
const [
issuer,
brand,
brandIssuerMatch,
amountMathKind,
displayInfo,
] = await Promise.all([
issuerP,
brandP,
brandIssuerMatchP,
amountMathKindP,
displayInfoP,
]);
// AWAIT /////

Expand All @@ -61,7 +64,12 @@ const makeIssuerTable = () => {
`issuer was using a brand which was not its own`,
);
const amountMath = makeAmountMath(brand, amountMathKind);
issuerTable.initIssuerByRecord({ brand, issuer, amountMath });
issuerTable.initIssuerByRecord({
brand,
issuer,
amountMath,
displayInfo,
});
return issuerTable.getByBrand(brand);
},
initIssuerByRecord: issuerRecord => {
Expand Down
1 change: 1 addition & 0 deletions packages/zoe/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
* @property {Brand} brand
* @property {Issuer} issuer
* @property {AmountMath} amountMath
* @property {any} displayInfo
*
* @typedef {AmountKeywordRecord} Allocation
* @typedef {Record<Keyword,AmountMath>} AmountMathKeywordRecord
Expand Down

0 comments on commit 72a2137

Please sign in to comment.