Skip to content

Commit

Permalink
Merge branch 'ms/replace-Far-with-zone.exo' of https://github.com/Ago…
Browse files Browse the repository at this point in the history
…ric/dapp-offer-up into ms/replace-Far-with-zone.exo
  • Loading branch information
amessbee committed Aug 7, 2024
2 parents 0afb0ac + 0b5ee61 commit ee9c6d1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@ jobs:
path: |
ui/test/e2e/videos
ui/test/e2e/screenshots
continue-on-error: true
continue-on-error: true
9 changes: 4 additions & 5 deletions contract/src/offer-up.contract.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
*/
// @ts-check

// import { Far } from '@endo/far';
// import { Far } from '@endo/far';
import { M, getCopyBagEntries } from '@endo/patterns';
import { AssetKind } from '@agoric/ertp/src/amountMath.js';
import { AmountShape } from '@agoric/ertp/src/typeGuards.js';
import { atomicRearrange } from '@agoric/zoe/src/contractSupport/atomicTransfer.js';
import '@agoric/zoe/exported.js';
import { makeDurableZone } from '@agoric/zone/durable.js';
const { Fail, quote: q } = assert;
import { makeScalarBigMapStore } from '@agoric/vat-data';

Expand Down Expand Up @@ -70,8 +70,8 @@ export const customTermsShape = meta.customTermsShape;
*
* @param {ZCF<OfferUpTerms>} zcf
*/
export const start = async zcf => {
const { tradePrice, maxItems = 3n } = zcf.getTerms();
export const start = async (zcf, _privateArgs, baggage) => {
const zone = makeDurableZone(baggage);

/**
* TODO: below is somewhat fake way of generating a zone. This should be fixed by passing it as a parameter.
Expand Down Expand Up @@ -143,8 +143,7 @@ export const start = async zcf => {
const makeTradeInvitation = () =>
zcf.makeInvitation(tradeHandler, 'buy items', undefined, proposalShape);

// Mark the publicFacet Far, i.e. reachable from outside the contract
// const myexo = makeExo('Items Public Facet', undefined);
// Use zone.exo to make a publicFacet suitable for use by remote callers.
const publicFacet = zone.exo('Items Public Facet', undefined, {
makeTradeInvitation,
});
Expand Down

0 comments on commit ee9c6d1

Please sign in to comment.