aboutsummaryrefslogtreecommitdiffstats
path: root/app/scripts/lib/tx-utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/scripts/lib/tx-utils.js')
-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) {