aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib
diff options
context:
space:
mode:
authorfrankiebee <frankie.diamond@gmail.com>2017-08-03 06:58:05 +0800
committerfrankiebee <frankie.diamond@gmail.com>2017-08-03 06:59:34 +0800
commitb80c7e417bfa3adf338170472ba4c4c6733e8402 (patch)
tree82ed6f3930cdea74edcd8b081112298b8acf613c /app/scripts/lib
parent25bc15ba175091513f6d281e9a16f3643fe4b18d (diff)
downloadtangerine-wallet-browser-b80c7e417bfa3adf338170472ba4c4c6733e8402.tar.gz
tangerine-wallet-browser-b80c7e417bfa3adf338170472ba4c4c6733e8402.tar.zst
tangerine-wallet-browser-b80c7e417bfa3adf338170472ba4c4c6733e8402.zip
move newUnapprovedTransaction to transactions.js
Diffstat (limited to 'app/scripts/lib')
-rw-r--r--app/scripts/lib/tx-utils.js12
1 files changed, 4 insertions, 8 deletions
diff --git a/app/scripts/lib/tx-utils.js b/app/scripts/lib/tx-utils.js
index 24ea2d763..0e5b6a999 100644
--- a/app/scripts/lib/tx-utils.js
+++ b/app/scripts/lib/tx-utils.js
@@ -86,14 +86,10 @@ module.exports = class txProvideUtils {
return this.query.sendRawTransaction(rawTx)
}
- validateTxParams (txParams) {
- return new Promise((resolve, reject) => {
- if (('value' in txParams) && txParams.value.indexOf('-') === 0) {
- reject(new Error(`Invalid transaction value of ${txParams.value} not a positive number.`))
- } else {
- resolve()
- }
- })
+ async validateTxParams (txParams) {
+ if (('value' in txParams) && txParams.value.indexOf('-') === 0) {
+ throw new Error(`Invalid transaction value of ${txParams.value} not a positive number.`)
+ }
}
sufficientBalance (txParams, hexBalance) {