Fix the issue with deposit
This commit is contained in:
parent
ffeff54090
commit
53bc75a850
1 changed files with 12 additions and 17 deletions
|
|
@ -809,22 +809,17 @@ 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) &&
|
||||
(swdo_amount == tx_amount) &&
|
||||
(swdo_vout == tx_vout) &&
|
||||
(gpo.parameters.son_bitcoin_min_tx_confirmations() <= tx_confirmations);
|
||||
}
|
||||
|
||||
process_ok = (swdo_txid == tx_txid) &&
|
||||
(swdo_address == tx_address) &&
|
||||
(swdo_amount == tx_amount) &&
|
||||
(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;
|
||||
|
|
@ -1209,7 +1204,7 @@ bool sidechain_net_handler_bitcoin::settle_sidechain_transaction(const sidechain
|
|||
return false;
|
||||
}
|
||||
|
||||
const chain::global_property_object &gpo = database.get_global_properties();
|
||||
const chain::global_property_object &gpo = database.get_global_properties();
|
||||
|
||||
using namespace bitcoin;
|
||||
std::vector<std::pair<fc::ecc::public_key, uint16_t>> pubkey_weights;
|
||||
|
|
@ -1242,12 +1237,12 @@ 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);
|
||||
settle_amount = asset(swwo.withdraw_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);
|
||||
settle_amount = asset(swwo.withdraw_amount, database.get_global_properties().parameters.btc_asset());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Reference in a new issue