pull/7/head
yann300 6 years ago
parent fe6f67e1e0
commit 483766b68a
  1. 6
      remix-lib/src/execution/txRunner.js

@ -48,20 +48,18 @@ class TxRunner {
return callback(err, resp) return callback(err, resp)
} }
self.event.trigger('transactionBroadcasted', [resp]) self.event.trigger('transactionBroadcasted', [resp])
var listenOnResponse = () => { var listenOnResponse = () => {
return new Promise(async (resolve, reject) => { return new Promise(async (resolve, reject) => {
var result = await tryTillReceiptAvailable(resp) var result = await tryTillReceiptAvailable(resp)
tx = await tryTillTxAvailable(resp) tx = await tryTillTxAvailable(resp)
resolve({ resolve({
result, result,
tx, tx,
transactionHash: result ? result.transactionHash : null, transactionHash: result ? result.transactionHash : null
}) })
}) })
} }
listenOnResponse().then((txData) => { callback(null, txData) }).catch((error) => { callback(error) }) listenOnResponse().then((txData) => { callback(null, txData) }).catch((error) => { callback(error) })
} }
var args = pass !== null ? [tx, pass, cb] : [tx, cb] var args = pass !== null ? [tx, pass, cb] : [tx, cb]
try { try {

Loading…
Cancel
Save