if (recipients.length != tokens.length) {errorMessage='Invalid recipient/token IDs provided; please review';return;}
if (recipients.length != tokens.length) {errorMessage='Invalid recipient/token IDs provided; please review';return;}
await estimateCBT(recipients, tokens);
await estimateCBT(recipients, tokens);
await estimateSTF(recipients, tokens);
await estimateSTF(recipients, tokens);
let gasPrice = await $web3.eth.getGasPrice();
// let gasPrice = await $web3.eth.getGasPrice();
let gasPrice = 20000000000;
let gasCostEth = await $web3.utils.fromWei((gasPrice * gasLimit).toString());
let gasCostEth = await $web3.utils.fromWei((gasPrice * gasLimit).toString());
let si_gasCostEth = await $web3.utils.fromWei((gasPrice * si_gasLimit).toString());
let feeWei = await $contracts.sendit.methods.usageFee().call();
gasCalculation = `Transferring each token individual would require ${gasLimit} gas (${gasCostEth} Ξ). SendIt can do it for ${si_gasLimit} gas (${si_gasCostEth} Ξ).`;
let totalFeeWei = feeWei * recipients.length;
let si_gasCostWei = gasPrice * si_gasLimit + totalFeeWei;
let si_gasCostEth = await $web3.utils.fromWei(si_gasCostWei.toString());
gasCalculation = `Transferring each token individual would require ${gasLimit} gas (${gasCostEth} Ξ). SendIt can do it for ${si_gasLimit} gas + a fee (${si_gasCostEth} Ξ).`;