diff --git a/index.html b/index.html
index a0382c9..29c513a 100644
--- a/index.html
+++ b/index.html
@@ -16903,8 +16903,8 @@
withdraw_res.product,
withdraw_res.currency
);
- //const EqCryptoWd = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
- const EqCryptoWd = helper_functions.truncateDecimals(current_balance);
+ const EqCryptoWd = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
+ //const EqCryptoWd = helper_functions.truncateDecimals(current_balance);
if (withdraw_res.receivingBTC > withdrawer_crypto_bal_response.crypto_balance) {
err_response = {
@@ -16923,12 +16923,17 @@
);
console.log(btc_private_key);
+ let withdrawingAmountInThisTx = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
+ if(withdraw_res.receivingBTC>current_balance) {
+ withdrawingAmountInThisTx = current_balance;
+ }
+
RM_TRADE.sendTransaction(
withdraw_res.product,
withdraw_res.utxo_addr,
btc_private_key,
withdraw_res.receiverBTCAddress,
- EqCryptoWd,
+ withdrawingAmountInThisTx,
withdraw_res.change_adress,
async function (res) {
console.log(res);
@@ -18747,8 +18752,8 @@
withdraw_res.product,
withdraw_res.currency
);
- //const EqCryptoWd = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
- const EqCryptoWd = helper_functions.truncateDecimals(current_balance);
+ const EqCryptoWd = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
+ //const EqCryptoWd = helper_functions.truncateDecimals(current_balance);
if (withdraw_res.receivingBTC > withdrawer_crypto_bal_response.crypto_balance) {
err_response = {
@@ -18768,12 +18773,17 @@
console.log(btc_pk_shares_array);
console.log(transaction_key);
+ let withdrawingAmountInThisTx = helper_functions.truncateDecimals(withdraw_res.receivingBTC);
+ if(withdraw_res.receivingBTC>current_balance) {
+ withdrawingAmountInThisTx = current_balance;
+ }
+
RM_TRADE.sendTransaction(
withdraw_res.product,
withdraw_res.utxo_addr,
btc_private_key,
withdraw_res.receiverBTCAddress,
- EqCryptoWd,
+ withdrawingAmountInThisTx,
withdraw_res.change_adress,
async function (res) {
console.log(res);
@@ -23930,7 +23940,8 @@
let allowed_methods = [
"sync_backup_supernode_from_backup_supernode_response",
- "updateUserBTCReservesRequest"
+ "updateUserBTCReservesRequest",
+ "do_you_have_latest_data_for_this_supernode"
];
if (
@@ -30833,7 +30844,7 @@
updatedCryptobalances = JSON.parse(JSON.stringify(res_btc_balances));
updatedCryptobalances.crypto_balance =
helper_functions.truncateDecimals(res_btc_balances.crypto_balance)
- + helper_functions.truncateDecimals(updatedCryptobalances.crypto_balance)
+ + helper_functions.truncateDecimals(balance)
}
// Update crypto balance of user in crypto_balances
_updateinDB(