diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index 3f84adec..10c0f46a 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -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;