* ConfirmPage: setApproveForAll use danger-primary
* ConfirmPageContainer: add setApprovalForAll dialog
- https://consensys.slack.com/archives/GTQAGKY5V/p1660061693528129
- temp UI to add protections for user until new redesign is implemented
* ConfirmPageContainer: use px instead of rem
Co-authored-by: George Marshall <george.marshall@consensys.net>
* ConfirmPageContainer: update SetApprovalForAll msg
Co-authored-by: George Marshall <george.marshall@consensys.net>
* addding the legacy tokenlist, tuning token detection OFF by default, adding new message while importing tokens
updating the controller version and calling detectNewToken on network change
fixing rebase error
Run yarn lavamoat:auto for updating policies
updating lavamoat
Deleted node modules and run again lavamoat auto
fixing rebase issues
updating lavamoat policies
updating lavamoat after rebasing
policies
updating custom token warning and blocking detectedtoken link when tpken detection is off for supported networks
to update the token in fetchTosync
updating the contract map object
Revert build-system lavamoat policy changes
Move token list selection logic from components to getTokenList selector
updating the tokenList
Update lavamoat
Fix error
updating lavamoat
lint fix
fix unit test fail
fix unit test fail
lint fix
fixing rebase locale error
rebase fix
Revert build-system policy changes
temp
addressing review comments
* rebase fix
* Backup user data
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Tests for prependZero (utils.js)
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Fix advancedtab test
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
backup controller tests
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Lint fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Backup controller don't have a store.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Restore from file.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Advanced Tab tests
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Lint fix
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
e2e tests for backup
unit tests for restore.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Fix comments on PR.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
restore style
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Lint fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
We should move the exportAsFile to a utility file in the shared/ directory
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Move export as file to shared folder
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Refactor create download folder methods
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Move the backup/restore buttons closer to 3box
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Change descriptions
Add to search
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
refactor code to use if instead of &&
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Lint fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Restore button should change cursor to pointer.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Fix restore not uploading same file twice.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Do not backup these items in preferences
identities
lostIdentities
selectedAddress
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Only update what is needed.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fixed test for search
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* remove txError as it currently does nothing.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Remove dispatch, not needed since we're not dispatching any actions.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Event should be title case.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Make backup/restore normal async functions
rename event as per product suggestion.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Use success Actionable message for success message and danger for error
message
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* change event name to match with backup
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* lint fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* fix e2e
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Created a logic for the 'Add a block explorer URL'
Removed unused message
Message logic rollback
Modified history push operation
WIP: Pushing before rebasing
Applied requested changes
Removed unintenionally added code
* Lint fix
* Metrics fixed
* set more appropriate default for ticker symbol when wallet_addEthereumChain is called
* throw error to dapp when site suggests network with same chainId but different ticker symbol from already added network, instead of showing error and disabled notification to user
* Fix warning dialog when sending tokens to a known token contract address
Fixing after rebase
Covering missed cases
Rebased and ran yarn setup
Rebased
Fix checkContractAddress condition
Lint fix
Applied requested changes
Fix unit tests
Applying requested changes
Applied requested changes
Refactor and update
Lint fix
Use V2 of ActionableMessage component
Adding Learn More Link
Updating warning copy
Addressing review feedback
Fix up copy changes
Simplify validation of pasted addresses
Improve detection of whether this is a token contract
Refactor to leave updateRecipient unchanged, and to prevent the double calling of update recipient
Update tests
fix
* Fix unit tests
* Fix e2e tests
* Ensure next button is disabled while recipient type is loading
* Add optional chaining and a fallback to getRecipientWarningAcknowledgement
* Fix lint
* Don't reset recipient warning on asset change, because we should show recipient warnings regardless of asset
* Update unit tests
* Update unit tests
Co-authored-by: Filip Sekulic <filip.sekulic@consensys.net>
* add fallback image/card for collectibles when image was not fetched correctly or does not exist
* UI and storybook updates (#15071)
* UI and storybook updates
* Adding break so token id is displayed
* subtle border fix
* Updating content
* Removing unused image
* Adding proptype descriptions
* Lint fix
Co-authored-by: George Marshall <george.marshall@consensys.net>
* When background port closes, UI should display a user friendly error.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Remove console.log
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
A couple of fixes
1. Use timeout in metaRPCClientFactory to check if UI can't
communicate with bg
2. Refactor locale setup
3. Fixed wording/capitalization
4. Fix locales usage so that linting works
5. Refactor CSS
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
do not simulate errorwq
Refactor loading css
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Remove the onDisconnect event handler in ui as this is handled in
metarpcclientfactory
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Do not throw in bg
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Fix PR comments
Remove unused message 'failedToLoadMessage'
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Move usage of locales to shared/** so that linter can see it.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Do not simulate error.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
metarpc can handle multiple requests, responseHandled should be a map.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
reload metamask button on critical error
Use metamask state (if available) to the locale, else read locale files
manually.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
use constant and numeric separator
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
refactor error utils
remove error simulation
Memoize setupLocale function
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
test cases
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Do not simulate error
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
1. store should be metamask state
2. code refactorings.
Tests: mock setupLocale
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Mock fetchLocale instead
Test setup locale
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
UI/CSS changes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
Do not simulate failure
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* spell MetaMask correctly
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Rename state to mockStore
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* we should clean up this.responseHandled[id] in the error case.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fixed PR comments.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* clean up response handled.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Show fiat on confirm screen on multilayer-fee network
* Disable gas editing on optimism
* Fix send max mode on optimism
* Represent layer 2 gas fee as a single value
* Hide gas fee edit UI on optimism
* Improvement multilayer-fee-message styling
* Lint fix
* Fix locales
* Remove unnecessary code change
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
- Don’t call /estimateGas if a user doesn’t have enough funds
- Hardcode block explorer URLs for Swaps
- Track the "stx_prev_user_opt_in" param
- Add fee estimates tracking for regular txs and STX
- Track estimated_gas and estimated_vs_used_gasRatio for STX
- Only track the "Error Smart Transactions" event once
- Don't overwrite "maxGasLimit" for STX on the View Quote page for better "balance needed" estimations
- Update description for Transak
- Fix styles for the input field on the Build Quote page
- Refactor variables for STX error types and add translation for each STX error type
- Do additional logging for the "current_stx_enabled" param
- Add a close icon for an STX notification, update STX content
* Initial implementation of new SrpInput component
This new version of the SrpInput component uses a separate field for
each word of the SRP. Only one field can be revealed at a time, making
it less likely that it gets accidentally revealed to somebody.
* Fix copy mistakes
* Move container div from 'create vault' to 'srp-input', and setup grid layout
* Increase size of title
* Remove hard-coded width in Storybook to allow testing different viewport sizes
* Improve layout
* Improve margins
* Update dropdown text
* Expand SRP input section
* Remove unused localized messages
* Update dropdown option names in unit tests
* Replace checkbox with show/hide toggle
* Remove unused localized message
* Fix 'data-testid' prop name
* Fix e2e test imports using paste
* Use 'ActionableMessage' component for error message
* Convert error popover to actionable message
* Add tip about pasting the SRP
* Remove invalid prop
The "info" style of `ActionableMessage` is the default, so no type is
required.
* Use more readable test convenience methods
The method `toBeInTheDocument()` is now used over `not.toBeNull()` to
improve the readability of tests. Likewise, the convenience method
`.clear` is now used to clear fields rather than manually entering the
key combination to clear a field.
* Fix misspelled word
* fix issue where we show contract address as recipient when calling safe transfer method on erc721 or erc1155 contracts
* updates function name getTransactionData -> parseStandardTokenTransactionData, and adds documentation
* Initial native notification implementation
* Simplify implementation
* Implementation based on RateLimitController
* Update controllers package
* Add notification to permission list
* Wire up correctly
* Remove snap_notify from the exclusion list
When the gas API is down, the logic we use will no longer compute all of
the data that the gas API returns in order to reduce the burden on
Infura. Specifically, only estimated fees for different priority levels,
as well as the latest base fee, will be available; all other data
points, such as the latest and historical priority fee range and network
stability, will be missing. This commit updates the frontend logic to
account for this lack of data by merely hiding the relevant pieces of
the UI that would otherwise be shown.
* make use of getTokenStandardAndDetails method exposed on assetsContractController to determine how to represent the contract being interacted with in token contract method calls
* adding new message while converting token to nft if the nft is already added via nft flow.
* updating the copy
Co-authored-by: Alex Donesky <adonesky@gmail.com>
Co-authored-by: Alex Donesky <adonesky@gmail.com>
* Secure you wallet page
* Remove seedPhraseIntroSidebarBulletThree from messages.json
* Change the second bullet from Figma design
* Requested review changes
* fix error with color variable - fix rebase
* clean list search & fuse threshold decreased
* update search-icon , fix tests
* nice to have highlighting text & cleaning
* unit test on settings & search input ui up on expanded view
* fix color variable in alert scss
* setting search input padding right up
* fix dom warning
* util/search test added & Dom element warning fix
* renaming files
* fix color text in settings search
* settings search highlight text refacto & fix ui
* fix settings-search test & renaming
* Fix styling on search field for edge cases, update components and e2e
E2E tests update for search feature
Update components from class to functional component
#
Fix storybook for search box
Fix styling
Fix unit tests
fix: remove z-index
Fix unit tests
Co-authored-by: amerkadicE <amer.kadic@endava.com>
* Created new screen/page "Token details"
* Change color in scss
* Modify elements to the latest requirements and added unit tests
* Review requested changes
* Condensing files into one component
* Added unit tests for token details page
* Added redirection when switching networks, added image for a token and update unit tests
* Requested review changes
* Modify index.scss regarding of the requested review
* Delete data-testid's from Typography and token-details-page.js
* Requested review changes
This PR adds `snaps` under Flask build flags to the extension. This branch is mostly equivalent to the current production version of Flask, excepting some bug fixes and tweaks.
Closes#11626
The form used for creating a vault on the "Import" page of onboarding
and on the "Restore vault" page is nearly identical, yet the
implementation is totally separate. It has now been extracted to a
separate component, consolidating the two implementations.
There is a "terms of use" checkbox on the import page that isn't on the
restore vault page, so that part has been made optional. The "submit"
button text differs between the two uses as well, so that is
customizable.
There are slight styling differences between the old and new versions
of this form. The fonts and spacing are all using our new standard
design system guidelines, and we're using our standard checkbox now as
well. The spacing and font sizes were chosen somewhat arbitrarily by me
to resemble the old styles, so please feel free to suggest changes if
you think they can be improved upon.
There are some slight copy changes to the "Restore vault" page as well;
the placeholder text and the label for the "Secret Recovery Phrase"
field now matches the "Import" page copy.
These messages were removed from the `en` locale in #13244, but they
were not deleted because that branch was not up-to-date when it was
merged, and the translations were recent additions (#13206)
* Update the copy for the Flask welcome page (#13223)
* Update the copy for the Flask welcome page
The copy for the Flask Welcome page has been updated to better dissuade
users who are not the target audience, and to better explain the risks
of using Flask.
* Fix typo
* Suggested edits (#13225)
* Suggested edits
* fixup! Suggested edits
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
* Update app/_locales/en/messages.json
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
When a lot of transactions are occurring on the network, such as during
an NFT drop, it drives gas fees up. When this happens, we want to not
only inform the user about this, but also dissuade them from using a
higher gas fee (as we have proved in testing that high gas fees can
cause bidding wars and exacerbate the situation).
The method for determining whether the network is "busy" is already
handled by GasFeeController, which exposes a `networkCongestion`
property within the gas fee estimate data. If this number exceeds 0.66 —
meaning that the current base fee is above the 66th percentile among the
base fees over the last several days — then we determine that the
network is "busy".
The `appNameFlask` and `appNameBeta` are mandatory because they are
used by the Chrome Web Store, but they are missing from some locales.
This will prevent submitting either of these build types.
These two messages have been added to all locales. The English name has
been used everywhere, since this is a brand name and brands are often
not translated. We can update this to something more appropriate for
other locales in the future if necessary.
* added wrapper around account list to prevent storybook from collapsing the list
* updated translation files
* added snap-connect page
* refactored account list out of the choose account component
* fixed width
* removed unnecessary scss from choose-account component, fixed props in choose account story
* removed snaps-connect page, added comments to ChooseAccount
* updated choose account subtitle text, updated styling for title & subtitle, removed redundant account list story
* updated component name, updated paths
* fixed linter errors
* added comments
* removed unused message
* removed selectAccounts key from all locales
* updated class name for account list header, updated allAreSelected function to use length checks
* Revert "removed unused message"
This reverts commit 32771bc83c08f120825ef75f0741f3034e7dbecb.
* Revert "removed selectAccounts key from all locales"
This reverts commit ccfa4a860f9a75693d893d7c404384e719de297e.
* updated locale messages to use selectAccounts key
* removed stray import
* updated scss
* updated translation key
* removed chooseAccounts key from en locale
* removed optional chaining
* changes
* updated subjectMetadata
* updated subject types
* update useOriginMetadata function to include unknown subject type
* updated permission connect header props, removed host and added subjectType to targetSubjectMetadata
* added subjectType to targetSubjectMetadata
* removed console.log
* changed prop name to iconUrl
* Fix tx-insight accreditation styling
- Ensure "Etherscan" appears capitalized
- Ensure messages are separated by newline
- Handle case where server returns `fetchedVia` that frontend doesn't
support
* Revert "Fix tx-insight accreditation styling"
This reverts commit f7121d23cf9e5cf37e18444793933c36b66d9028.
* New Fix tx-insight accreditation styling
Co-authored-by: Dan Miller <danjm.com@gmail.com>
* feature: adding support for truffle and etherscan accreditation
* Fix scss linting
* fix styling and classnames
* Switch font size to rem
* Update ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Update ui/components/app/transaction-decoding/components/ui/accreditation/index.scss
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Update ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Update ui/components/app/transaction-decoding/components/ui/accreditation/accreditation.component.js
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
* Fix linting
Co-authored-by: g. nicholas d'andrea <gnidan@trufflesuite.com>
Co-authored-by: Dan J Miller <danjm.com@gmail.com>
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: g. nicholas d'andrea <gnidan@users.noreply.github.com>
* Ensure that function representation on hex and data tabs are consistent
* Don't show redundant hex tab when deploying contract
* Show standard pointer cursor on error messages in tx-decoder component
* Don't show activity log for incoming transactions
* Update localization
* Fix error message
* Update EIP-1559 UI on the View Quote page (WIP)
* UI redesign for the View Quote page in Swaps, update tests, refactoring
* Update styles for the View Quote page
* Improve scrolling and styling for the View Quote page
* Update snapshots
* Fix a scrolling issue
* Use Ethereum mainnet for swaps API calls if it's Rinkeby
* UI / content updates on the View Quote page
* Remove unused content in Swaps
* Fix an ESLint issue
* Update UTs with the latest content
* Renaming
* Remove 2 more unused content strings
* conversion date fix
* update in settings conversion date - no internet
* update conversionDate fetch - setting container
* no currency date message updated
* 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>
* 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
* 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>
* 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>
* 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>
* 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
* 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
* 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
* 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
* 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
* 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>
* 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>
* 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>
* 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
* Add target object word to "View on Etherscan" links
Fix for: #9476
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix Swap tests checking for View $1 at or View $1 on
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Linter Fixes
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix ui/hooks/useTransactionDisplayData.test.js expected result should
be May 13, 2020
Update Jest snapshot for view on etherscan test
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Add description of the variables in messages.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* 1. localize all of the blockExplorerViewAction values
2. Apply this nit. https://github.com/MetaMask/metamask-extension/pull/12100#discussion_r708343532
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Lint fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix locale value not used on GUI error lint error.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Reverted this commit, on circle ci, the date is May 12.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Add description to link block explore actions to where it's used.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Fix missing messages.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Replace hardcoded sent ether label on confirm screen
* replace transaction type SENT_ETHER with network agnostic SENDING_NATIVE_ASSET
* remove sentEther translation base
* make backwards compatible with lingering transaction of legacy sentEther type
* update localalization files
* fixup legacy sentEther transaction type
* changing new transaction type away from localization string
* revert migration tests
* update fixtures and test data
* update name of new transaction type
* add migration
* remove legacy SENT_ETHER from transaction types enum object
* Update contract address validations in swaps for different networks
* Add support for direct contract swaps for wrapping and unwrapping
* Add WETH_RINKEBY_CONTRACT_ADDRESS
* Change the [domain] suggested gas fee (i) to Estimated gas fee (i)
Change that line's color from orange to black
Under that line, add Site suggested in italics in gray.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* liinter fixes.
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
* Increase warning saliency of qr sync
* Remove duplciate locale entries
* Revise wording per Antonela feedback
* Avoid all caps
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>