aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/app
Commit message (Collapse)AuthorAgeFilesLines
* Declare variables before use (#6806)Mark Stacey2019-07-061-13/+12
| | | | | | | | | | | | | | | | While working on #6805, I noticed that many variables were being used before they were declared. Technically this worked fine in practice because we were using the `transform-es2015-block-scoping` Babel plugin, which transforms `let` and `const` to `var`, which is hoisted. However, after removing that Babel transformation, many things broke. All instances of variables or classes being used before declared have been fixed. The `no-use-before-define` eslint rule has been added to catch these cases going forward. The rule is disabled for function declarations for the moment, because those are always hoisted. We could disable that too if we want to, but it's purely stylistic and would require a lot more changes.
* Validate txParams in TransactionStateManager.addTx (#6713)Akshit Kr Nagpal2019-06-291-0/+62
| | | | | | | | * Normalize and Validate txParams in TransactionStateManager.addTx too * Added Tests * Updated normalizeAndValidateParams to return the new txParams
* feature: integrate gaba/CurrencyRateController (#6570)Paul Bouchon2019-06-012-80/+7
|
* transactions/deps - use broken out nonce-tracker module (#6555)Frankie2019-05-211-238/+0
|
* drop transactions who's nonce is lower then the known network nonce but were ↵Frankie2019-05-161-5/+67
| | | | | | | | | | | | | | | | | | | | | | not included in a block (#6388) * transactions/pending - check nonce against the network and mark as dropped if not included in a block * transactions/pending - unifiy "dropped" txs * transactions/pending - test - fix for new expected behavior * fix comment * transactions/pending - clean up dropped event * fix spelling Co-Authored-By: frankiebee <frankie.diamond@gmail.com> * nit fix * test/tx-pending - clarify test description
* feature: integrate gaba/ShapeShiftController (#6569)Paul Bouchon2019-05-151-1/+1
|
* Set a default value for code in _determineTransactionCategory (#6604)Dan J Miller2019-05-151-0/+87
| | | | | | | | | | * Set a default value for code in _determineTransactionCategory * Adds e2e tests that fail when token txs without gas param are not properly handled. * Adds unit tests for _determineTransactionCategory * Base error throwing and simple gas setting in estimateTxGas on transactionCategory
* Merge pull request #6568 from MetaMask/feature/gaba-phishing-controllerThomas Huang2019-05-112-58/+1
|\ | | | | feature: integrate gaba/PhishingController
| * feature: integrate gaba/PhishingControllerbitpshr2019-05-092-58/+1
| |
* | New settings custom rpc form (#6490)Dan J Miller2019-05-101-3/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add networks tab to settings, with header. * Adds network list to settings network tab. * Adds form to settings networks tab and connects it to network list. * Network tab: form adding and editing working * Settings network form properly handles input errors * Add translations for settings network form * Clean up styles of settings network tab. * Add popup-view styles and behaviour to settings network tab. * Fix save button on settings network form * Adds 'Add Network' button and addMode to settings networks tab * Lint fix for settings networks tab addition * Fix navigation in settings networks tab. * Editing an rpcurl in networks tab does not create new network, just changes rpc of old * Fix layout of settings tabs other than network * Networks dropdown 'Custom Rpc' item links to networks tab in settings. * Update settings sidebar networks subheader. * Make networks tab buttons width consistent with input widths in extension view. * Fix settings screen subheader height in popup view * Fix height of add networks button in popup view * Add optional label to chainId and symbol form labels in networks setting tab * Style fixes for networks tab headers * Add ability to customize block explorer used by custom rpc * Stylistic improvements+fixes to custom rpc form. * Hide cancel button. * Highlight and show network form of provider by default. * Standardize network subheader name to 'Networks' * Update e2e tests for new settings network form * Update unit tests for new rpcPrefs prop * Extract blockexplorer url construction into method. * Fix broken styles on non-network tabs in popup mode * Fix block explorer url links for cases when provider in state has not been updated. * Fix vertical spacing of network form * Don't allow click of save button on network form if nothing has changed * Ensure add network button is shown in popup view * Lint fix for networks tab * Fix block explorer url preference setting. * Fix e2e tests for custom blockexplorer in account details modal changes. * Update integration test states to include frequentRpcList property * Fix some capitalizations in en/messages.json * Remove some console.logs added during custom rpc form work * Fix external account link text and url for modal and dropdown. * Documentation, url validation, proptype required additions and lint fixes on network tab and form.
* Check for unused function arguments (#6583)Whymarrh Whitby2019-05-097-21/+21
| | | | | | | | | | * eslint: Check for unused function arguments * eslint: Ignore unused '_' in argument list Also allow any number of '_' e.g., '__' or '___' which is to be used sparingly * Remove and rename unused arguments
* feature: add Goerli support (#6459)Paul Bouchon2019-04-183-3/+17
|
* Remove NoticeController (#6382)Thomas Huang2019-04-021-92/+0
|
* lint fixkumavis2019-03-291-1/+1
|
* notice-controller - make markAllNoticesRead synckumavis2019-03-291-1/+1
|
* lib - nodeify - correctly wrap synchronous functionskumavis2019-03-291-4/+45
|
* notices - markAllNoticesRead - use async/awaitkumavis2019-03-291-3/+2
|
* Merge branch 'develop' into clearNoticeskumavis2019-03-291-8/+3
|\
| * Replaces the coinbase link in the deposit modal with one for wyre (#6302)Dan J Miller2019-03-221-8/+3
| |
* | Clear notices when setCompletedOnboarding is calledThomas Huang2019-03-211-0/+26
|/
* GABA: Integrate AddressBookController (#5847)Paul Bouchon2019-03-121-54/+0
| | | | | | * gaba: integrate AddressBookController * pin gaba version and update lockfile
* I#5956 fix2 dont overwrite existing rpc settings (#6044)Frankie2019-01-301-0/+12
| | | | | | | | | | | | | | * mm-controller - dont overwrite existing rpc settings * ui-networkDropdown - dont pass old network as chainId * add methods preferencesController.updateRpc and metamaskController.updateAndSetCustomRpc * use updateAndSetCustomRpc in settings to allow rpcs to be updated * use new rpc as nickname if no nick name has been supplied * fix update rpc method
* Disallow loading as metamaskNetworkId (#5924)Frankie2018-12-141-2/+11
| | | | | | * transactions - throw an error if a transaction is generated while the network is loading * add tests for failing when netId is loading
* Final gas customization fixesDan Miller2018-12-041-1/+1
|
* Adds createSpeedUpTransaction to txControllerDan Miller2018-12-041-0/+67
|
* Save recent network balances in local storage (#5843)Dan J Miller2018-12-011-0/+137
| | | | | | | | | | | | * Use selector for state.metamask.accounts in all cases. * Default to cached balance when selecting metamask accounts * Adds the cached-balances controller * Documentation and small codes fixes for #5843 Co-Authored-By: danjm <danjm.com@gmail.com>
* Autofill gasPrice for retry attempts with either the recommended gasprice or ↵Frankie2018-11-271-1/+4
| | | | | | | | a %10 bump (#5786) * transactions - autofill gasPrice for retry attempts with either the recomened gasprice or a %10 bump * lint
* ESLint fixes (#5775)Whymarrh Whitby2018-11-171-3/+3
| | | | | | * eslint . --fix * Upgrade all ESLint warnings to errors
* Tx controller now uses safe event emitter (#5769)Frankie2018-11-173-24/+27
| | | | | | | | | | | | * transactions - use safe-event-emitter over events * tests - pass a platform object on init with a noop showTransactionNotification * test - fix for tx-state-history-helper trying to reduce an empty array * deps - safe-event-emitter * lint
* Resubmit approved transactions on new block (#5752)Dan Finlay2018-11-152-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Add beginning of test * Resubmit approved transactions on new block May fix #4343 and related issues, where an error could leave transactions stranded in the approved state. * Remove unused test * Re-approve transactions when retrying approved * Add retry approved test * Include approved in pending tx count * Fix getPendingTxs() * Linted * Only throw hash error in submitted state * Only check submitted txs for block inclusion * Fix test expectations
* Update Balanc3 API (#5744)Paul Bouchon2018-11-141-9/+0
| | | | | | * Update balanc3 API used in TokenRatesController * Remove demo URL and use nativeCurrency when fetching token rates
* EIP-1102: updated implementationbitpshr2018-11-061-2/+2
|
* Update watchAsset ERC20 validation (#5653)Esteban Miño2018-11-061-0/+26
| | | | | | * update ERC20 token valodation for watchAsset * update ERC20 validation test descriptions
* Add support for RPC endpoints with custom chain IDs (#5134)HackyMiner2018-10-262-9/+9
|
* Merge pull request #5555 from MetaMask/support-wallet-watch-assetkumavis2018-10-211-0/+5
|\ | | | | Support for prefix wallet_watchAsset
| * add support for wallet_watchAssetEsteban MIno2018-10-201-0/+5
| |
* | specific add and remove methods for frequentRpcList (#5554)Esteban Miño2018-10-201-0/+19
|/
* Ensure that new transactions added are using the selected addressWhymarrh Whitby2018-10-111-4/+26
|
* Increase suggested gas percentile to 65 (#5359)Dan Finlay2018-10-051-1/+1
| | | | | | | | * Increase suggested gas percentile to 65 I keep submitting transactions then waiting a long time. Apparently 50th percentile isn't enough. * Update test for getGasPrice
* Add ability to whitelist a blacklisted domain at runtimeWhymarrh Whitby2018-10-021-0/+15
|
* Some Ui teststmashuang2018-09-251-0/+33
|
* Implement latest EIP-712 protocolbitpshr2018-09-141-1/+1
|
* Default NoticeController ctor opts to empty objWhymarrh Whitby2018-09-121-1/+1
|
* Delete ConfigManager, replacing its usages with PreferencesControllerWhymarrh Whitby2018-09-123-25/+46
|
* fix conflictsEsteban MIno2018-08-291-0/+71
|\
| * Add test cases for MetaMaskController#_onKeyringControllerUpdateWhymarrh Whitby2018-08-231-0/+71
| |
* | watchAsset small changesEsteban MIno2018-08-281-1/+1
| |
* | typo watchAsset imageUrl to imageEsteban MIno2018-08-241-7/+7
| |
* | Merge branch 'develop' into WatchTokenFeatureEsteban MIno2018-08-221-1/+1
|\|
| * fix unit testsbrunobar792018-08-211-1/+1
| |
* | unit tests for watchAssetEsteban MIno2018-08-221-0/+110
|/
* Merge branch 'develop' into ledger-supportBruno Barbieri2018-08-181-0/+62
|\
| * Restores accounts until one with a zero balance is foundDan Matthews2018-08-171-0/+62
| |
| * Remove commented out code for detect-token-testThomas2018-08-151-10/+0
| |
| * Merge branch 'develop' into network-remove-provider-engineThomas2018-08-152-16/+177
| |\ | | | | | | | | | Override package-lock and fix merge conflicts
| * | Set metamask controller network provider to localhostThomas Huang2018-07-312-2/+3
| | |
| * | Detect Tokens are weirdThomas2018-07-301-26/+31
| | |
| * | Merge branch 'develop' into network-remove-provider-engineThomas2018-07-265-6/+348
| |\ \
| * | | test - unit - remove tests for obsolete methodskumavis2018-07-041-52/+0
| | | |
| * | | Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-07-0416-160/+189
| |\ \ \ | | | | | | | | | | | | | | | network-remove-provider-engine
| * \ \ \ Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-07-032-63/+49
| |\ \ \ \ | | | | | | | | | | | | | | | | | | network-remove-provider-engine
| * \ \ \ \ Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-06-073-0/+97
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | network-remove-provider-engine
| * \ \ \ \ \ Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-06-071-1/+26
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | network-remove-provider-engine
| * | | | | | | test - unit - tx-controller - fix blockTracker stubkumavis2018-05-291-0/+1
| | | | | | | |
| * | | | | | | test - unit - pending-tx-tracker - update method namekumavis2018-05-291-2/+2
| | | | | | | |
| * | | | | | | test - unit - nonce-tracker - fix blockTracker stubkumavis2018-05-291-0/+1
| | | | | | | |
| * | | | | | | controllers - transactions - merge @frankiebee's work with minekumavis2018-05-292-56/+7
| | | | | | | |
| * | | | | | | test - unit - metamask-controller - remove logkumavis2018-05-261-1/+0
| | | | | | | |
| * | | | | | | test - unit - code style nitpickkumavis2018-05-251-1/+2
| | | | | | | |
| * | | | | | | test - unit - metamask-controller - fix many bugs in testskumavis2018-05-251-33/+45
| | | | | | | |
| * | | | | | | test - unit - tx-controller-test - add history object to txMeta when using ↵kumavis2018-05-251-31/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | internal calls
| * | | | | | | test - unit - move fetch polyfill to helperkumavis2018-05-251-3/+0
| | | | | | | |
| * | | | | | | test - unit - metamask-controller - polyfill global.fetchkumavis2018-05-251-2/+4
| | | | | | | |
| * | | | | | | test - remove .only from unit testskumavis2018-05-251-1/+1
| | | | | | | |
| * | | | | | | Merge branch 'network-remove-provider-engine' of ↵frankiebee2018-05-231-31/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/MetaMask/metamask-extension into transactions-use-new-block-tracker
| * | | | | | | Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-05-232-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | network-remove-provider-engine
* | | | | | | | fix merge conflictsbrunobar792018-08-187-164/+133
| | | | | | | |
* | | | | | | | fixed unit testsbrunobar792018-08-151-5/+9
| | | | | | | |
* | | | | | | | fix tx testsbrunobar792018-08-141-8/+18
| |_|_|_|_|_|/ |/| | | | | |
* | | | | | | create tokens storage when setadressesEsteban MIno2018-07-311-0/+25
| | | | | | |
* | | | | | | unit tests for tokens per account and networkEsteban MIno2018-07-281-0/+128
| | | | | | |
* | | | | | | modify tests according to tokens by networkEsteban MIno2018-07-272-18/+8
| |_|_|_|_|/ |/| | | | |
* | | | | | Merge branch 'develop' into detectTokenFeatureEsteban Miño2018-07-214-6/+207
|\ \ \ \ \ \
| * | | | | | Auto-detect tokens #3034 (#4683)Esteban Miño2018-07-211-0/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * detect tokens polling * network store to detect token * tests for spec * passtest-lint * fix lint * improve tests * detect tokens through infura * detect tokens when submit password and new account selected * keyring unlocked detect and unit tests * add changelog
| * | | | | | added tests for removeAccountbrunobar792018-07-171-0/+33
| | | | | | |
| * | | | | | added more unit testsbrunobar792018-07-171-2/+55
| | | | | | |
| * | | | | | added unit tests for metamaskcontrollerbrunobar792018-07-171-0/+70
| | | | | | |
| * | | | | | added test for preferences controllerbrunobar792018-07-171-0/+25
| | | | | | |
| * | | | | | test - check that #setTxStatusRejected removes transaction from historyfrankiebee2018-07-111-0/+9
| | | | | | |
| * | | | | | Merge branch 'develop' of https://github.com/MetaMask/metamask-extension ↵frankiebee2018-07-1116-167/+141
| |\ \ \ \ \ \ | | | |_|_|_|/ | | |/| | | | | | | | | | | into i#3896
| * | | | | | tests - fix cancle transaction test to better fit new behaviorfrankiebee2018-06-272-13/+10
| | | | | | |
| * | | | | | woops - remove .onlyfrankiebee2018-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: @jennypollack
| * | | | | | trandsactions - remove rejected transactions from historyfrankiebee2018-06-261-0/+14
| | |_|_|_|/ | |/| | | |
* | | | | | fix detection on submit passwordEsteban MIno2018-07-211-6/+27
| | | | | |
* | | | | | keyring unlocked detect and unit testsEsteban MIno2018-07-201-6/+32
| | | | | |
* | | | | | detect tokens when submit password and new account selectedEsteban MIno2018-07-201-4/+4
| | | | | |
* | | | | | detect tokens through infuraEsteban MIno2018-07-131-9/+17
| | | | | |
* | | | | | improve testsEsteban MIno2018-07-121-56/+49
| | | | | |
* | | | | | fix lintEsteban MIno2018-07-041-54/+46
| | | | | |
* | | | | | Merge branch 'develop' into detectTokenFeatureEsteban MIno2018-07-0416-169/+143
|\ \ \ \ \ \ | | |/ / / / | |/| | | |
| * | | | | fix unit testsbrunobar792018-07-031-4/+3
| | | | | |
| * | | | | fix testsbrunobar792018-07-032-6/+12
| | | | | |
| * | | | | fix warning for unit testsbrunobar792018-07-0311-65/+35
| | | | | |
| * | | | | eslint --fix .brunobar792018-07-0313-111/+110
| |/ / / /
* / / / / tests for specEsteban MIno2018-06-281-0/+101
|/ / / /
* | | | Merge pull request #4566 from MetaMask/notice-phishingDan Finlay2018-06-151-46/+4
|\ \ \ \ | | | | | | | | | | Push new notice on recent phishing incidents
| * | | | notices - replace getLatestNotice with getNextNoticekumavis2018-06-141-46/+4
| | |_|/ | |/| |
* | | | Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-06-143-5/+97
|\| | | | | | | | | | | | | | | ValidateEmptyKey
| * | | Merge pull request #4512 from MetaMask/test-metamask-no-diagnosticsThomas Huang2018-06-071-0/+3
| |\ \ \ | | | | | | | | | | test - metamask-controller - disable diagnostics
| | * | | test - metamask-controller - disable diagnosticskumavis2018-06-061-0/+3
| | | |/ | | |/|
| * | | Merge pull request #4414 from scsaba/recipient-blacklistkumavis2018-06-072-0/+94
| |\ \ \ | | |/ / | |/| | Disallow sending to ganache default accounts on main net
| | * | remove generating blocked accounts and use a config file insteadCsaba Solya2018-05-311-11/+10
| | | |
| | * | adding tests for recipient blacklist checkerCsaba Solya2018-05-301-0/+78
| | | |
| | * | adding transaction controller testsCsaba Solya2018-05-301-0/+17
| | |/
| * | diagnostics - rewrite bug-notifier as diagnostics-reporterkumavis2018-06-061-5/+0
| | |
* | | test - unit - add assertRejects to test asyncFnskumavis2018-06-141-5/+6
| | |
* | | test - unit - import strategies - properly await async methodskumavis2018-06-141-8/+8
| | |
* | | Make account import tests much more specificDan Finlay2018-06-121-10/+10
| | | | | | | | | | | | | | | However, they no longer seem to work. I'm unclear why this test is failing. The private key being provided should be valid.
* | | Improve private key import testsDan Finlay2018-06-081-1/+25
| | |
* | | Improve test formattingDan Finlay2018-06-081-16/+19
|/ /
* | Mock notifier in testDan Finlay2018-06-051-0/+5
| |
* | Add failing test for unknown identity entryDan Finlay2018-06-051-3/+28
|/
* Merge branch 'develop' into testingtmashuang2018-05-221-30/+0
|
* Merge branch 'develop' into testingtmashuang2018-05-223-22/+139
|
* Moved loose some loose test files to sub folderstmashuang2018-05-2127-0/+3499