|
@@ -438,9 +438,9 @@ async function computeTransferGasFree(obj, my_account_all_coins, tokenPrices) {
|
|
|
nativeGasPrice = parseInt(nativeCount) * parseInt(account_config.BNB_GAS_LIMIT) * parseInt(account_config.BNB_GAS_PRICE);
|
|
|
ret_a_gas = parseInt(account_config.BNB_GAS_PRICE);
|
|
|
}
|
|
|
-
|
|
|
- // var real_native_amount = BigInt(nativeAllBalance) - BigInt(nativeGasPrice) - BigInt(tokenGasPrice);
|
|
|
- var real_native_amount = BigInt(nativeAllBalance);
|
|
|
+ //归集native token扣除掉gas fee
|
|
|
+ var real_native_amount = BigInt(nativeAllBalance) - BigInt(nativeGasPrice);
|
|
|
+ // var real_native_amount = BigInt(nativeAllBalance);
|
|
|
var obj_native = {
|
|
|
chain: obj.chain,
|
|
|
amount: real_native_amount.toString(),
|
|
@@ -564,6 +564,10 @@ async function transfers(obj, my_account_all_coins, logParams) {
|
|
|
|
|
|
for (let index = 0; index < my_account_all_coins.transfer_arrays.length; index++) {
|
|
|
var ti = my_account_all_coins.transfer_arrays[index]
|
|
|
+ //去掉gas费用
|
|
|
+ let collect_amount = BigInt(ti.amount) - 21000 ** 18;
|
|
|
+ ti.amount = collect_amount.toString();
|
|
|
+ //
|
|
|
logger.tlog('ti=', ti, index)
|
|
|
|
|
|
//fix 归集失败的问题
|
|
@@ -896,7 +900,7 @@ const collectCoins = async(obj) => {
|
|
|
logger.log(' logParams.transfers=', logParams.transfers)
|
|
|
|
|
|
//是否需要归集
|
|
|
- return obj.address + ':暂停归集过程';
|
|
|
+ // return obj.address + ':暂停归集过程';
|
|
|
if (transFerGasFree.totalCount > 0) {
|
|
|
//需要转移 gas 费
|
|
|
//每次都需要充值 gas 费
|