1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-10-22 19:26:13 +02:00
Commit Graph

5079 Commits

Author SHA1 Message Date
Mark Stacey
91af73b211
Remove invalid disableRipple prop (#12948)
The `disableRipple` prop was resulting in a React error in development
builds because it was unrecognized by React. This prop dates back to
when we were using the `@material-ui` Button class. It no longer serves
any purpose, so it has been removed.
2021-12-03 11:22:14 -03:30
Mark Stacey
7226357422
Fix isMainnet propType error (#12951)
A propType error was showing up during e2e tests with a `testDev`
build. It was caused by `process.env.IN_TEST` being treated as a
boolean, when in fact it is either the string `'true'` or a boolean.

`IN_TEST` has been updated to always be a boolean. `loose-envify` has
no trouble injecting boolean values, so there's no reason to treat this
as a string.
2021-12-02 14:46:46 -03:30
Mark Stacey
fac68980e0
Fix signature request propTypes (#12952)
There were two propType errors in the signature request and signature
request footer components. A boolean was wrongly declared as a
function, and that same boolean was later declared with an invalid
propType (`PropTypes.boolean` rather than `PropTypes.bool`). Both
errors have been fixed.
2021-12-02 14:39:18 -03:30
Olaf Tomalka
90b656bd66
Added SiteOrigin and PermissionList components (#12832)
* Changed back button to the one in design

* PermissionConnect now uses Chip component

* Added SiteOrigin widget

* WIP

* Added new permission list

* Fix linting errors

* Removed unused messages

* Removed more unused messages

* Make SiteOrigin bigger

* Fix lint

* Code Review fixes

* Fix SiteOrigin overflowing

* Add stories

* Fix lint

* Added useMemo to constant

* Fix Chip's max-content overflowing SiteOrigin

* Fix code review issues

Co-authored-by: Olaf Tomalka <olaftomalka@Olafs-MacBook-Pro-2.local>
2021-12-02 18:22:18 +01:00
igorms-cons
6dbf6e3ab3
Latest update conversion date - issue #10741 (#12422)
* conversion date fix

* update in settings conversion date - no internet

* update conversionDate fetch - setting container

* no currency date message updated
2021-12-02 08:48:09 -03:30
Alex Donesky
9e2935dd55
Revert "Feat/collectibles display (#12873)" (#12934)
This reverts commit 81ea24f08a.
2021-12-01 17:46:26 -06:00
Hassan Malik
79867bcebe
Adding snaps authorship pill (#12740)
* added npm icon

* added snaps-authorship-pill component and story

* updated npm icon

* added classname

* added comments

* changed label to an h7

* updated default label, removed unnecessary font-weight prop

* moved npm icon to flask/icons and added storybook file

* added hover/focus logic

* updated hover logic

* updated hover logic

* added authorship pill scss to app-components, removed unnecessary handlers

* removed npm icon, added font-awesome icon, added font-awesome brands to scss imports

* removed icons directory, updated scss file to use the proper color for npm icon, updated component with correct size and added class to change color

* fixed linter errors

* added link to pill and its story, changed title of story

* changed link to open in new tab, moved classname to root element and made it inline-block

* fixed proptype comment

* fixed linter error
2021-12-01 17:45:55 -05:00
Alex Donesky
c29afd110b
put new collectibles related preferences behind feature flag (#12936) 2021-12-01 16:10:24 -06:00
George Marshall
eb4f051b23
Adding SnapSettingsCard ui component (#12655)
* parent d89e5336a6
author georgewrmarshall <george.marshall@consensys.net> 1636692862 -0800
committer hmalik88 <hassan.malik@consensys.net> 1637342043 -0500

Initial SnapSettingsCard component

Updates to styles but having specificity issues so increased specificity

Updates to styles but having specificity issues so increased specificity

added overflow fix and added tests

lockfile update

prettier fix

added stylelint ignore

yarn.lock fixed

* merge conflict fix

* package/yarn fix

* fixed package.json

* updated lockfile...

* removed comment

* removed unnecessary key/val for chip status indicator color

* bumped lattice to 0.4.0 in package json, fixed yarn lock

* removed dupe entry in yarn lock

* ran yarn setup to update lock file

* updated chip label prop

* parent d89e5336a6
author georgewrmarshall <george.marshall@consensys.net> 1636692862 -0800
committer hmalik88 <hassan.malik@consensys.net> 1637342043 -0500

Initial SnapSettingsCard component

Updates to styles but having specificity issues so increased specificity

Updates to styles but having specificity issues so increased specificity

added overflow fix and added tests

lockfile update

prettier fix

added stylelint ignore

yarn.lock fixed

* merge conflict fix

* package/yarn fix

* fixed package.json

* updated lockfile...

* removed comment

* bumped lattice to 0.4.0 in package json, fixed yarn lock

* removed dupe entry in yarn lock

* ran yarn setup to update lock file

* Using IconWithFallback instead of SiteIcon, fixing icon prop, and adding status story and docs page

* Updating to follow storybook folder convention

* Updates to styles

* Adding localization

* added todo comment

Co-authored-by: hmalik88 <hassan.malik@consensys.net>
2021-12-01 16:10:51 -05:00
George Marshall
854fc71ae7
Organizing storybook to echo app folder structure (#12796)
* Organizing storybook to echo app folder structure

* Updating new stories to follow new convention from develop
2021-12-01 11:27:57 -08:00
Mark Stacey
b6b202ca13
Convert nonce background calls to async/await (#12853)
The calls to the background in `actions.js` that relate to the custom
nonce feature now use `async/await` and `promisifiedBackground`.

The behaviour should be unchanged except that when setting the nonce
field, the warning is shown in case of error before the loading
indicator drops, which seems like it would be a minor improvement (if
it has any user-facing impact at all).
2021-12-01 15:16:10 -03:30
Alaa Hadad
e056c88ba7
Feature: Transaction Insights (#12881)
* integration for tx decoding confirmation and history view

* upgrading @truffle/decoder to latest release 5.1.0

* Update acorn and colors patches

* feat: remove redundant styling

* feat: basic integration for nickname components

* feat: wiring functionality of adding new nickname

* feat: wire functionality of showing nickname modal

* feat: link the nickname popover with add/update popover

* feat: moving forward with address nicknames integration

* feat: fixing a bug related to passing chainId in addressBook

* feat: populating memo prop in addressbook entry

* feat: add explorer link

* feat: bug fixing update nickname component

* feat: fix proptypes

* feat: adding tooltip for copying nickname address

* featL fix styling for tx-details page

* feat: optimize code for error handling

* feat: limiting transaction decoding to tx with data

* feat: remove tree UI component

* feat: adding request to check for tx decoding supported networks

* feat: showing data hex component

* feat: fix react warnings

* feat: remove extra margin in tx decoding

* Remove unused package @truffle/source-map-utils

* Ensure messages get translated

* feat: link tx-decoding addresses with nicknames

* Omit value for boolean attributes

* Fix props reading in CopyRawData

* fix: fixing issue with transaltion

* Fix lint errors in TransactionDecoding

- Remove unused import
- Reorder imports
- Address conflict between caught `error` and error state flag by
  renaming state flag to `hasError`
- Fix requestUrl identifier casing and use of template string
- Ensure `useEffect` gets passed the deps it needs
- Add scope braces around case statement where it's needed
- Omit literal `true` for boolean jsx attribute
- Refactor nested ternary as `if` statements

* fix: revert fetchWithCache modifications

* Fix linting for TransactionListItemDetails

- Remove unused import
- Fix import spacing
- Remove unused prop dereference
- Fix string interpolation for translated From/To

* Moving to popover pattern

* fix: sass color variable

* Omit value for boolean attribute

* Remove changes from modal.js

* fix: refactor nickname popovers

* Ensure const gets declared before it's used

* Fix linting for ConfirmTransactionBase

- Remove unused prop chainId
- Stop destructuring an unused field

* fix: refactor usage of nicknames popovers in send-content-container

* fix: remove extra prop updateAccountNicknameModal

* fix: refactor code for address.component

* fix: remove extra tooltip

* Ensure NicknamePopovers always returns component

* Fix linting for NicknamePopover component

- Fix useCallback deps
- Switch ternary to logical-or

* Fix linting for SenderToRecipient

... by fixing import order

* Remove unused addressCopied state

* Delete empty file

* fix: remove sender-to-recipient.container

* fix: refactor usage of nickname popovers in confirm-page-container

* fix: bug related to state variable

* Stylelint fix

* Lint fix

* Change "Total Amount" to "Total"

* Lint fix locales

* Update address-book.spec.js

* e2e test update

* Update e2e tests

* Fix issue where absence of function params in data hex tab would result in rendering a  string

* Fix border radius, and width and height in small notification windows, of the update-nickname-popover

* Remove fake await

* Clean up

* Clean up

Co-authored-by: Alaa Hadad <alaahd@Alaas-MacBook-M1-Pro-14-inch.local>
Co-authored-by: Dan Miller <danjm.com@gmail.com>
Co-authored-by: g. nicholas d'andrea <gnidan@trufflesuite.com>
2021-12-01 13:52:08 -03:30
Olaf Tomalka
70386726f6
Implement Flask onboarding UI (#12745)
* Added Flask Experimental Area warning to OnboardingV2

* Added first time flow Flask Experimental Area warning

* Made both onboarding flows use one Experimental Area component

* Fix comments in React divs

* Fix unreachable code

* Fix build lint problems

* Changes after code review

* Added guards around route constants imports

* Code Review changes

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Code review changes

* Fix lint

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/app/flask/experimental-area/index.scss

Co-authored-by: George Marshall <george.marshall@consensys.net>

* fix lint

Co-authored-by: George Marshall <george.marshall@consensys.net>
2021-12-01 17:53:30 +01:00
Matthew Epps
7a92e22111
Swaps optimizations (#12842)
* Trigger Build

* Trigger Build

* Move swaps index variables to redux

* all optimizations so far

* Add better equality checks for selectors in swaps index and build quote

* Clean up PR, remove extra code and logs

* Clean up lavamoat file

* Fixes for optimizations

* Update tests and test snapshots

* Remove unnecessary tests

* Remove unnecessary console log

* Trigger Build

* Trigger Build

* Add delay to account for remote call made by trezor keyring

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-12-01 12:55:09 -03:30
Alex Donesky
81ea24f08a
Feat/collectibles display (#12873)
* Wiring up Collectibles lists/items

* wip

* more wip

* more more wip

* yet more wip

* wippp

* more wipppp

* closer

* wroking

* more wip

* cleanup

* cleanup

* add-collectible form validation

* update default ipfs-gateway

* update refresh button

* fix proptypes issue + add more padding to asset background

* css tweaking

* more cleanup

* more cleanup

* more cleanup

* add migration

* address feedback

* fix migration + cleanup

* bumping controllers version + adapting new collectiblesController shape

* fix yarn dedupe
2021-12-01 10:10:17 -06:00
Alex Donesky
3434b9f80a
add openSeaEnabled preference (#12909)
* add openSeaEnabled preference

* cleanup

* add description copy
2021-11-30 22:12:27 -06:00
Jyoti Puri
a020281c96
Implementing save button on advance gas fee modal (#12854) 2021-12-01 06:01:21 +05:30
Matthew Epps
8e6a0ff879
Send all swaps requests to api2, remove useNewSwapsApi boolean (#12792)
* Send all swaps requests to api2, remove useNewSwapsApi boolean

* Switch token bucket priority

* Fix tests

* Trigger Build

* Trigger Build
2021-11-30 19:56:28 +01:00
Mark Stacey
8835642c6d
Remove unnecessary unlock step (#12840)
As part of the unlock process, currently the seed phrase is retrieved
from the background then discarded. This step is pointless, so it has
been deleted.
2021-11-30 12:13:49 -03:30
Dan J Miller
2856ea7606
Add support for eip-1559 on Trezor (#12627)
* Add support for eip-1559 on Trezor

* temp

* Lint fix

* Store trezor model type in background state instead attempting to get it in the frontend

* code simplification

* Temp update to eth-trezor-keyring version

* Tempory update to eth-trezor-keyring version

* Temp update to eth-trezor-keyring version

* Fix display of hdpath selector in connect hardware flow for trezor

* Updating the package version but we still need to run yarn setup and update the lockfile, once the package is updated

* Update yarn.lock

* Fix unit tests
2021-11-30 10:58:28 -03:30
VSaric
35c1eaa2bd
Created a Nickname popover (#12632)
* Created a Nickname popover

* Fixing lines in index.scss

* Handle copy button and fix some paddings

* Added text to be editable in the storybook component

* Simplify nickname scss and html

* Delete harcoded address

* Change color usage with new color system
2021-11-29 16:05:56 -03:30
Jyoti Puri
7ace0497c8
Removing un-necessary comma (#12883)
* Confirm transaction screen style fixes
2021-11-30 00:32:54 +05:30
Niranjana Binoy
3f8cbd5202
Removing the token detection announcement when the token detection is ON (#12776) 2021-11-29 13:28:35 -05:00
Niranjana Binoy
4b975adc85
EIP-1559 V2 : Advanced gas fee modal - Max base fee and Priority fee inputs (#12619) 2021-11-29 23:10:48 +05:30
Dan J Miller
c2ea04c775
Adds multilayer fee display to erc20 token approval screen (#12824)
* Adds multilayer fee display to erc20 token approval screen

* Change bold property name
2021-11-29 13:23:37 -03:30
Jyoti Puri
0e0e7ac830
Legacy transactions to use old transaction flow (#12782) 2021-11-29 21:38:24 +05:30
Alex Donesky
5aa191fd2e
Feat/add collectible manually (#12834)
* hook up add collectible manually flow

* address feedback
2021-11-26 14:03:35 -06:00
ryanml
279c8072ed
Adding collectibles items overview (#12506)
* Adding collectibles items overview

* addressing feedback

Co-authored-by: Alex <adonesky@gmail.com>
2021-11-26 12:59:46 -06:00
Alex Donesky
0bed51b936
add and hook up setting to toggle on/off collectible autodetection (#12839) 2021-11-26 12:54:57 -06:00
Dan J Miller
74b3a3a1c8
Remove _removeBeforeUnload calls in confirm-encryption-public-key.component.js and confirm-decrypt-message.component.js (#12825) 2021-11-25 14:42:40 -03:30
Etienne Dusseault
02177c4575
checkbox storybook (#12757) 2021-11-24 14:20:39 -08:00
George Marshall
1523b2353d
Adding className to togglebutton (#12838) 2021-11-24 14:15:10 -08:00
Etienne Dusseault
d5ba78f90f
Fix button-group.stories for new Storybook documentation (#12621)
* button-group

* remove usage table

* Update ui/components/ui/button-group/button-group.component.js

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

* Update ui/components/ui/button-group/README.mdx

Co-authored-by: George Marshall <george.marshall@consensys.net>

Co-authored-by: George Marshall <george.marshall@consensys.net>
2021-11-24 13:46:45 -08:00
Dan J Miller
8721c80054
Ensure that handleChange in token-input.component handles empty values (#12835) 2021-11-24 16:40:13 -03:30
George Marshall
07f16d37be
Updating IconWithFallback to functional component, adding stories and docs (#12797) 2021-11-24 11:43:22 -08:00
Mingliang Liu
e7b82915fa
update scams and network security risks link (#12752) 2021-11-24 15:18:01 -03:30
Thomas Huang
d179344712
Convert token input to BigNumber to handle decimals. (#12773)
* Fixes #12762

Adds a decimal length check for inputs and drops excess fractional part.
Another edgecase not accounted for is when a token's decimal precision is 0 and attempting sending decimals will result in omitting the fractional part.

* Change spies from sinon to jest and change onChange value to string.

* Adjust

* Remove sinon

* Add test for issue case

* DRY

* Simplify logic by using BigNumber

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-11-24 12:08:23 -06:00
Mark Stacey
7929a92c66
Clear the clipboard after the seed phrase is pasted (#12828)
* Clear the clipboard after the seed phrase is pasted

On the "Import" page of the import onboarding flow, we now clear the
clipboard after the secret recovery phrase is pasted. This ensures that
the SRP isn't accidentally pasted somewhere else by the user, which can
be an easy and disastrous mistake to make.

* Clear clipboard during new onboarding flow as well
2021-11-24 13:39:12 -03:30
Jyoti Puri
7609841902
Confirm transaction page - onchain failure handling (#12743) 2021-11-24 22:32:53 +05:30
Etienne Dusseault
5a14a1a54a
Add storybook render tests with CI integration (#12477)
* add storybook unit tests with CI integration

* fix command and fix casing for test

* change ci ordering for storybook tasks

* fix syntax error

* fix jest

* lint

* Add transaction-total-banner render test to Storybook (#12517)

* transaction-total-banner

* lint

* confirm to spec

* lint

* fix jest ocnfig for snapshot test failure
2021-11-23 16:41:30 -08:00
George Marshall
dd77700e65
Updating tags in Typography component (#12682) 2021-11-23 15:32:59 -08:00
kumavis
d9d1a831a6
ci - enforce yarn lock deduplications (#12737)
* ci - test for yarn lock deduplications

* deps - update yarn.lock and patches

* lavamoat - update policy

* test - ui/helpers/utils/optimism/buildUnserializedTransaction - test against json obj

* lint fix

* patch-package - patch @babel/runtime for lavamoat support

* patch-package - fix additional @babel/runtime lockdown incompats

* patch-package - cleanup sass patch
2021-11-23 09:17:27 -10:00
Jyoti Puri
f65063ac6c
Eip1559 v2 12593 (#12719) 2021-11-23 23:48:44 +05:30
Niranjana Binoy
582882b3ed
Adding the AdvancedGasFeePopover template (#12780) 2021-11-23 23:16:33 +05:30
Aaron Chen
a931316a53
Introduce QR based signer into MetaMask (#12065)
* support qr based signer

* add CSP for fire fox

* get QR Hardware wallet name from device

* fix qrHardware state missing in runtime

* support qr based signer sign transaction

* refine Request Signature modal ui

* remove feature toggle

* refine ui

* fix notification is closing even there is a pending qr hardware transaction

* add chinese translation, refine ui, fix qr process was breaking in some case

* support import accounts by pubkeys

* refine qr-based wallet ui and fix bugs

* update @keystonehq/metamask-airgapped-keyring to fix that the signing hd path was inconsistent in some edge case

* fix: avoid unnecessay navigation, fix ci

* refactor qr-hardware-popover with @zxing/browser

* update lavamoat policy, remove firefox CSP

* refine qr reader ui, ignore unnecessary warning display

* code refactor, use async functions insteads promise

Co-authored-by: Soralit <soralitria@gmail.com>
2021-11-23 13:58:39 -03:30
Jyoti Puri
fbc6f4e603
Adding network status section on edit gas fee modal (#12704) 2021-11-23 22:22:50 +05:30
Etienne Dusseault
49ae325d52
circle-icon (#12650) 2021-11-22 17:41:16 -08:00
Etienne Dusseault
8ce0eff047
alert-circle-icon (#12651) 2021-11-22 17:40:33 -08:00
Dan J Miller
d296c517db
Remove localhost from default network list (#12790)
* Remove localhost from default network list

* Update e2e fixtures
2021-11-22 19:02:03 -03:30
Jyoti Puri
42fea3d323
Confirm transaction screen - wrap lengthier values (#12733) 2021-11-22 22:49:29 +05:30
Dan J Miller
2647be9662
Ensure one and only one localhost option appears in network list (#12786)
* Ensure one and only one localhost option appears in network list

* Fix unit tests
2021-11-22 12:54:42 -03:30
dragana8
367492a0af
Create an "Add a Nickname" popover (also support edit) #12528 (#12644)
* added update nickname popover

* fixed style errors

* styling changes

* fixed prettier error

* added header

* updates
2021-11-22 08:56:09 -03:30
Olusegun Akintayo
143a5c4a53
Increase friction to bypass estimated revert (#12576)
* If a transaction would revert/fail,
    1. hide the gas estimate info.
    2. Disable the confirm button.
    3. All user to enable the confirm button anyways.
    4. Do not show the default Transaction error message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Always return a value for hasSimulationError

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Use primary button of action message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove hasSimulationError from getErrorKey

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move confirm anyways logic to base component.
Change message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Disable edit if there's simulation error

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* hide confirm anyways button once clicked.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move Actionable Primary Action to flex-end

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix nested ternary lint issues

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* add !confirmAnyways to conditions to show GasDetails.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* ConfirmAnyways should be read from state

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Rename tryAnywayOption

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove await tick

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint issue fix

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes after rebase

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* description should show that it's content being tested.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* If a transaction would revert/fail,
    1. hide the gas estimate info.
    2. Disable the confirm button.
    3. All user to enable the confirm button anyways.
    4. Do not show the default Transaction error message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Always return a value for hasSimulationError

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Use primary button of action message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove hasSimulationError from getErrorKey

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move confirm anyways logic to base component.
Change message

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Disable edit if there's simulation error

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* hide confirm anyways button once clicked.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move Actionable Primary Action to flex-end

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix nested ternary lint issues

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* add !confirmAnyways to conditions to show GasDetails.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* ConfirmAnyways should be read from state

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Rename tryAnywayOption

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove await tick

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint issue fix

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes after rebase

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* description should show that it's content being tested.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Move simulation fails message inline with gas details component (#12705)

* Move simulation fails message inline with gas details component

* Remove old unit tests

Co-authored-by: Dan Miller <danjm.com@gmail.com>

* lint fix

* use an XOR operation.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* The changes in this file are no longer needed because we hide the edit button now

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2021-11-22 16:13:30 +04:00
Alex Donesky
b119b7744d
Add CollectiblesController & CollectibleDetectionController (#12443)
* Add CollectiblesController

* bump controllers version

* add CollectibleDetectionController

* adapt to ERC1155 support changes in CollectiblesController

* update @metamask/controllers to v20.0.0

* update lavamoat policy files

* put collectibleDetectionController instantiation behind feature flag
2021-11-19 10:16:41 -06:00
ryanml
fa25eb18b4
Don't dispatch hideTestNetMessage (#12748) 2021-11-18 14:14:03 -07:00
Jyoti Puri
2c6fb06114
Edit gas fee modal more changes (#12660) 2021-11-19 00:38:29 +05:30
ryanml
d6d35d9acb
Adding new nfts detected notice (#12721) 2021-11-18 11:30:56 -07:00
Jyoti Puri
0daefe9ea0
Adding edit gas fee modal (#12624)
Edit transaction screen changes for EIP-1559 V2
2021-11-18 23:24:58 +05:30
Mark Stacey
cce2dda8e4
Remove unused background API methods (#12731)
These background API methods were not used anywhere in the UI. One of
them was called in `actions.js` by a function that itself was never
called, so it have been removed. Additionally, one unused `actions.js`
function was found and removed as well.

`setAdvancedGasFee` is the only unused background method that remains.
It was recently added and will be used in the near future.
2021-11-17 15:03:36 -03:30
Daniel
ecceb4d6da
Use v2 API for fiat onboarding URL creation, fix wrapping / unwrapping (#12729)
* Use a Swaps v2 API to get a fiat onboarding URL

* Fix an issue with wrapping / unwrapping if an address contained uppercase chars

* Rename a constant

* Use a constant in a test
2021-11-17 18:04:50 +01:00
ryanml
dcffd5fbf8
Make ToggleButton keyboard accessible (#12727) 2021-11-17 08:38:20 -07:00
Dan J Miller
ab8db945cd
Ensure the test network dismissal message in the network dropdown is permanently dismissed (#12723) 2021-11-16 18:52:01 -03:30
ryanml
18969db4f7
Updates to network dropdown test network messaging (#12722)
* Updates to network dropdown test network messaging

* Updating text from Disable/enable -> Show/hide
2021-11-16 17:02:40 -03:30
ryanml
f7c6b3228b
Scroll to "show test networks" setting from network dropdown link (#12711)
* Scroll to "show test networks" setting from network dropdown link

* Focusing element
2021-11-15 17:00:23 -07:00
Olusegun Akintayo
0cf7455e18
addresses an issue found in 10.6.0 QA (#12710)
* addresses an issue found in 10.6.0 QA

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* update test cases.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fixes unit test texts to pass

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-11-15 18:34:09 -03:30
Dan J Miller
c84604b5e4
Adding scroll bar to handle overflow of long network lists (#12706)
* Adding scroll bar to handle overflow of long network lists

* set scroll property to auto

* Add margin below scrollable network list
2021-11-15 16:49:14 -03:30
Elliot Winkler
405b56c730
Replace history during onboarding (#12693) 2021-11-15 12:16:11 -07:00
George Marshall
bd9d976006
Updating Card ui component and adding story (#12666) 2021-11-15 13:13:54 -05:00
George Marshall
7d26bc6354
Updating Chip component (#12671) 2021-11-15 13:13:35 -05:00
ryanml
5712539a38
Implement 'Add NFT' screen (#12544)
* Implement 'Add NFT' screen

* Guarding added route with feature flag
2021-11-15 10:28:35 -07:00
ryanml
a2033377e9
Show correct base asset in Signature Request view (#12696) 2021-11-15 10:19:14 -07:00
Olaf Tomalka
a323a5fe59
Reject popup confirmations on close (#12643)
* Background clears confirmations on popup close

* [WIP] Remove clearing confirmations through UI

* Confirmations are now rejected instead of cleared

* Erased commented out code

* Fix linter errors

* Changes after code review

* Moved metrics events from onWindowUnload to background

* PR review fixes

* Added abillity to add reason to rejection of messages

* Fix prettier

* Added type metrics event to signature cancel

* Fix test

* The uncofirmed transactions are now cleared even if Metamask is locked
2021-11-15 17:13:51 +01:00
Dan J Miller
caee4f288d
Ensure approve button can be enabled when using ledger webhid (#12685) 2021-11-12 19:52:24 -03:30
Jyoti Puri
39cb29d5b5
Changes in edit link on confirm transaction page (#12567) 2021-11-13 00:39:59 +05:30
Jyoti Puri
4779bd9fe5
Show warning in confirm transaction screen for low/high gas values. (#12545) 2021-11-12 08:52:54 +05:30
Dan J Miller
9bc07f5e6b
Fix copy issues related to layer 2 fee changes (#12667) 2021-11-11 20:45:43 -03:30
Niranjana Binoy
7cf4a16a63
EIP-1559 V2 : Adding advancedGasFee property to Preference Controller (#12577) 2021-11-11 14:18:50 -05:00
Olusegun Akintayo
3de02a528c
We shouldn't be changing decimal places as user type, we should do that on blur. (#12631)
* We shouldn't be changing decimal places as user type, we should do that
on blur.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Refactor code.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Linter fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-11-11 22:16:28 +04:00
ryanml
4a04908048
Fixing MetaFox logo display on Approval Screen in full width (#12656) 2021-11-11 09:49:10 -07:00
Dan J Miller
9fa15dda6f
Support for Layer 2 networks with transaction fees on both layers (#12658)
* Support for Layer 2 networks with transaction fees on both layers

* Use  variable name in transaction-breakdown

* Add comment on code source to ui/helpers/utils/optimism/fetchEstimatedL1Fee.js

* Fix unit tests

* Ensure values passed to  are defined

* Fix activity log
2021-11-11 13:16:45 -03:30
Mark Stacey
faebdd0ccd
Add platform-specific build type manifest modifications (#12638)
The build system now supports platform-specific modifications to the
manifest for each build type. The need to customize the `id` on Firefox
motivated this change.

To support this, a new directory was made in each build type directory
for manifest changes. The images currently in this directory were moved
into an `images` subdirectory.

This new `manifest` directory can include each manifest file currently
in `app/manifest`. The `_base.json` file is assumed to exist, but the
platform manifest modifications are optional.
2021-11-10 19:33:59 -03:30
David Walsh
3f9ec40107
Use gas estimate type constants (#12460) 2021-11-10 13:50:43 -06:00
Elliot Winkler
ca3aa7b08d
Refactor tests for AdvancedGasInputs (#12445)
* Upgrade style from Enzyme to React Testing Library
* Use real i18n provider instead of a fake one so that we can look for
  English text instead of just i18n strings, improving readability
2021-11-10 12:24:29 -07:00
ryanml
a41e3b1925
Approval screen: Center justify address display content (#12639)
* Approval screen: Center justify address display content

* Removing width prop
2021-11-10 10:57:41 -07:00
ryanml
9ab6293129
Fix untranslated header text in AccountImportSubview (#12640)
* Fix untranslated header text in AccountImportSubview

* use styling for link spacing
2021-11-10 10:29:22 -07:00
PeterYinusa
dc19e1d5f6
Onboarding v2 e2e test (#12628)
* add data-testid's

* import wallet test

* create wallet test

* fix lint issues
2021-11-10 17:27:10 +00:00
Mark Stacey
ab2aca2c08
Fix lint errors (#12645)
These lint errors were accidentally introduced recently as a result of
merging #12530 and #12461
2021-11-10 10:54:17 -03:30
Jyoti Puri
a49a40fbbb
Adding GasFee context (#12530)
Adding GasFee context
2021-11-10 07:37:10 +05:30
igorms-cons
2c410f534d
Fix/ux papercuts account details issue #12292 (#12399)
* account details - updating ui

* account details - updating ui - version 2

* update qr-code scss in details account view

* account detail screen - create local eng label

* account detail update copy state
2021-11-09 07:28:21 -03:30
ryanml
7c60757814
Implementing display solution for testnets in the network dropdown (#12564)
* Implementing display solution for testnets in the network dropdown

* Update setting from 'Test networks' -> 'Show test networks'

* Add capability to dismiss testnets message

* span -> a
2021-11-08 13:58:23 -07:00
ryanml
33e253f532
Adding 'gap' prop to Box (#12611) 2021-11-08 09:26:03 -07:00
David Walsh
4b1c51aec5
Rename the function of the Ledger preference renaming (#12459) 2021-11-08 09:28:40 -06:00
Alex Miller
722c4e5b63
Support for GridPlus Lattice1 hardware wallet (#12053)
* GridPlus: Adds support for GridPlus Lattice1 hardware wallet

* Fixes issue with switching hardware HD path
The main `Select HD Path` piece of the account selection component was not
properly hooked up to the state manager (`onPathChange`) and the extra
`Popover` component was being used instead.
I'm not sure what the origin of this is, but I don't see why the Popover
is needed at all. I have remove it and hooked `onPathChange` directly into
the HD path selector dropdown.
This was an issue that nearly every Lattice user who had come from Ledger
has contacted us about.

* GridPlus: Addresses QA issues
* Adds Lattice tutorial + image
* Cleans up connectivity issues (see: https://github.com/GridPlus/eth-lattice-keyring/pull/16)

* GridPlus: Adds Firefox support
To connect to the Lattice you need to open a new tab/window and get
login data from it. We were not able to do this for Firefox because
we relied on the `window` API. This is now fixed.
See corresponding changes:
* `eth-lattice-keyring`: https://github.com/GridPlus/eth-lattice-keyring/pull/17
* Lattice connector: https://github.com/GridPlus/wallet-web/pull/152

* GridPlus: Adds missing error path for Firefox
See: 242a93f559
2021-11-08 11:18:41 -03:30
Dan J Miller
87ab272a5a
Throw, and not just display, ledgerDeviceOpenFailureMessage on failed to open device error in ledger connect flow (#12613) 2021-11-07 17:37:15 -07:00
David Walsh
17b64e94fc
Use gas recommendation constants throughout app (#12461) 2021-11-05 19:59:23 -05:00
ryanml
accfd0b049
Updating default collectibles tab view (#12575) 2021-11-05 14:23:28 -07:00
Dan J Miller
a6d0f379ad
Add Ledger connection flow warning message for failed to connect device error (#12604) 2021-11-05 18:02:53 -02:30
Jyoti Puri
4757eed2f6
Fix build (#12606) 2021-11-06 00:50:27 +05:30
Jyoti Puri
3dfc1cc5f6
Edit transaction screen changes for EIP-1559 V2 (#12493)
Edit transaction screen changes for EIP-1559 V2
2021-11-05 22:53:15 +05:30
Dan J Miller
e6ae6e09b8
Ensure proper transport type is set before attempting to connect ledger wallet (#12594)
* Ensure proper transport type is set before attempting to connect ledger wallet

* Fix unit tests
2021-11-05 13:43:29 -02:30
VSaric
65984291b6
Changed ETH decimal values to have 8 places for sending (#12437)
* Changed ETH decimal values to have 8 places for sending

* Fixing unit tests

* Fixing test-lint
2021-11-05 07:52:03 -07:00
dragana8
6d786a7bbf
hide eth amount (#12435)
fix

review updates

moved logic to upper component
2021-11-05 06:42:23 -02:30
Niranjana Binoy
524725b24b
Network tab refactor (#12502) 2021-11-04 17:48:21 -04:00
Dan J Miller
843bb6e047
Check if ledger was successfully able to establish transport on confirm screen mount (#12535)
* Check if ledger was successfully able to establish transport on mount of confirm screens

* Update ledger message/action if transport creation was blocked by existing connection

* TEMP: point eth-ledger-bridge-keyring to commite, REMOVE BEFORE MERGE

* Update eth-ledger-bridge-keyring to v0.10.0
2021-11-04 15:49:53 -02:30
VSaric
f98b21e750
Heading on contact details view in popup should say "Details" instead of contact name (#12380)
* Change contact details view in popup to show "Details" instead of contact's name

* Changed contact details view in popup
2021-11-04 04:28:50 -02:30
igorms-cons
59054519ba
Show account name & full address in send view - issue #12346 (#12415)
* account name & address in send view UI update & fix

* update scss in send modal view

* send account address - refacto func
2021-11-04 04:28:32 -02:30
Dan J Miller
958535d5df
Ledger WebHID What's New popup (#12501)
* Add notification for ledger live users about how they can switch to WebHID

* Add action button so that users can go right to settings from the what's new popup

* Fix

* Add notification 8 to e2e fixtures

* Lint fix

* Update ledger webhid notification wording

* Update app/_locales/en/messages.json

* Update ui/selectors/selectors.js
2021-11-03 20:05:39 -02:30
David Walsh
3e0d602d22
Fix fllWidth proptype error (#12555) 2021-11-03 15:28:29 -05:00
Hassan Malik
baa4eb2d82
Remove hexdata field from token send (#12565)
* added acccess to asset from state, updated SendHexDataRow display logic

* fixed invalid propType and updated tests

* updated logic and tests to only disable hex data field for TOKEN (ERC-20) types
2021-11-03 15:03:54 -04:00
igorms-cons
803576c7d7
Fix/ux papercuts transaction details issue #12295 (#12401)
* transaction details - update ui

* update lint scss

* update sender & recipient name ui
2021-11-03 12:56:25 -02:30
VSaric
64e45c801d
Warn the user of insufficient funds when approving a token (#12496)
* Warn the user of insufficient funds (ETH for gas) when approving a token

* Fixing code lines while run yarn lint:fix

* Fixing test-e2e-chrome

* Fixing e2e tests

* Create shouldDisplayWarning variable
2021-11-03 12:43:31 -02:30
Olusegun Akintayo
95e3be4a85
UX improvements to the "Permission Request" section on the approve screen (#12553)
* UX improvements to the "Permission Request" section on the approve screen

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix locales.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Check that hidden elements are hidden in test

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-11-03 02:15:05 +04:00
Dan J Miller
8ae90aec0e
Ensure exchange rate is stringified before passing to bignumber in confirm-token-transaction component (#12550) 2021-11-02 05:53:12 -02:30
Dan J Miller
1fa4b5c776
Don't show ledger live option in advanced settings if using firefox (#12494)
* Don't show ledger live option in advanced settings if using firefox

* Hide ledger transport selector in advanced settings on firefox
2021-11-02 04:54:24 -02:30
Erik Marks
a2d3d942ec
Exclude files from builds by build type (#12521)
This PR enables the exclusion of JavaScript and JSON source by `buildType`, and enables the running of `eslint` under LavaMoat. 80-90% of the changes in this PR are `.patch` files and LavaMoat policy additions.

The file exclusion is designed to work in conjunction with our code fencing. If you forget to fence an import statement of an excluded file, the application will now error on boot. **This PR commits us to a particular naming convention for files intended only for certain builds.** Continue reading for details.

### Code Fencing and ESLint

When a file is modified by the code fencing transform, we run ESLint on it to ensure that we fail early for syntax-related issues. This PR adds the first code fences that will be actually be removed in production builds. As a consequence, this was also the first time we attempted to run ESLint under LavaMoat. Making that work required a lot of manual labor because of ESLint's use of dynamic imports, but the manual changes necessary were ultimately quite minor.

### File Exclusion

For all builds, any file in `app/`, `shared/` or `ui/` in a sub-directory matching `**/${otherBuildType}/**` (where `otherBuildType` is any build type except `main`) will be added to the list of excluded files, regardless of its file extension. For example, if we want to add one or more pages to the UI settings in Flask, we'd create the folder `ui/pages/settings/flask`, add any necessary files or sub-folders there, and fence the import statements for anything in that folder. If we wanted the same thing for Beta, we would name the directory `ui/pages/settings/beta`.

As it happens, we already organize some of our source files in this way, namely the logo JSON for Beta and Flask builds. See `ui/helpers/utils/build-types.js` to see how this works in practice.

Because the list of ignored filed is only passed to `browserify.exclude()`, any files not bundled by `browserify` will be ignored. For our purposes, this is mostly relevant for `.scss`. Since we don't have anything like code fencing for SCSS, we'll have to consider how to handle our styles separately.
2021-11-01 20:20:31 -07:00
filipsekulic
0c229e2d4a
Fixed approve confirmation logic (#12511) 2021-11-01 20:38:41 -05:00
ryanml
1390d72259
Adding flexWrap prop to Box (#12542) 2021-11-01 12:16:23 -07:00
Dan J Miller
db20399d81
Turn off all old notifications (#12500)
* Turn off all old notifications

* Remove unnecessary attempt to close whats new popup in e2e test

* Remove unneeded whats new popup closes in e2e tests

* Lint fix
2021-11-01 08:16:05 -02:30
ryanml
b058cbed3b
Fixing COLORS.GRAY (#12538) 2021-10-30 11:04:09 -07:00
Etienne Dusseault
6f6576917c
Add settings-component to Storybook (#12086)
* settings

* add id filename

* remove platform version

* readd platform version
2021-10-29 20:40:32 -03:00
George Marshall
d72f7295a3
Docs/12367 Adding storybook essentials addons (#12393)
* Adding storybook essentials and documentation contribution guidelines

* Deprecation updates

* Update ui/2.DOCUMENTATION.stories.mdx

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>

* Updating spelling and adding label to i18n-party plugin in toolbar

Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2021-10-29 07:22:07 -10:00
ryanml
487080bd16
Adding backgroundColor prop to Box (#12524) 2021-10-29 10:02:10 -07:00
Olusegun Akintayo
7e7d0c13f4
Show error if user have insufficient gas. (#12531) 2021-10-29 19:45:50 +04:00
Jyoti Puri
ab1877ae0e
Deleting old GasFeeInputs hook (#12526) 2021-10-29 20:12:31 +05:30
filipsekulic
6221365980
Update icons on the settings page (#12359) 2021-10-29 09:25:23 -02:30
Mark Stacey
90e55a445e
Add static files for the Flask build (#12518)
Static files have been added for the Flask build. This includes logos
of each size and variety that we use, and it includes the 3D model JSON
file.

Closes #12427
2021-10-28 23:05:58 -02:30
David Walsh
a83d50a489
Provide instructions for users switching from Ledger Live to WebHID (#12519) 2021-10-28 18:38:58 -05:00
Mark Stacey
e067379f48
Remove the partially-applied dark mode styles used for beta (#12489)
The beta build currently has a couple of UI elements (the horizontal
logo and the app header) set to "dark mode", even though nothing else
in our UI supports dark mode yet. These styles have been removed. We
should make the entire UI support dark mode all at once at a later
date.

Also the horizontal logo used for beta was named incorrectly; the dark
and non-dark logos were swapped. They have been switched back so that
the logo that ends with `-dark` is for dark mode.
2021-10-28 17:29:20 -02:30
Olusegun Akintayo
b6673731e2
Implement Network Switcher designs (#12260)
* Show test networks toggle button in settings/advanced tab.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Apply toggle testnet settings and show/hide testnets when on/off
Add localhost to testnet.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Show add network button

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Open full screen when add network is called.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Show custonm rpc before testnet rpcs
lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Test cases for network dropdown.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Test cases for toggle test networks in advanced tab component.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix Locales.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* E2E Tests: Custom RPC is now called Add Network

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fix

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* E2E: When Add Network button is clicked, wait for the full screen window to
be visible

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* findVisibleElement should use a class. i.e start with a dot

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Hide Dropdown when Add Netwok is clicked.
Only show full screen if it's not already showing.
E2E tests passing.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix tests for jest

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Testnets are not being shown by default anymore, tests should use
Mainnet instead.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Import Button from ui
Change selector name to getShowTestnetworks
Fix button to show full width

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix e2e tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove localhost from INFURA provider types.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix errors in Advanced Tab Component tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Fix unit tests for advanced tab component.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Remove deleted elements from e2e tests

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Make sure all tests passed.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-10-28 23:31:05 +04:00
ryanml
64e4ce19bc
Updating dapp learn more link (#12515) 2021-10-28 12:18:48 -07:00
Niranjana Binoy
e42fb0d640
Approve screen header and sub-header improvement (#12360) 2021-10-28 15:16:03 -04:00
Daniel
e8944e0a5d
Don't show "Unavailable on this network" if Swaps button is enabled (#12513)
* Don't show "Unavailable on this network" if Swaps button is enabled

* Hide a tooltip title if tooltip is disabled

* Update a snapshot
2021-10-28 19:36:04 +02:00
ryanml
75b032590b
Adding metrics event for Advanced Options (EditGasDisplay) (#12507) 2021-10-28 10:06:16 -07:00
David Walsh
6e928c661e
Create function for hardware keyring checking (#12457) 2021-10-27 18:54:18 -05:00
ryanml
05a80ebeba
Adding collectibles feature flag, default NFT tab (#12463)
* Adding COLLECTIBLES_V1 feature flag

* Adding NFT's tab to home screen, default CollectiblesList view

* Handling null children in Tabs component
2021-10-27 09:55:14 -07:00
Niranjana Binoy
532927368d
Network Form Design and switch to full screen enhancements (#12302) 2021-10-25 16:38:43 -04:00
Elliot Winkler
06fafae7b4
Update NumericInput to remove PropTypes warning (#12446)
Use oneOfType, not oneOf, to specify a union type.
2021-10-25 10:19:50 -06:00
Alex Donesky
385e0f2ad4
fix missing conversion rates in swaps token drop down (#12420)
* fix missing conversion rates in swaps token drop down

* make defaultToken appear at the top of the owned section of the dropdown with full renderable data regardless of whether swaps tokens are available

* revert change to filter non-native tokens with symbol ETH
2021-10-25 10:03:21 -05:00
ryanml
a4ddeed799
Adding estimate fields to updateTransaction, createCancelTransaction and createSpeedUpTransaction (#12398) 2021-10-22 13:42:20 -07:00
Jyoti Puri
79b08fb803
Refactoring useGasFeeInputs hook (#12327)
Refactoring useGasFeeInputs hook
2021-10-22 22:44:28 +05:30
Dan J Miller
9d70c60c22
Connect Ledger via WebHID (#12411)
* Connect ledger via webhid if that option is available

* Explicitly setting preference for webhid

* Use ledgerTransportType enum instead of booleans for ledger live and webhid preferences

* Use single setLEdgerTransport preference methods and property

* Temp

* Lint fix

* Unit test fix

* Remove async keyword from setLedgerTransportPreference function definition in preferences controller

* Fix ledgelive setting toggle logic

* Migrate useLedgerLive preference property to ledgerTransportType

* Use shared constants for ledger transport type enums

* Use constant for ledger usb vendor id

* Use correct property to check if ledgerLive preference is set when deciding whether to ask for webhid connection

* Update eth-ledger-bridge-keyring to v0.9.0

* Only show ledger live transaction helper messages if using ledger live

* Only show ledger live part of tutorial if ledger live setting is on

* Fix ledger related prop type errors

* Explicitly use u2f enum instead of empty string as a transport type; default transport type to webhid if available; use constants for u2f and webhid

* Cleanup

* Wrap ledger webhid device request in try/catch

* Clean up

* Lint fix

* Ensure user can easily connect their ledger wallet when they need to.

* Fix locales

* Fix/improve locales changes

* Remove unused isFirefox property from confirm-transaction-base.container.js

* Disable transaction and message signing confirmation if ledger webhid requires connection

* Ensure translation keys for ledger connection options in settings dropdown can be properly detected by verify-locales

* Drop .component from ledger-instruction-field file name

* Move renderLedgerLiveStep to module scope

* Remove ledgerLive from function and message names in ledger-instruction-field

* Wrap ledger connection logic in ledger-instruction-field in try catch

* Clean up signature-request.component.js

* Check whether the signing address, and not the selected address, is a ledger account in singature-request.container

* Ensure ledger instructions and webhid connection button are shown on signature-request-original signatures

* Improve webhid selection handling in select-ledger-transport-type onChange handler

* Move metamask redux focused ledger selectors to metamask duck

* Lint fix

* Use async await in checkWebHidStatusRef.current

* Remove unnecessary use of ref in ledger-instruction-field.js

* Lint fix

* Remove unnecessary try/catch in ledger-instruction-field.js

* Check if from address, not selected address, is from a ledger account in confirm-approve

* Move findKeyringForAddress to metamask duck

* Fix typo in function name

* Ensure isEqualCaseInsensitive handles possible differences in address casing

* Fix Learn More link size in advanced settings tab

* Update app/scripts/migrations/066.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update ui/pages/settings/advanced-tab/advanced-tab.component.test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Add jsdoc comments for new selectors

* Use jest.spyOn for mocking navigator in ledger webhid migration tests

* Use LEDGER_TRANSPORT_TYPES values to set proptype of ledgerTransportType

* Use LEDGER_TRANSPORT_TYPES values to set proptype of ledgerTransportType

* Fix font size of link in ledger connection description in advanced settings

* Fix return type in setLedgerTransportPreference comment

* Clean up connectHardware code for webhid connection in actions.js

* Update app/scripts/migrations/066.test.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Update ui/ducks/metamask/metamask.js

Co-authored-by: Mark Stacey <markjstacey@gmail.com>

* Add migration test for when useLedgerLive is true in a browser that supports webhid

* Lint fix

* Fix inline-link size

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-10-21 16:47:03 -02:30
ryanml
1a1fa3aac5
Removing unused prop/code paths from EditContact (#12419) 2021-10-21 10:05:50 -07:00
David Walsh
3f687ff45f
Use ternary conditionals instead of && (#12406) 2021-10-21 11:11:31 -05:00
VSaric
5fea5fac8c
Adding copy to SRP import screen to warn users (#12400)
* Added copy to SRP import screen to warn users that there current wallet will be replaced

* Fixing test-lint error

* Remove padding and edit warning message
2021-10-21 06:20:17 -02:30
Alex Donesky
f733857388
Onboarding V2 Cleanups (#12417)
* remove the onboarding V2 feature flags used for dev, some remain until we're ready to make the switch

* update route

* add setCompletedOnboarding dispatch to submission on privacy-settings view

* update privacy-settings test
2021-10-20 13:55:59 -05:00
Akintayo A. Olusegun
03e3edb00c
Refactor checking if address is contract into a new module. (#12354)
* Refactor checking if address is contract into a new module.
Tests for new module.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* addressIsContract is an async function, use await when calling it.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Mock ethQuery
change variable names
refactor in transaction.utils.
fix possible boolean destructiring.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Refactor isContractAddress boolean checks.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>

* Lint fixes

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2021-10-20 16:12:07 +01:00
Alex Donesky
83d5eec2dc
centralize min gas const (#12387) 2021-10-19 14:31:56 -05:00
David Walsh
d90ac2d8e6
Fix 12192 - Implement new metametrics onboarding screen (#12282) 2021-10-19 12:01:42 -05:00
David Walsh
16d741348e
Fix #12190 - Implement new pin extension view for onboarding (#12290) 2021-10-18 17:33:42 -05:00
David Walsh
9fa1e42031
Prevent warning for rounded buttons (#12357) 2021-10-18 14:52:44 -05:00