Skip to content

Instantly share code, notes, and snippets.

@katelynsills
Created November 2, 2019 02:09
Show Gist options
  • Save katelynsills/40b8fc89fdce67f5f6097838458eae63 to your computer and use it in GitHub Desktop.
Save katelynsills/40b8fc89fdce67f5f6097838458eae63 to your computer and use it in GitHub Desktop.
Automatic Refund
export const makeContract = (zoe, terms) => {
return {
instance: {
makeOffer: async escrowReceipt => {
const { offerHandle } = await zoe.burnEscrowReceipt(escrowReceipt);
zoe.complete([offerHandle]);
},
},
assays: terms.assays,
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment