@@ -148,13 +148,12 @@ export async function reticketPointBetweenWallets({
149 progress(TRANSACTION_PROGRESS.SIGNING);
149 progress(TRANSACTION_PROGRESS.SIGNING);
151− const suggestedGasPrice = await getSuggestedGasPrice(networkType);
151+ const gasPriceGwei = (await getSuggestedGasPrice(networkType)).toFixed();
152 const chainId = await web3.eth.net.getId();
152 const chainId = await web3.eth.net.getId();
153− const gasPrice = safeToWei(suggestedGasPrice.toFixed(), 'gwei');
153+ const gasPriceWeiBN = toBN(safeToWei(gasPriceGwei, 'gwei'));
154− const gasPriceBN = toBN(gasPrice);
155 let inviteNonce = await web3.eth.getTransactionCount(fromWallet.address);
154 let inviteNonce = await web3.eth.getTransactionCount(fromWallet.address);
156 const totalCost = txs.reduce(
155 const totalCost = txs.reduce(
157− (acc, tx) => acc.add(gasPriceBN.mul(toBN(tx.gas))),
156+ (acc, tx) => acc.add(gasPriceWeiBN.mul(toBN(tx.gas))),
@@ -170,7 +169,7 @@ export async function reticketPointBetweenWallets({
170 txn: txs[i],
169 txn: txs[i],
171 nonce: inviteNonce + i,
170 nonce: inviteNonce + i,
173− gasPrice: suggestedGasPrice.toFixed(),
172+ gasPrice: gasPriceGwei,
174 gasLimit: txs[i].gas,
173 gasLimit: txs[i].gas,
176 txPairs.push({
175 txPairs.push({
@@ -215,29 +214,30 @@ export async function reticketPointBetweenWallets({
215 // if non-trivial eth left in invite wallet, transfer to new ownership
214 // if non-trivial eth left in invite wallet, transfer to new ownership
216 let balance = toBN(await web3.eth.getBalance(fromWallet.address));
215 let balance = toBN(await web3.eth.getBalance(fromWallet.address));
217 const gasLimit = GAS_LIMITS.SEND_ETH;
216 const gasLimit = GAS_LIMITS.SEND_ETH;
218− const sendEthCost = gasPriceBN.mul(toBN(gasLimit));
217+ const sendEthCost = gasPriceWeiBN.mul(toBN(gasLimit));
219 if (transferEth && balance.gt(sendEthCost)) {
218 if (transferEth && balance.gt(sendEthCost)) {
220− const value = balance.sub(sendEthCost);
220+ const value = balance.sub(sendEthCost);
221− const txn = {
221+ const txn = {
222− to: toWallet.ownership.keys.address,
222+ to: toWallet.ownership.keys.address,
223− value: value,
223+ value: value,
225− const stx = signTransaction({
225+ const stx = await signTransaction({
226− wallet: fromWallet,
226+ wallet: fromWallet,
227− walletType: fromWalletType,
227+ walletType: fromWalletType,
228− walletHdPath: fromWalletHdPath,
228+ walletHdPath: fromWalletHdPath,
230− chainId,
230+ chainId,
231− networkType,
231+ networkType,
232− gasPrice: gasPriceBN,
232+ gasPrice: gasPriceGwei,
233− gasLimit,
233+ gasLimit,
234− nonce: inviteNonce++,
234+ nonce: inviteNonce,
236− // let stx = new Tx(tx);
237− // stx.sign(fromWallet.privateKey);
238− sendSignedTransaction(web3, stx).catch(err => {
236+ sendSignedTransaction(web3, stx);
239− console.log('error sending value tx, who cares', err);
238+ console.log('error sending value tx, safely ignored:');
243 progress(TRANSACTION_PROGRESS.DONE);
243 progress(TRANSACTION_PROGRESS.DONE);