aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/helpers
Commit message (Collapse)AuthorAgeFilesLines
* I5849 incremental account security (#6874)Dan J Miller2019-08-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * Implements ability to defer seed phrase backup to later * Adds incremental-security.spec.js, including test dapp that sends signed tx with stand alone localhost provider * Update metamask-responsive-ui for incremental account security changes * Update backup-notification style and fix responsiveness of seed phrase screen * Remove uneeded files from send-eth-with-private-key-test/ * Apply linguist flags in .gitattributes for send-eth-with-private-key-test/ethereumjs-tx.js * Improve docs in controllers/onboarding.js * Clean up metamask-extension/test/e2e/send-eth-with-private-key-test/index.html * Remove unnecessary newlines in a couple first-time-flow/ files * Fix import of backup-notification in home.component * Fix git attrs file
* Address book send plus contact list (#6914)Dan J Miller2019-08-011-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Style Send Header * Move Send to-row to send view and restyle * Add "Recents" group to select recipient view * Rename SendToRow to AddRecipient * Basic UI and Layout * New ENSInput component * wip - fuzzy search for input * small refactor * Add Dialog * contact list initial * initial error on invalid address * clean up edit * Click to open modal * Create AddToAddressBookModal component * Modal styling and layout * modal i18n * Add to Addressbook * ens wip * ens wip * ENS Resolution * Reset input * Send to explicit address * Happy Path Complete * Add back error checking * Reset send-to when emptying input * Add back warning object * Fix linter * Fix unit test #1 - fix import paths * Remove dead tests * One more to go * Fix all unit tests * add unit test for reducers and actions * test rendering AddRecipient * Add tests for dialog boxes in AddRecipient * Add test for validating * Fix linter * Fix e2e tests * Token send e2e fix * Style View Contact * Style edit-contact * Fix e2e * Fix from-import-beta-ui e2e spec * Make section header say "add recipient” by default * Auto-focus add recipient input * Update placeholder text * Update input title font size * Auto advance to next step if user paste a valid address * Ellipsify address when recipient is selected * Fix app header background color on desktop * Give each form row a margin of 16px * Use .container/.component naming pattern for ens-input * Auto-focus on input when add to addressbook modal is opened; Save on Enter * Fix and add unit test * Fix selectors name in e2e tests * Correct e2e test token amount for address-book-send changes * Adds e2e test for editing a transaction * Delete test/integration/lib/send-new-ui.js * Add tests for amount max button and high value error on send screen to test/e2e/metamask-ui.spec.js * lint and revert to address as object keys * add chainId based on current network to address book entry * fix test * only display contacts for the current network * Improve ENS message when not found on current network * Add error to indicate when network does not support ENS * bump gaba * address book, resolve comments * Move contact-list to its own component * De-duplicate getaddressbook selector and refactor name selection logic in contact-list-tab/ * Use contact-list component in contact-list-tab.component (i.e. in settings) * Improve/fix settings headers for popup and browser views * Lint fixes related to address book updates * Add 'My accounts' page to settings address book * Update add new contact button in settings to match floating circular design * Improve styles of view contact page * Improve styles and labels of the add-contact.component * Further lint fixes related to address book updates * Update unit tests as per address book updates * Ensure that contact list groups are sorted alphabetically * Refactor settings component to use a container for connection to redux; allow display of addressbook name in settings header * Decouple ens-input.component from send context * Add ens resolution to add contact screen in settings * Switching networks when an ens address is shown on send form removes the ens address. * Resolve send screen search for ensAddress to matching address book entry if it exists * Show resolved ens icon and address if exists (settings: add-contact.component) * Make the displayed and copied address in view-contact.component the checksummed address * Default alias state prop in AddToAddressBookModal to empty string * Use keyCode to detect enter key in AddToAddressBookModal * Ensure add-contact component properly updates after QR code detection * Fix display of all recents after clicking 'Load More' in contact list * Fix send screen contact searching after network switching * Code cleanup related to address book changes * Update unit tests for address book changes * Update ENS name not found on network message * Add ens registration error message * Cancel on edit mode takes user back to view screen * Adds support for memo to settings contact list view and edit screens * Modify designs of edit and view contact in popup environment * Update settings content list UX to show split columns in fullscreen and proper internal navigation * Correct background address book API usages in UI
* Remove unused route constants (#6918)Mark Stacey2019-07-261-12/+0
| | | These constants were not referenced outside of this file
* Add eslint dependency (#6842)Mark Stacey2019-07-151-2/+0
| | | | | | | | We had forgotten to add `eslint` as a dependency, even though we use it directly. It had always worked because we have dependencies that also depend upon it. `eslint` has also been updated to v6, which necessitated two minor changes.
* Declare variables before use (#6806)Mark Stacey2019-07-061-7/+7
| | | | | | | | | | | | | | | | 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.
* Fixes display of confirm screen token decimals by not relying on ↵Dan Miller2019-06-282-5/+36
| | | | confirmTransaction state.
* 4byte fallback (#6551)Whymarrh Whitby2019-06-184-43/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Adds 4byte registry fallback to getMethodData() (#6435) * Adds fetchWithCache to guard against unnecessary API calls * Add custom fetch wrapper with abort on timeout * Use opts and cacheRefreshTime in fetch-with-cache util * Use custom fetch wrapper with timeout for fetch-with-cache * Improve contract method data fetching (#6623) * Remove async call from getTransactionActionKey() * Stop blocking confirm screen rendering on method data loading, and base screen route on transactionCategory * Remove use of withMethodData, fix use of knownMethodData, in relation to transaction-list-item.component * Load data contract method data progressively, making it non-blocking; requires simplifying conf-tx-base lifecycle logic. * Allow editing of gas price while loading on the confirm screen. * Fix transactionAction component and its unit tests. * Fix confirm transaction components for cases of route transitions within metamask. * Only call toString on id if truthy in getNavigateTxData() * Fix knownMethodData retrieval and data fetching from fourbyte
* MetaMetrics documentation (#6624)Dan J Miller2019-05-211-9/+44
|
* Improved UX for sweeping accounts (#6488)Etienne Dusseault2019-05-211-1/+10
| | | | | | | | | | | | * Changed max button to checkbox, disabled input if max mode is on, recalculate price according to gas fee if max mode is on * Disabled insufficient funds message in the modal if max mode is on, displays proper amounts in modal when max mode is on, sets the send amount according to custom gas price after gas modal save, resets the send amount after resetting custom gas price * Disabled max mode checkbox if gas buttons are loading, refactored gas-modal-page-container * Implemented new max button & max mode message. Moved insufficient funds error to underneath the send amount field * Fixed existing integration test to pass, created new tests to ensure send amount field is disabled when max button is clicked and the amount changes when the gas price is changed. Refactored some components
* New settings custom rpc form (#6490)Dan J Miller2019-05-102-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-095-9/+8
| | | | | | | | | | * 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
* Skip null and undefined keys when translating via context (#6543)Whymarrh Whitby2019-05-071-0/+10
| | | | | | * i18n: Don't translate null or undefined keys * Add JSDoc for I18nProvider#t context fn
* Fix binding of this for I18nProvider#tOrKeyWhymarrh Whitby2019-05-011-1/+1
|
* Send metrics event from backend for on chain transaction failures (#6500)Dan J Miller2019-04-291-2/+2
| | | | | | * Send metrics event from backend for on chain transaction failures * Passes state object to backEndMetaMetricsEvent, and adds getMetaMetricState selector
* Revert "Adds 4byte registry fallback to getMethodData() (#6435)"Thomas Huang2019-04-271-27/+3
| | | | This reverts commit 09f2a2a5476c4c119c7294f496f6590156d8d07a.
* feature: add Goerli support (#6459)Paul Bouchon2019-04-181-0/+1
|
* Adds 4byte registry fallback to getMethodData() (#6435)Dan J Miller2019-04-171-3/+27
| | | | | | | | | | | | * Get contract method data from 4byte if we can't get it from eth-method-registry * Clarify token method name fallback code in getMethodData * Bugfix: don't attempt to translate falsy actionKeys in confirm-transaction-base.component.js * Rewrite getMethodFrom4Byte with async-await * Call four byte and method-registry requests in parallel in getMethodData()
* Metrics tracking gas changed - slow, average, fast, custom - on edit screen.-Dan Miller2019-04-081-0/+2
|
* Remove NoticeController (#6382)Thomas Huang2019-04-021-4/+0
|
* Revert to providing inline defaults in getHexGasTotal and ↵Dan J Miller2019-03-291-4/+4
| | | | increaseLastGasPrice (#6361)
* Further e2e fixes in wake of #6364 and #6367 (#6374)Dan J Miller2019-03-291-13/+24
| | | | | | | | * getMethodData() default to abi decoded method if registry lookup errors * Update e2e tests to work with getMethodData() fallback changes * Remove indeterminency in gas input key entering in send token e2e test.
* Defaults to the args list in increaseLastGasPrice and getHexGasTotalDan Miller2019-03-281-4/+4
|
* getHexGasTotal and increaseLastGasPrice now gracefully handle null and ↵Dan Miller2019-03-281-2/+2
| | | | undefined values
* New settings page rebased (#6333)Dan J Miller2019-03-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * New setting tab * Add InfoTab * Add Advanced tab * Add Security Tab * Finish mobile view * Make new setting page responsive * Fix linter * Fix y scrolling * Update link in network dropdown * Fix e2e tests * Remove duplicate translation key * Resolve merge conflict * Only change settings header in popup view. * Place mobile-sync button in advanced-tab of settings
* Hide gas price chart and prevent api call when not on ethereum networks. (#6300)Dan J Miller2019-03-221-0/+3
| | | Add missing translations in gas customization modal
* Folder restructure (#6304)Chi Kei Chan2019-03-2234-7/+2187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove ui/app/keychains/ * Remove ui/app/img/ (unused images) * Move conversion-util to helpers/utils/ * Move token-util to helpers/utils/ * Move /helpers/*.js inside /helpers/utils/ * Move util tests inside /helpers/utils/ * Renameand move confirm-transaction/util.js to helpers/utils/ * Move higher-order-components to helpers/higher-order-components/ * Move infura-conversion.json to helpers/constants/ * Move all utility functions to helpers/utils/ * Move pages directory to top-level * Move all constants to helpers/constants/ * Move metametrics inside helpers/ * Move app and root inside pages/ * Move routes inside helpers/ * Re-organize ducks/ * Move reducers to ducks/ * Move selectors inside selectors/ * Move test out of test folder * Move action, reducer, store inside store/ * Move ui components inside ui/ * Move UI components inside ui/ * Move connected components inside components/app/ * Move i18n-helper inside helpers/ * Fix unit tests * Fix unit test * Move pages components * Rename routes component * Move reducers to ducks/index * Fix bad path in unit test
* Fix inline advanced gas editingWhymarrh Whitby2019-02-091-8/+0
|
* Add togglable advanced gas controls on send and confirm screens (#6112)Dan J Miller2019-02-061-0/+8
| | | | | | | | | | | | | | | | | | | | * Extract advanced gas input controls to their own component * Add advanced inline gas toggle to settings * Add optional advanced inline gas to send send screen * Adds optional advanced gas inputs to the confirm screen * Add info modals for advanced gas inputs. * Fix translation of advance gas toggle description. * Lint and unit test fixes for inline-advanced-gas-inputs * Increase margin above advanced options button on send screen * Move methods from constructor to property syntax in advanced-gas-inputs.component
* Use Parity on-chain registry only when is needed (#6052)Esteban Miño2019-01-231-0/+12
| | | | | | * add and use knownMethodData to avoid infura requests * dataMethod to methodData and check empty response
* Group transactions by nonce (#5886)Alexander Tseung2018-12-101-4/+12
|
* Lint and unit test fixes.Dan Miller2018-12-041-1/+0
|
* Connects remained of the gas customization component to redux.Dan Miller2018-12-042-0/+42
|
* Connect the gas-button-group component to redux and a live api.Dan Miller2018-12-041-1/+1
|
* Merge pull request #5567 from MetaMask/HowardBraham-developkumavis2018-10-301-1/+3
|\ | | | | Feature: Warn when attempting to send tx with data to non-contract
| * Merge branch 'develop' of github.com:MetaMask/metamask-extension into ↵kumavis2018-10-261-0/+11
| |\ | | | | | | | | | HowardBraham-develop
| * | ui - use variable to clarify result of emptiness checkkumavis2018-10-211-1/+3
| | |
| * | Merge branch 'develop' into developkumavis2018-10-213-0/+72
| |\ \
| * | | ganache-core merged my PR, so I changed some comments to clarify that ↵Howard Braham2018-10-101-1/+1
| | | | | | | | | | | | | | | | ganache-core v2.2.1 and below will return the non-standard '0x0'
| * | | Bug Fix: #1789 and #4525 eth.getCode() with no contractHoward Braham2018-10-101-1/+1
| | | |
* | | | Add support for RPC endpoints with custom chain IDs (#5134)HackyMiner2018-10-262-6/+12
| |_|/ |/| |
* | | Fix UnknownFunction showing as Confirm (#5590)Alexander Tseung2018-10-241-0/+11
| |/ |/|
* | Adds toggle for primary currency (#5421)Alexander Tseung2018-10-171-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add UnitInput component * Add CurrencyInput component * Add UserPreferencedCurrencyInput component * Add UserPreferencedCurrencyDisplay component * Add updatePreferences action * Add styles for CurrencyInput, CurrencyDisplay, and UnitInput * Update SettingsTab page with Primary Currency toggle * Refactor currency displays and inputs to use UserPreferenced displays and inputs * Add TokenInput component * Add UserPreferencedTokenInput component * Use TokenInput in the send screen * Fix unit tests * Fix e2e and integration tests * Remove send/CurrencyDisplay component * Replace diamond unicode character with Eth logo. Fix typos
* | Add txReceipt data to transaction details (#5513)Alexander Tseung2018-10-162-0/+53
|/
* Fix action translations edge casesAlexander Tseung2018-10-063-1/+13
|
* Translate method names in the transaction list only when applicableAlexander Tseung2018-10-053-2/+28
|
* Switch existing modals from using Notification to Modal. Remove Notification ↵Alexander Tseung2018-09-202-1/+18
| | | | component. Add CancelTransaction modal
* Fix exception thrown on getTokenDataAlexander Tseung2018-09-192-2/+24
|
* Fix identicon address. Fix styling of New Contract recipient. Fix Activity ↵Alexander Tseung2018-09-131-1/+1
| | | | Log initial ETH value. Add timestamps to Activity Log events
* Add WEI to getEthConversionFromWeiHexAlexander Tseung2018-09-131-1/+1
|
* Add TransactionBreakdown componentAlexander Tseung2018-09-131-0/+12
|
* Allow denominations in CurrencyDisplay componentAlexander Tseung2018-09-132-12/+28
|
* Fix naming, add eth.getCode check for actions, fix translations for statusesAlexander Tseung2018-08-242-7/+13
|
* Update retry transaction logic to use network nonceAlexander Tseung2018-08-241-9/+7
|
* Fix e2e testsAlexander Tseung2018-08-241-0/+5
|
* Fix integration testsAlexander Tseung2018-08-241-1/+6
|
* Show token amounts in TransactionListItem for token transfersAlexander Tseung2018-08-242-22/+22
|
* Add retry button to TransactionListItemAlexander Tseung2018-08-241-0/+21
|
* Refactor transactions list views. Add redesign componentsAlexander Tseung2018-08-244-19/+98
|
* Add withMethodData HOC, add higher-order-component folderAlexander Tseung2018-08-241-108/+0
|
* Use eth_getCode to sort transaction action typeAlexander Tseung2018-08-231-0/+5
|
* Cast arguments for new Bignumbers() to string.Dan Miller2018-08-151-1/+1
|
* Round large exponential numbersAlexander Tseung2018-07-281-0/+9
|
* Add close window support to signature requests. Move logic to actionsAlexander Tseung2018-07-241-0/+6
|
* Add fallback when no function found, fix network colors, add fiat values for ↵Alexander Tseung2018-07-181-0/+17
| | | | tokens with contract exchange rates
* Add unit tests for confirmTransaction duck and utilAlexander Tseung2018-07-101-0/+137
|
* Use eth-method-registry to get method dataAlexander Tseung2018-07-071-0/+15
|
* Refactor and redesign confirm transaction viewsAlexander Tseung2018-07-071-0/+101
|
* Don't update token balances after tracker is stoppedWhymarrh Whitby2018-07-051-0/+3
|
* Update designs for Add Token screenAlexander Tseung2018-05-201-0/+105