forked from lthn/blockchain
fix for contract cancellation issue with zero b pledge or zero (a pledge + amount) 276
This commit is contained in:
parent
0b1c1de8a8
commit
6a575c6d29
1 changed files with 6 additions and 0 deletions
|
|
@ -3047,6 +3047,12 @@ void wallet2::build_escrow_cancel_template(crypto::hash multisig_id,
|
|||
//generate cancel escrow proposal
|
||||
construct_params.dsts[0].amount = ecrow_details.amount_a_pledge + ecrow_details.amount_to_pay;
|
||||
construct_params.dsts[1].amount = ecrow_details.amount_b_pledge;
|
||||
|
||||
if (construct_params.dsts[0].amount == 0)
|
||||
construct_params.dsts.erase(construct_params.dsts.begin());
|
||||
else if (construct_params.dsts[1].amount == 0)
|
||||
construct_params.dsts.erase(construct_params.dsts.begin() + 1);
|
||||
|
||||
tx_service_attachment tsa = AUTO_VAL_INIT(tsa);
|
||||
tsa.service_id = BC_ESCROW_SERVICE_ID;
|
||||
tsa.instruction = BC_ESCROW_SERVICE_INSTRUCTION_RELEASE_CANCEL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue