Skip to content

Commit

Permalink
RPC: rename "subaction" to "action" in DEx RPC tx objects
Browse files Browse the repository at this point in the history
  • Loading branch information
zathras-crypto committed May 27, 2015
1 parent 183aa28 commit 803e488
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/omnicore/rpctxobject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,9 +230,9 @@ void populateRPCTypeTradeOffer(CMPTransaction& omniObj, Object& txobj)
txobj.push_back(Pair("amount", FormatMP(propertyId, amount)));
txobj.push_back(Pair("feerequired", FormatDivisibleMP(temp_offer.getMinFee())));
txobj.push_back(Pair("timelimit", temp_offer.getBlockTimeLimit()));
if (sell_subaction == 1) txobj.push_back(Pair("subaction", "new"));
if (sell_subaction == 2) txobj.push_back(Pair("subaction", "update"));
if (sell_subaction == 3) txobj.push_back(Pair("subaction", "cancel"));
if (sell_subaction == 1) txobj.push_back(Pair("action", "new"));
if (sell_subaction == 2) txobj.push_back(Pair("action", "update"));
if (sell_subaction == 3) txobj.push_back(Pair("action", "cancel"));
txobj.push_back(Pair("bitcoindesired", FormatDivisibleMP(temp_offer.getBTCDesiredOriginal())));
}

Expand Down

1 comment on commit 803e488

@dexX7
Copy link

@dexX7 dexX7 commented on 803e488 May 27, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! :) Thanks. I'm going to adopt this for the RPC tests in the next days.

Currently mostly the logic is tested (i.e. correct balances etc.), but not so much the actual fields, and it would probably good to test that, too, for example to notice, if some fields were changed by accident or similar.

Please sign in to comment.