Skip to content

Commit

Permalink
chore: fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
rabi-siddique committed Sep 5, 2024
1 parent ea8a272 commit 3166cfc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
6 changes: 3 additions & 3 deletions contract/src/offer-up-proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const BOARD_AUX = 'boardAux';

const marshalData = makeMarshal(_val => Fail`data only`);

const IST_UNIT = 1_000_000n;
const CENT = IST_UNIT / 100n;

/**
* Make a storage node for auxilliary data for a value on the board.
*
Expand Down Expand Up @@ -47,16 +44,19 @@ export const startOfferUpContract = async permittedPowers => {
consume: { board, chainStorage, startUpgradable, zoe },
brand: {
consume: { IST: istBrandP },
// @ts-expect-error dynamic extension to promise space
produce: { Item: produceItemBrand },
},
issuer: {
consume: { IST: istIssuerP },
// @ts-expect-error dynamic extension to promise space
produce: { Item: produceItemIssuer },
},
installation: {
consume: { offerUp: offerUpInstallationP },
},
instance: {
// @ts-expect-error dynamic extension to promise space
produce: { offerUp: produceInstance },
},
} = permittedPowers;
Expand Down
25 changes: 3 additions & 22 deletions contract/src/offer-up.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,11 @@
// @ts-check

import { Far } from '@endo/far';
import { M, getCopyBagEntries } from '@endo/patterns';
import { AmountMath, AssetKind } from '@agoric/ertp/src/amountMath.js';
import { makeCopyBag } from '@endo/patterns';
import { AmountShape } from '@agoric/ertp/src/typeGuards.js';
import { makeCopyBag, M } from '@endo/patterns';
import { atomicRearrange } from '@agoric/zoe/src/contractSupport/atomicTransfer.js';
import { makeIssuerKit } from '@agoric/ertp';
import '@agoric/zoe/exported.js';

const { Fail, quote: q } = assert;

// #region bag utilities
/** @type { (xs: bigint[]) => bigint } */
const sum = xs => xs.reduce((acc, x) => acc + x, 0n);

/**
* @param {import('@endo/patterns').CopyBag} bag
* @returns {bigint[]}
*/
const bagCounts = bag => {
const entries = getCopyBagEntries(bag);
return entries.map(([_k, ct]) => ct);
};
// #endregion

/**
* In addition to the standard `issuers` and `brands` terms,
* this contract is parameterized by terms for price and,
Expand Down Expand Up @@ -75,8 +56,8 @@ const bagCounts = bag => {
export const start = async zcf => {
const {
subscriptionPrice,
subscriptionPeriod = 'MONTHLY',
serviceToAvail = 'NETFLIX',
// subscriptionPeriod = 'MONTHLY',
// serviceToAvail = 'NETFLIX',
} = zcf.getTerms();

/**
Expand Down

0 comments on commit 3166cfc

Please sign in to comment.