aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2016-11-24 08:54:27 +0800
committerDan Finlay <dan@danfinlay.com>2016-11-24 08:54:27 +0800
commitb8991195829474691f17db3a7a6c9c081f9a95c9 (patch)
treea68a7c2529a82f4634913755bfc3f781f9476c3c /test/unit
parentb9b3ef8fedc848cbebc60eab70b90aa4f75060f2 (diff)
parent323f3cb1a05947f320f77fc3e87c9d6c70ea1900 (diff)
downloadtangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar.gz
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar.bz2
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar.lz
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar.xz
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.tar.zst
tangerine-wallet-browser-b8991195829474691f17db3a7a6c9c081f9a95c9.zip
Merge branch 'master' into dev
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/idStore-test.js9
1 files changed, 2 insertions, 7 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index 72ecf34d5..3ca89cd38 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -151,11 +151,9 @@ describe('IdentityStore', function() {
const gas = '0x01'
const bnGas = new BN(gas, 16)
- const result = idStore.addGasBuffer(gas)
- const bnResult = new BN(result, 16)
+ const bnResult = idStore.addGasBuffer(bnGas)
assert.ok(bnResult.gt(gas), 'added more gas as buffer.')
- assert.equal(result.indexOf('0x'), 0, 'include hex prefix')
})
it('buffers 20%', function() {
@@ -172,13 +170,10 @@ describe('IdentityStore', function() {
const correctBuffer = bnGas.div(five)
const correct = bnGas.add(correctBuffer)
- const result = idStore.addGasBuffer(gas)
- const bnResult = new BN(ethUtil.stripHexPrefix(result), 16)
+ const bnResult = idStore.addGasBuffer(bnGas)
- assert.equal(result.indexOf('0x'), 0, 'included hex prefix')
assert(bnResult.gt(bnGas), 'Estimate increased in value.')
assert.equal(bnResult.sub(bnGas).toString(10), correctBuffer.toString(10), 'added 20% gas')
- assert.equal(result, '0x' + correct.toString(16), 'Added the right amount')
})
})