Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change 'Trade Successful' offerResult to 'Order Added' #1651

Merged
merged 1 commit into from
Sep 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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