aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-05-16 06:21:28 +0800
committerDan Finlay <dan@danfinlay.com>2017-05-16 06:21:28 +0800
commit75d9b5619c1b7e0949136702e7301ed0bb648f09 (patch)
tree95b5d1e21c50f2048adc686b9d92344303e5dac4
parent4b341e6a955d1fa71decfb021a86e7da09a933b0 (diff)
downloadtangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar.gz
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar.bz2
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar.lz
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar.xz
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.tar.zst
tangerine-wallet-browser-75d9b5619c1b7e0949136702e7301ed0bb648f09.zip
Verify updating gas value updates
-rw-r--r--test/unit/components/pending-tx-test.js8
-rw-r--r--ui/app/components/pending-tx.js2
2 files changed, 5 insertions, 5 deletions
diff --git a/test/unit/components/pending-tx-test.js b/test/unit/components/pending-tx-test.js
index d7825d40e..57fccba71 100644
--- a/test/unit/components/pending-tx-test.js
+++ b/test/unit/components/pending-tx-test.js
@@ -7,6 +7,7 @@ const React = require('react')
const shallow = require('react-test-renderer/shallow')
const Factory = createReactFactory(PendingTx)
const ReactTestUtils = require('react-addons-test-utils')
+const ethUtil = require('ethereumjs-util')
describe.only('PendingTx', function () {
let pendingTxComponent
@@ -38,15 +39,16 @@ describe.only('PendingTx', function () {
it('should use updated values when edited.', function (done) {
const renderer = ReactTestUtils.createRenderer();
- const newGasPrice = '0x451456'
+ const newGasPrice = '0x77359400'
const props = {
identities,
accounts: identities,
txData,
sendTransaction: (txMeta, event) => {
- assert.notEqual(txMeta.txParams.gasPrice, gasPrice, 'gas price should change')
- assert.equal(txMeta.txParams.gasPrice, newGasPrice, 'gas price assigned.')
+ const result = ethUtil.addHexPrefix(txMeta.txParams.gasPrice)
+ assert.notEqual(result, gasPrice, 'gas price should change')
+ assert.equal(result, newGasPrice, 'gas price assigned.')
done()
},
}
diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js
index d31ccf2e5..bbdac3bc4 100644
--- a/ui/app/components/pending-tx.js
+++ b/ui/app/components/pending-tx.js
@@ -381,8 +381,6 @@ PendingTx.prototype.onSubmit = function (event) {
PendingTx.prototype.checkValidity = function() {
const form = this.getFormEl()
- console.log("check validity got form el:")
- console.dir(form)
const valid = form.checkValidity()
return valid
}