Skip to content

Commit

Permalink
fix: change 'Trade Successful' offerResult to 'Order Added'
Browse files Browse the repository at this point in the history
  • Loading branch information
katelynsills committed Sep 1, 2020
1 parent 76bcb9d commit 70fcce6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/zoe/src/contracts/simpleExchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ const start = zcf => {

const sell = seat => {
buySeats = swapIfCanTradeAndUpdateBook(buySeats, sellSeats, seat);
return 'Trade Successful';
return 'Order Added';
};

const sellHandler = assertProposalShape(sell, sellAssetForPrice);
Expand All @@ -114,7 +114,7 @@ const start = zcf => {

const buy = seat => {
sellSeats = swapIfCanTradeAndUpdateBook(sellSeats, buySeats, seat);
return 'Trade Successful';
return 'Order Added';
};

const buyHandler = assertProposalShape(buy, buyAssetForPrice);
Expand Down
14 changes: 7 additions & 7 deletions packages/zoe/test/swingsetTests/zoe/test-zoe.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,8 @@ test.serial('zoe - atomicSwap - valid inputs', async t => {

const expectedSimpleExchangeOkLog = [
'=> alice, bob, carol and dave are set up',
'Trade Successful',
'Trade Successful',
'Order Added',
'Order Added',
'bobMoolaPurse: balance {"brand":{},"value":3}',
'bobSimoleanPurse: balance {"brand":{},"value":3}',
'aliceMoolaPurse: balance {"brand":{},"value":0}',
Expand All @@ -211,21 +211,21 @@ const expectedSimpleExchangeNotificationLog = [
'=> alice, bob, carol and dave are set up',
'{"buys":[],"sells":[]}',
'{"buys":[],"sells":[{"want":{"Price":{"brand":{},"value":4}},"give":{"Asset":{"brand":{},"value":3}}}]}',
'Trade Successful',
'Order Added',
'{"buys":[],"sells":[]}',
'Trade Successful',
'Order Added',
'bobMoolaPurse: balance {"brand":{},"value":0}',
'bobSimoleanPurse: balance {"brand":{},"value":20}',
'{"buys":[{"want":{"Asset":{"brand":{},"value":8}},"give":{"Price":{"brand":{},"value":2}}}],"sells":[]}',
'Trade Successful',
'Order Added',
'bobMoolaPurse: balance {"brand":{},"value":3}',
'bobSimoleanPurse: balance {"brand":{},"value":18}',
'{"buys":[{"want":{"Asset":{"brand":{},"value":8}},"give":{"Price":{"brand":{},"value":2}}},{"want":{"Asset":{"brand":{},"value":20}},"give":{"Price":{"brand":{},"value":13}}}],"sells":[]}',
'Trade Successful',
'Order Added',
'bobMoolaPurse: balance {"brand":{},"value":3}',
'bobSimoleanPurse: balance {"brand":{},"value":5}',
'{"buys":[{"want":{"Asset":{"brand":{},"value":8}},"give":{"Price":{"brand":{},"value":2}}},{"want":{"Asset":{"brand":{},"value":20}},"give":{"Price":{"brand":{},"value":13}}},{"want":{"Asset":{"brand":{},"value":5}},"give":{"Price":{"brand":{},"value":2}}}],"sells":[]}',
'Trade Successful',
'Order Added',
'bobMoolaPurse: balance {"brand":{},"value":3}',
'bobSimoleanPurse: balance {"brand":{},"value":3}',
'aliceMoolaPurse: balance {"brand":{},"value":0}',
Expand Down
8 changes: 4 additions & 4 deletions packages/zoe/test/unitTests/contracts/test-simpleExchange.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ test('simpleExchange with valid offers', async t => {
`order notifier is updated when Bob fulfills the order`,
);

assertOfferResult(t, bobSeat, 'Trade Successful');
assertOfferResult(t, aliceSeat, 'Trade Successful');
assertOfferResult(t, bobSeat, 'Order Added');
assertOfferResult(t, aliceSeat, 'Order Added');

const {
Asset: bobMoolaPayout,
Expand Down Expand Up @@ -374,8 +374,8 @@ test('simpleExchange with non-fungible assets', async t => {
bobPayments,
);

assertOfferResult(t, bobSeat, 'Trade Successful');
assertOfferResult(t, aliceSeat, 'Trade Successful');
assertOfferResult(t, bobSeat, 'Order Added');
assertOfferResult(t, aliceSeat, 'Order Added');

const {
Asset: bobRpgPayout,
Expand Down

0 comments on commit 70fcce6

Please sign in to comment.