|
|
|
@ -138,8 +138,6 @@ module.exports = class TransactionManager extends EventEmitter { |
|
|
|
|
|
|
|
|
|
// formats txParams so the keyringController can sign it
|
|
|
|
|
formatTxForSigining (txParams) { |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
try { |
|
|
|
|
var address = txParams.from |
|
|
|
|
var metaTx = this.getTx(txParams.metamaskId) |
|
|
|
|
var gasMultiplier = metaTx.gasMultiplier |
|
|
|
@ -156,11 +154,7 @@ module.exports = class TransactionManager extends EventEmitter { |
|
|
|
|
txParams.nonce = normalize(txParams.nonce) |
|
|
|
|
const ethTx = new Transaction(txParams) |
|
|
|
|
var txId = txParams.metamaskId |
|
|
|
|
resolve({ethTx, address, txId}) |
|
|
|
|
} catch (err) { |
|
|
|
|
reject(err) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
return Promise.resolve({ethTx, address, txId}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// receives a signed tx object and updates the tx hash
|
|
|
|
|