aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-utils.js
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-07-14 03:25:43 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-07-14 03:25:43 +0800
commit7eccf5905a830853bbb1932dde9a7f4536d43f55 (patch)
tree7f7b8b67b0e02e215b393ec95355f7dd4560649a /app/scripts/lib/tx-utils.js
parentd6001daab81f1ad8b011363635dbe61322c1482a (diff)
downloadtangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar.gz
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar.bz2
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar.lz
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar.xz
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.tar.zst
tangerine-wallet-browser-7eccf5905a830853bbb1932dde9a7f4536d43f55.zip
make publishTransaction and signTransaction async methods
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-rw-r--r--app/scripts/lib/tx-utils.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js
index aa0cb624f..8f6943937 100644
--- a/app/scripts/lib/tx-utils.js
+++ b/app/scripts/lib/tx-utils.js
@@ -106,8 +106,13 @@ module.exports = class txProviderUtils {
return ethTx
}
- publishTransaction (rawTx, cb) {
- this.query.sendRawTransaction(rawTx, cb)
+ publishTransaction (rawTx) {
+ return new Promise((resolve, reject) => {
+ this.query.sendRawTransaction(rawTx, (err, ress) => {
+ if (err) reject(err)
+ else resolve(ress)
+ })
+ })
}
validateTxParams (txParams, cb) {