Skip to content

Commit 1be91de

Browse files
committed
chore: inline makeTradeInvitation function
1 parent 1f935b2 commit 1be91de

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

contract/src/offer-up.contract.js

+2-12
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ import { makeDurableZone } from '@agoric/zone/durable.js';
3535

3636
const { Fail, quote: q } = assert;
3737

38-
3938
// #region bag utilities
4039
/** @type { (xs: bigint[]) => bigint } */
4140
const sum = xs => xs.reduce((acc, x) => acc + x, 0n);
@@ -135,19 +134,10 @@ export const start = async (zcf, _privateArgs, baggage) => {
135134
return 'trade complete';
136135
};
137136

138-
/**
139-
* Make an invitation to trade for items.
140-
*
141-
* Proposal Keywords used in offers using these invitations:
142-
* - give: `Price`
143-
* - want: `Items`
144-
*/
145-
const makeTradeInvitation = () =>
146-
zcf.makeInvitation(tradeHandler, 'buy items', undefined, proposalShape);
147-
148137
// Use zone.exo to make a publicFacet suitable for use by remote callers.
149138
const publicFacet = zone.exo('Items Public Facet', undefined, {
150-
makeTradeInvitation,
139+
makeTradeInvitation: () =>
140+
zcf.makeInvitation(tradeHandler, 'buy items', undefined, proposalShape),
151141
});
152142
return harden({ publicFacet });
153143
};

0 commit comments

Comments
 (0)