Skip to content

Commit

Permalink
Do not override user set expiry (#2738)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar authored Dec 15, 2023
1 parent fedfbb9 commit 1559121
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dfi/rpc_icxorderbook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,6 @@ UniValue icxmakeoffer(const JSONRPCRequest &request) {
strprintf("Address (%s) is not owned by the wallet", metaObj["ownerAddress"].getValStr()));
}

if (!metaObj["expiry"].isNull()) {
makeoffer.expiry = metaObj["expiry"].get_int();
}

int targetHeight;
{
LOCK(cs_main);
Expand Down Expand Up @@ -547,7 +543,11 @@ UniValue icxmakeoffer(const JSONRPCRequest &request) {
}

targetHeight = ::ChainActive().Height() + 1;
}

if (!metaObj["expiry"].isNull()) {
makeoffer.expiry = metaObj["expiry"].get_int();
} else {
if (targetHeight < Params().GetConsensus().DF10EunosPayaHeight) {
makeoffer.expiry = CICXMakeOffer::DEFAULT_EXPIRY;
} else {
Expand Down

0 comments on commit 1559121

Please sign in to comment.