diff options
author | Dan <danjm.com@gmail.com> | 2018-06-29 07:33:09 +0800 |
---|---|---|
committer | Dan <danjm.com@gmail.com> | 2018-06-29 07:33:09 +0800 |
commit | 696d6261338e96a3a7786e08940ab51cad98cb22 (patch) | |
tree | 839dbce5ab038b898232e065597e091bc3296ea6 /ui/app/components/send_/tests/send-utils.test.js | |
parent | 9f5ee94b6937c741684de5e70ac0f9fea5f50226 (diff) | |
download | tangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.tar.gz tangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.tar.zst tangerine-wallet-browser-696d6261338e96a3a7786e08940ab51cad98cb22.zip |
Set based estimate for token sends to be updated once recipient address specified.
Diffstat (limited to 'ui/app/components/send_/tests/send-utils.test.js')
-rw-r--r-- | ui/app/components/send_/tests/send-utils.test.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ui/app/components/send_/tests/send-utils.test.js b/ui/app/components/send_/tests/send-utils.test.js index f3d5674b7..a518a64e9 100644 --- a/ui/app/components/send_/tests/send-utils.test.js +++ b/ui/app/components/send_/tests/send-utils.test.js @@ -2,6 +2,7 @@ import assert from 'assert' import sinon from 'sinon' import proxyquire from 'proxyquire' import { + BASE_TOKEN_GAS_COST, ONE_GWEI_IN_WEI_HEX, SIMPLE_GAS_COST, } from '../send.constants' @@ -336,6 +337,11 @@ describe('send utils', () => { assert.notEqual(result, SIMPLE_GAS_COST) }) + it(`should return ${BASE_TOKEN_GAS_COST} if passed a selectedToken but no to address`, async () => { + const result = await estimateGas(Object.assign({}, baseMockParams, { to: null, selectedToken: { address: '' } })) + assert.equal(result, BASE_TOKEN_GAS_COST) + }) + it(`should return the adjusted blockGasLimit if it fails with a 'Transaction execution error.'`, async () => { const result = await estimateGas(Object.assign({}, baseMockParams, { to: 'isContract willFailBecauseOf:Transaction execution error.', |