aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/idStore-test.js
diff options
context:
space:
mode:
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')
- })
-
})