aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/idStore-test.js
diff options
context:
space:
mode:
authorDan Finlay <dan@danfinlay.com>2017-01-03 09:32:51 +0800
committerDan Finlay <dan@danfinlay.com>2017-01-03 09:32:51 +0800
commit2dbbc0dce71d5d58141eb7b9440efaeddeea03c9 (patch)
tree8c651b8778a7114a780b56d90c705527295b1d07 /test/unit/idStore-test.js
parent5e8a344f973fabb331db9b491247396117aa67b1 (diff)
parentfc9c03d4d17ba558e9888119193036a87256c94d (diff)
downloadtangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar.gz
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar.bz2
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar.lz
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar.xz
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.tar.zst
tangerine-wallet-browser-2dbbc0dce71d5d58141eb7b9440efaeddeea03c9.zip
Merge remote-tracking branch 'origin/kumavis-readme-gource' into RevertTxManager
Diffstat (limited to 'test/unit/idStore-test.js')
-rw-r--r--test/unit/idStore-test.js50
1 files changed, 0 insertions, 50 deletions
diff --git a/test/unit/idStore-test.js b/test/unit/idStore-test.js
index 3ca89cd38..000c58a82 100644
--- a/test/unit/idStore-test.js
+++ b/test/unit/idStore-test.js
@@ -139,54 +139,4 @@ describe('IdentityStore', function() {
})
})
})
-
- describe('#addGasBuffer', function() {
- it('formats the result correctly', function() {
- const idStore = new IdentityStore({
- configManager: configManagerGen(),
- ethStore: {
- addAccount(acct) { accounts.push(ethUtil.addHexPrefix(acct)) },
- },
- })
-
- const gas = '0x01'
- const bnGas = new BN(gas, 16)
- const bnResult = idStore.addGasBuffer(bnGas)
-
- assert.ok(bnResult.gt(gas), 'added more gas as buffer.')
- })
-
- it('buffers 20%', function() {
- const idStore = new IdentityStore({
- configManager: configManagerGen(),
- ethStore: {
- addAccount(acct) { accounts.push(ethUtil.addHexPrefix(acct)) },
- },
- })
-
- const gas = '0x04ee59' // Actual estimated gas example
- const bnGas = new BN(ethUtil.stripHexPrefix(gas), 16)
- const five = new BN('5', 10)
- const correctBuffer = bnGas.div(five)
- const correct = bnGas.add(correctBuffer)
-
- const bnResult = idStore.addGasBuffer(bnGas)
-
- assert(bnResult.gt(bnGas), 'Estimate increased in value.')
- assert.equal(bnResult.sub(bnGas).toString(10), correctBuffer.toString(10), 'added 20% gas')
- })
- })
-
- describe('#checkForDelegateCall', function() {
- const idStore = new IdentityStore({
- configManager: configManagerGen(),
- ethStore: {
- addAccount(acct) { accounts.push(ethUtil.addHexPrefix(acct)) },
- },
- })
-
- var result = idStore.checkForDelegateCall(delegateCallCode)
- assert.equal(result, true, 'no delegate call in provided code')
- })
-
})