Skip to content

Commit

Permalink
#1100 swap API
Browse files Browse the repository at this point in the history
is_my_offer & is_public only for SwapOfferStatus::Pending
  • Loading branch information
echoby committed Feb 18, 2020
1 parent f715a6d commit 1b9e806
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions wallet/api/api.cpp
Expand Up @@ -225,12 +225,12 @@ json OfferToJson(const SwapOffer& offer,
{"receive_currency", receiveCurrency},
{"time_created", createTimeStr},
{"time_expired", expiresTimeStr},
{"is_my_offer", isOwnOffer},
{"is_public", isPublic},
};

if (offer.m_status == SwapOfferStatus::Pending)
{
result["is_my_offer"] = isOwnOffer;
result["is_public"] = isPublic;
if (isOwnOffer && !isPublic)
{
const auto& mirroredTxParams = MirrorSwapTxParams(offer);
Expand Down

0 comments on commit 1b9e806

Please sign in to comment.