Skip to content

Commit

Permalink
chore(a3p): move declare offer id inside its body
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorge-Lopes committed Oct 29, 2024
1 parent 02d3b8a commit 5645723
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions a3p-integration/proposals/z:acceptance/test-lib/kread.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,11 +132,10 @@ export const totalAssetPriceAmount = asset => {
return price;
};
const mintCharacterOffer = async () => {
const id = `KREAd-mint-character-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-mint-character-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand Down Expand Up @@ -176,11 +175,10 @@ const unequipAllItemsOffer = async address => {
kreadCharacter2,
);

const id = `KREAd-unequip-all-items-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-unequip-all-items-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand All @@ -207,11 +205,10 @@ const buyItemOffer = async () => {
const itemAmount = assetAsAmount(brands.KREAdITEM, marketItem.asset);
const priceAmount = totalAssetPriceAmount(marketItem);

const id = `KREAd-buy-item-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-buy-item-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand Down Expand Up @@ -240,11 +237,10 @@ const sellItemOffer = async address => {

const itemAmount = assetAsAmount(brands.KREAdITEM, kreadItem);

const id = `KREAd-sell-item-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-sell-item-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand Down Expand Up @@ -276,11 +272,10 @@ const buyCharacterOffer = async () => {
);
const priceAmount = totalAssetPriceAmount(marketCharacter);

const id = `KREAd-buy-character-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-buy-character-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand Down Expand Up @@ -311,11 +306,10 @@ const sellCharacterOffer = async address => {
kreadCharacter,
);

const id = `KREAd-sell-character-acceptance-test`;
const body = {
method: 'executeOffer',
offer: {
id,
id: 'KREAd-sell-character-acceptance-test',
invitationSpec: {
source: 'agoricContract',
instancePath: ['kread'],
Expand Down

0 comments on commit 5645723

Please sign in to comment.