Fix the issue with deposit

This commit is contained in:
hirunda 2022-12-21 20:26:43 +01:00
parent ffeff54090
commit 53bc75a850

View file

@ -809,15 +809,11 @@ bool sidechain_net_handler_bitcoin::process_proposal(const proposal_object &po)
tx_address = address;
break;
}
std::string tx_amount_s = input.second.get<std::string>("value");
tx_amount_s.erase(std::remove(tx_amount_s.begin(), tx_amount_s.end(), '.'), tx_amount_s.end());
tx_amount = std::stoll(tx_amount_s);
break;
}
tx_amount = input.tx_amount;
break;
}
}
process_ok = (swdo_txid == tx_txid) &&
(swdo_address == tx_address) &&
@ -825,7 +821,6 @@ bool sidechain_net_handler_bitcoin::process_proposal(const proposal_object &po)
(swdo_vout == tx_vout) &&
(gpo.parameters.son_bitcoin_min_tx_confirmations() <= tx_confirmations);
}
}
object_id_type object_id = op_obj_idx_1.get<sidechain_transaction_create_operation>().object_id;
std::string op_tx_str = op_obj_idx_1.get<sidechain_transaction_create_operation>().transaction;
@ -1242,6 +1237,7 @@ bool sidechain_net_handler_bitcoin::settle_sidechain_transaction(const sidechain
settle_amount = asset(tx_amount, database.get_global_properties().parameters.btc_asset());
return true;
}
}
if (sto.object_id.is<son_wallet_withdraw_id_type>()) {
auto swwo = database.get<son_wallet_withdraw_object>(sto.object_id);
@ -1249,7 +1245,6 @@ bool sidechain_net_handler_bitcoin::settle_sidechain_transaction(const sidechain
return true;
}
}
}
return false;
}