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

4753 Commits

Author SHA1 Message Date
SebSeb11
dc951c505a
fix minor german translation issue. connected=verbunden (#14997) 2022-06-21 21:37:43 -07:00
Dan J Miller
ac7245b50c
Destroy ledger keyring when removing last account in ledger keyring (#14993)
* Destroy ledger keyring when removing last account in ledger keyring

* Update unit tests
2022-06-21 16:33:54 -02:30
Frederik Bolding
82645ba516
[FLASK] snaps-skunkworks@0.16.0 (#14952)
* snaps-skunkworks@0.16.0

* Bump iframe-execution-environment

* Add getAppKey

* Regen LavaMoat policy

* Bump test-snaps
2022-06-20 10:13:12 +02:00
Erik Marks
b491367632
[FLASK] Rename workerController to snapExecutionService (#14981)
Renames the `MetaMaskController.workerController` property to `snapExecutionService`, which better matches the naming scheme used throughout the Snaps codebase. No functional changes.
2022-06-19 10:15:02 -07:00
Jyoti Puri
843beb6d20
MV3: fix injection of applyLavamoat variable in service worker (#14920) 2022-06-18 12:40:30 +05:30
Frederik Bolding
4048feeaac
Increase likelyhood of valid method signatures being returned by getMethodData (#14937)
* Increase likelyhood of valid method signatures being returned by getMethodData

* Update coverage

* Update coverage

* Update coverage

* add a migration to clear knownMethodData

* Small typo changes

Co-authored-by: Alex <adonesky@gmail.com>
2022-06-17 23:11:09 +02:00
ricky
3d74d06f93
Add missing subtitles for secret recovery phrase (#14943)
* add missing subtitles

* Update subtitles map

* update subtitle map in onboarding v2 flow

Co-authored-by: Alex <adonesky@gmail.com>
2022-06-17 14:55:04 -04:00
Olusegun Akintayo
4b9e84aa20
Only have timeout for when payload is getState (#14972)
* Only have timeout for when payload is getState

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

* Fix test

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-06-17 15:04:44 +04:00
Ariella Vu
ac956c43d8
MetaMetrics: Fixes TypeError: Object.values(...).reduce(...).flat is not a function (#14962)
* metametrics: flat is not a function

* MetaMetrics: shorten array logic
2022-06-15 14:52:32 -05:00
Jyoti Puri
d8e1961fd1
MV3: Fix dynamic file list injection on service worker reload (#14795) 2022-06-15 20:27:51 +05:30
MetaMask Bot
a3c0e52dc5
New Crowdin translations by Github Action (#14524)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
2022-06-13 18:49:12 -04:00
Olusegun Akintayo
88286664b5
Fix for: Invalid transaction envelope type: specified type "0x0" but including...requires type: "0x2" (#14823)
* we should not call normalize if we're failing the transaction
refactor out update history
we should fail if un update we get an error and the warning message is
    error submitting.

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

* refactor _setTransactionStatus

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-06-13 20:49:18 +04:00
Alex Donesky
b170211700
Fix to infinite loading on approve screen (#14756) 2022-06-11 12:55:35 -05:00
Zachary Belford
7dc6a5feaa
Merge pull request #14837 from MetaMask/prop-type-fixups
Prop type fixups
2022-06-10 12:36:31 -07:00
Micaiah Reid
8930df7951
Allow locally hosted RPC and Block Explorer Urls with wallet_addEthereumChain (#14272)
* add function to check if url is localhost

* allow localhost rpcUrls in `wallet_addEthereumChain`

* allow localhost blockExplorerUrls

* wrap new URL in try/catch
2022-06-10 15:53:36 +01:00
Zachary Belford
93ee67eb01
Update pr based on review feedback 2022-06-08 14:24:50 -07:00
Zachary Belford
a1c964a6b8
revert indenting change 2022-06-08 14:24:49 -07:00
Zachary Belford
5e049aabff
Remove junk from previous ticket 2022-06-08 14:24:49 -07:00
Zachary Belford
3665c3718d
Changed seedPhraseBackedUp to always a boolean 2022-06-08 14:24:35 -07:00
Zachary Belford
5c93ca44da
Changed asset option prop type requirements 2022-06-08 14:24:34 -07:00
Daniel
b0557daa05
Handle an RPC provider delay in Swaps (#14821)
* Return an estimated amount for a completed swap if an RPC provider has a delay

* Create a recursive function for updating post tx balance

* Add a few tests for the "getSwapsTokensReceivedFromTxMeta" fn

* Trigger Build
2022-06-08 16:32:04 +02:00
Olusegun Akintayo
4fa4930c8a
Add friendly error handling when background throws an error before listening for connection (#14461)
* 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>
2022-06-08 00:37:15 +04:00
ryanml
2e1a37b47d
Fix 'website' casing (#14860) 2022-06-07 09:41:31 -10:00
Daniel
9705531671
Reduce the default slippage from 3% to 2% (#14863) 2022-06-07 18:28:59 +02:00
Daniel
bd5d47993d
Make content changes for the STX status page, remove old content (#14805) 2022-06-07 15:42:25 +02:00
Ariella Vu
ae76c365a0
manifest: add https://chainid.network/chains.json (#14810) 2022-06-06 19:13:42 -05:00
George Marshall
d6dc1b0c57
Updating some more instances (#14851) 2022-06-03 11:42:48 -07:00
Mark Stacey
43bd885be7
Merge pull request #14840 from MetaMask/master-sync
Sync `master` with `develop`
2022-06-03 14:34:06 -02:30
George Marshall
87bba78d1f
Updating all instances of Metamask to MetaMask in content, comments and tests (#14848) 2022-06-03 09:32:50 -07:00
Mark Stacey
e6d5af5f9a Merge remote-tracking branch 'origin/develop' into master-sync
* origin/develop: (131 commits)
  Update `protobufjs` and remove obsolete advisory exclusion (#14841)
  Include snap version in pill (#14803)
  Update PULL_REQUEST_TEMPLATE.md (#14790)
  fix: keystone transaction qrcode has no white spacing (#14798)
  Snap notifications integration (#14605)
  Upgrade @metamask/eth-ledger-bridge-keyring (#14799)
  snaps-skunkworks@0.15.0 (#14772)
  Fix proptype errors in network dropdown, tx list item details, and account details modal tests (#14747)
  Ensure transaction type is correctly updated on edit (#14721)
  Add fiat onboarding for AVAX and MATIC through Wyre (#14683)
  Bump @metamask/contract-metadata from 1.33.0 to 1.35.0 (#14791)
  Slight cleanup of constants/transactions, useTransactionDisplayData, and TransactionIcon (#14784)
  Migrate the "estimateGas" API call to "getFees" for STX (#14767)
  Ignore advisory GHSA-wm7h-9275-46v2 (#14789)
  Adding flag for MV3 (#14762)
  Add types to send state (#14740)
  Remove site origin on snap install (#14752)
  Update design tokens library from 1.5 to 1.6 WIP (#14732)
  Enables the "Safe Transaction From" copy for safeTransferFrom transactions (#14769)
  remove draft transaction (#14701)
  ...
2022-06-03 11:53:40 -02:30
Mark Stacey
cf5db650fe Merge remote-tracking branch 'origin/master' into Version-v10.14.7
* origin/master: (101 commits)
  Updating changelog
  Add token standard to custom token details (#14506)
  Revert "Dark Mode: What's New Announcement (#14346)"
  Ensure network name in confirm page container is defined (#14520)
  Updating lavamoat policies
  Fix the alerts toggles in settings (#14498)
  Disable swaps whenever the environment is not development or testing, so that behaviour follows production for QA purposes (#14499)
  [skip e2e] Updating changelog for v10.14.0 (#14487)
  Version v10.14.0
  Docs - segment metrics (#14435)
  Add snaps view search (#14419)
  Run main, flask and beta in sequence in generate-lavamoat-policies.sh (#14470)
  Modify import SRP page (#14425)
  Dark Mode: Implement Metrics (#14455)
  HoldToRevealButton component (#13785)
  e2e test import json file as import account strategy (#14449)
  MetaMetrics: Identify 'number_of_tokens' user trait (#14427)
  MetaMetrics: Identify 'nft_autodetection_enabled' &  'opensea_api_enabled' (#14367)
  Swaps: Sort "token_from" dropdown tokens by their fiat value first and "token_to" by top tokens (#14436)
  Update segment instantiation check. Only check if SEGMENT_WRITE_KEY exists (#14407)
  ...
2022-06-02 18:30:23 -02:30
Guillaume Roux
b599035a12
Snap notifications integration (#14605)
* begin controller implentation

* add NotificationController

* create selectors and actions

* update actions tu use forceUpdateMetamaskState

* Basic notification UI

* fix typo and remove console.log

* lint

* more css

* add notifications scroll

* add translations and fix some css

* Fix rebase and edit colors

* add flask tags

* add flask tag to routes component

* add missing flask tags

* add tests

* fix tests

* store notification expiration delay in constant

* address requested changes

* rename to unreadNotificationsCount

* add missing flask tag
2022-06-01 19:09:13 +02:00
Frederik Bolding
7ce4868401
snaps-skunkworks@0.15.0 (#14772)
* snaps-skunkworks@0.15.0

* Update patch

* Update tofu and LavaMoat policy
2022-06-01 11:26:12 +02:00
Dan J Miller
8961ea5d1b
Ensure transaction type is correctly updated on edit (#14721)
* updated state on edit

* Update transaction type in updateEditableParams method instead of in the send duck

* Fix unit test

* Fix unit tests

* Fix and improve unit tests

Co-authored-by: dragana8 <dragana.simic@consensys.net>
2022-05-27 14:01:31 -02:30
benlwyre
f6643e853c
Add fiat onboarding for AVAX and MATIC through Wyre (#14683) 2022-05-27 11:04:26 -05:00
Daniel
6dbb2c4ded
Migrate the "estimateGas" API call to "getFees" for STX (#14767) 2022-05-26 19:56:28 +02:00
Jyoti Puri
25082ae272
Adding flag for MV3 (#14762) 2022-05-26 10:18:23 +05:30
Brad Decker
5444474d82
add gas_used to gasParams for conversion (#14627) 2022-05-18 16:54:38 -05:00
Frederik Bolding
66c049bb35
snaps-skunkworks@0.14.0 (#14700)
* snaps-skunkworks@0.13.0

* snaps-skunkworks@0.14.0

* Fix test

* Add long-running permission copy and icon

* Run linting

* Fix typo

* Bump E2E version
2022-05-18 13:49:26 +02:00
Mark Stacey
d1ac1a8389 Rename phishing warning page environment variable
The phishing warning page URL environment variable has been renamed
from `PHISHING_PAGE_URL` to `PHISHING_WARNING_PAGE_URL`. We call this
page the "phishing warning page" everywhere else, and this name seemed
better suited (it's not a phishing page itself).

The variable has been listed and documented in `.metamaskrc.dist` as
well.
2022-05-16 18:48:20 -02:30
Mark Stacey
7199d9c567 Use externally hosted phishing warning page
An externally hosted phishing warning page is now used rather than the
built-in phishing warning page.The phishing page warning URL is set via
configuration file or environment variable. The default URL is either
the expected production URL or `http://localhost:9999/` for e2e testing
environments.

The new external phishing page includes a design change when it is
loaded within an iframe. In that case it now shows a condensed message,
and prompts the user to open the full warning page in a new tab to see
more details or bypass the warning. This is to prevent a clickjacking
attack from safelisting a site without user consent.

The new external phishing page also includes a simple caching service
worker to ensure it continues to work offline (or if our hosting goes
offline), as long as the user has successfully loaded the page at least
once. We also load the page temporarily during the extension startup
process to trigger the service worker installation.

The old phishing page and all related lines have been removed. The
property `web_accessible_resources` has also been removed from the
manifest. The only entry apart from the phishing page was `inpage.js`,
and we don't need that to be web accessible anymore because we inject
the script inline into each page rather than loading the file directly.

New e2e tests have been added to cover more phishing warning page
functionality, including the "safelist" action and the "iframe" case.
2022-05-16 14:40:50 -02:30
Brad Decker
ae4efef43e
add networks without ticker trait (#14607)
* add networks without ticker trait
2022-05-13 12:01:29 -05:00
Lachlan Tweedie
eee4cc3100
Add Coinbase Pay as fiat onramp option (#14648) 2022-05-12 18:27:49 -05:00
Hassan Malik
a3917763d4
Removed onExecutionEnvironmentError (#14698)
* used correct method to stop snap

* removed dead code, snap controller already subscribes to execution environment errors

* fixed linting error
2022-05-12 17:58:37 -04:00
Dan J Miller
8948018e5a
Ensure ledger keyring message event listener are removed on metamask lock (#14691)
* Ensure ledger keyring message event listener are removed on metamask lock

* Clean up
2022-05-12 13:36:14 -02:30
Niranjana Binoy
6c757ab5e0
Event tracking for Token Detection V2 (#14441) 2022-05-11 16:27:58 -04:00
Daniel
9a153d2388
Remove gas editing in Swaps (#14673)
* Remove gas editing in Swaps

* Remove "extraApprovalGas"
2022-05-11 20:30:03 +02:00
Frederik Bolding
b258cbafe7
Remove confirmation for terminated snaps (#14566) 2022-05-11 16:15:26 +02:00
Frederik Bolding
2dac88cbf4
snaps-skunkworks@0.12.0 (#14670)
* snaps-skunkworks@0.12.0

* Bump iframe execution environment

* Remove policy override

* Rerun LavaMoat

Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2022-05-10 23:08:42 -07:00
Niranjana Binoy
0a10b425ea
Add New Tokens Found page (#14366) 2022-05-09 13:47:06 -04:00
Daniel
2bd7127433
Swaps / STX improvements (#14622) 2022-05-09 18:48:14 +02:00
Frederik Bolding
9e401b14bf
Simplify removeSnap functionality after snaps-skunkworks update (#14646) 2022-05-09 18:19:34 +02:00
Alex Donesky
4550a10d32
fix incorrect casing of includeUsdRate option passed to CurrencyRateController (#14615) 2022-05-05 16:14:06 +02:00
Brad Decker
564ad2f81b
Track send flow history on txMeta (#14510) 2022-05-04 11:54:46 -05:00
Ariella Vu
f926925b3f
metametrics: deprecate flatMap (#14608) 2022-05-03 16:17:08 -07:00
Mark Stacey
23e3f52a04
Update version parsing to allow rollback release (#14288)
* Update version parsing to allow rollback release

When we want to rollback a release on Chrome, sometimes we use the
fourth part of the version for the rollback release. This is because
the Chrome web stores does not directly allow rolling back, but instead
requires us to re-submit the release we want to roll back to with a
higher version number.

The manifest version parsing now allows for a fourth version part.

The comments have also been updated to be more descriptive, and to fix
a minor inaccuracy.

* Fix typo in comment

Co-authored-by: David Walsh <davidwalsh83@gmail.com>

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-05-03 14:18:36 -02:30
Mark Stacey
0110bd9571 Fix lint errors 2022-05-03 14:06:02 -02:30
kumavis
c1ca70d732 phishing-detect - validate redirect url protocol 2022-05-03 13:39:18 -02:30
Erik Marks
73a7ce9e39
Add applyLavaMoat build flag (#14583)
Adds a new flag, `--apply-lavamoat`, to the main build script. The flag controls whether LavaMoat is actually applied to the output of the build process. The flag defaults to `true`, but we explicitly set it to `false` in the `start` package script. Meanwhile, the `start:lavamoat` script is modified such that it applies LavaMoat to the build output in development mode, but it no longer runs the build process itself under LavaMoat as there aren't very compelling reasons to do so.

This change is motivated by the fact that development builds do not have their own dedicated LavaMoat policies, which causes development builds to fail since #14537. The downside of this change is that LavaMoat-related failures will not be detected when running `yarn start`. @kumavis has plans for fixing this problem in a future major version of the `@lavamoat` suite.
2022-04-29 15:56:30 -07:00
Shane
7da6c66ea2
Added getAccounts suppressUnauthorized param (#14126)
* Added getAccounts suppressUnauthorized param

* Changed getAccounts supresss unauth param name

* Changed getAccounts param to object

* Fixed default empty obj for getAccounts getPermittedAccounts param

* Bump eth-json-rpc-middleware version to 8.0.2

* Fixed lavamoat policy

* Fixed lavamoat policies

* Fixed dedupe issues

* Fixed lavamoat allowscripts

* yarn deduplicate

* Fixed lavamoat policies

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-04-29 06:05:14 -07:00
Frederik Bolding
1624af2364
snaps-skunkworks@0.11.1 (#14531)
* snaps-skunkworks@0.11.0

* Update LavaMoat policies

* Fix breaking changes

* Use SnapController:clearSnapState

* Fix fetch properly

* Bump iframe execution environment

* snaps-skunkworks@0.11.1

* Run allow-scripts auto
2022-04-28 18:17:28 +02:00
Guillaume Roux
6309d53650
Dark Mode : Add OS option in theme selection dropdown (#14379) 2022-04-28 14:36:28 +02:00
David Walsh
b29b48836e
Update Dark Mode What's New message (#14535) 2022-04-27 20:34:55 -05:00
Hennadii Ivtushok
72d2977e72
Warn about multiple MetaMask instances running (#13836)
* Add text warning on startup page

* Try to detect extensions with browser API

* Setup messaging between different versions of extension

* Cleanup

* Cleanup

* Simplify check for multiple instances running

* Fix a doc string + use webextension-polyfill

* Fix test

* Mock webextension-polyfill

* Mock correctly

* Catch error and show warning in both extensions

* Mock as promise

* Address comments

* Rename build ids

* Run detection code only if Chrome

* Add Firefox warnings

* Cleanup imports

* Update connection ids

* Run detection code for Firefox

* Add test

* Add missing await

* Update tests

* Cleanup

* Cleanup

* Improve testing

* Improve tests

* Log errors from sendMessage

* Cleanup

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-04-27 20:14:10 +02:00
Shane
74b5401302
Fixed API for watchAsset (#14545)
* Fixed API for watchAsset

* Fixed boolean return value for watchAsset
2022-04-27 07:47:10 -07:00
Frederik Bolding
27ad7279cd
Rename NotificationController to AnnouncementController (#14389)
* Rename NotificationController to AnnouncementController

* Fix test

* Add test for missing NotificationController state

* Bump controllers

* Move test to correct file

* Rename config key

* Add migration 71 to list of migrations

* Fix selector after migration
2022-04-27 10:36:32 +02:00
Brad Decker
193c22588e
call controller methods directly in send duck (#14465) 2022-04-26 12:07:39 -05:00
ryanml
9cea6f57ef Revert "Dark Mode: What's New Announcement (#14346)"
This reverts commit af963d7f7b.
2022-04-26 09:24:22 -07:00
Alex Donesky
cf2c6a3164
show token approval details on confirm approve screen by default (#14523) 2022-04-26 10:21:52 -05:00
kumavis
37272ad923
i18n - remove unused locale strings (#14527) 2022-04-25 14:09:05 -10:00
Brad Decker
f567a3fe86
Do not show failed off-chain transactions details when grouped with another valid transaction of same nonce (#14497)
* fix failed off chain tx mismatch with next confirmed transaction

* dont drop failed txs when tx in confirmed

* add comment for reassigning logic

* resolve change requests
2022-04-25 14:39:34 -05:00
amerkadicE
ef6fb86f50
Update for a new Add network page (#13866) 2022-04-25 13:30:46 -05:00
MetaMask Bot
f8e850bbfa
New Crowdin translations by Github Action (#13556)
Co-authored-by: metamaskbot <metamaskbot@users.noreply.github.com>
Co-authored-by: ricky <ricky.miller@gmail.com>
2022-04-22 12:58:09 -04:00
Ariella Vu
78f4684b2a
MetaMetrics: Add EVENT.CATEGORIES const (#14474)
* MetaMetrics: add EVENT.CATEGORIES const

* MetaMetrics: add EVENT.CATEGORIES.INPAGE_PROVIDER

* MetaMetrics: add EVENT.CATEGORIES.AUTH

* MetaMetrics: add EVENT.CATEGORIES.ACCOUNTS pt. 1

* MetaMetrics: add EVENT.CATEGORIES.ACCOUNTS pt. 2
confirm we want to use 'Accounts' instead of 'Account'

* MetaMetrics: add EVENT.CATEGORIES.MESSAGES

* MetaMetrics: add EVENT.CATEGORIES.RETENTION const

* MetaMetrics: add EVENT.CATEGORIES.SETTINGS

* MetaMask: add missing EVENT.CATEGORIES.SNAPS

* MetaMetrics: add EVENT.CATEGORIES.WALLET const

* MetaMetrics: add EVENT.CATEGORIES.ONBOARDING const

* MetaMetrics: add EVENT.CATEGORIES.ONBOARDING
& EVENT.CATEGORIES.TRANSACTIONS consts

* MetaMetrics: use EVENT.CATEGORIES

* ducks/swaps: revert slice name

* MetaMetrics: add missing EVENT.CATEGORIES.NETWORK
2022-04-22 13:09:10 -03:00
Ariella Vu
d0ed2c1afc
MetaMetrics: add 'number_of_nfts' user trait (#14495)
* MetaMetrics: add number_of_nfts trait

* MetaMetrics: memoize _getAllNFTAddresses

* MetaMetrics: fix lint / update JSDoc comments

* MetaMetrics: update nft trait logic
- https://github.com/MetaMask/metamask-extension/pull/14495#discussion_r855450898

* MetaMetrics: rn _getAllNFTs > _getAllNFTsFlattened
2022-04-21 18:46:12 -03:00
Alex Donesky
fbeae57247
Add testnet name as prefix for native currency of preloaded testnets (#14454)
* add testnet name as prefix for native currency of preloaded testnets
2022-04-21 14:09:41 -05:00
Erik Marks
cef95f8733
Stop storing request and response objects in the permission activity log (#14485)
We currently store the JSON-RPC request and response objects in the permission activity log. The utility of doing this was always rather dubious, but never problematic. Until now.

In Flask, as the restricted methods have expanded in number, user secrets may be included on JSON-RPC message objects. This PR removes these properties from the permission activity log, and adds a migration which does the same to existing log objects. We don't interact with the log objects anywhere in our codebase, but we don't want unexpected properties to cause errors in the future should any log objects be retained.

This PR also updates relevant tests and test data. It makes a minor functional change to how a request is designated as a success or failure, but this should not change any behavior in practice.
2022-04-21 08:44:15 -07:00
David Walsh
6a06374784 Dark Mode: Implement Metrics (#14455) 2022-04-19 13:38:44 -02:30
VSaric
e702da2194
Modify import SRP page (#14425)
* Modify Import SRP page
2022-04-18 15:12:16 -05:00
David Walsh
bcdd52f55a
Dark Mode: Implement Metrics (#14455) 2022-04-18 11:31:44 -05:00
filipsekulic
52b043c4f2
HoldToRevealButton component (#13785)
* Created 'HoldToRevealButton' component

* Added new line within the .svg files

* Lint fix

* CSS fix according to BEM

* Modified unit test
2022-04-18 09:32:16 -02:30
Ariella Vu
21e54f4717
MetaMetrics: Identify 'number_of_tokens' user trait (#14427)
* MetaMetrics: identify number_of_tokens

* MetaMetrics: update number_of_tokens
do not filter by unique addresses.
Each token contract x chain id combo is a unique contract

* MetaMetrics: update MetaMetricsTraits @typedef
- add number_of_tokens

* MetaMetrics: clean up number_of_tokens

* MetaMetrics: alphabetize in test
2022-04-15 13:35:07 -03:00
Ariella Vu
e7bb8e2663
MetaMetrics: Identify 'nft_autodetection_enabled' & 'opensea_api_enabled' (#14367)
* MetaMetrics: alphabetize traits

* MetaMetrics: identify nft_autodetection_enabled

* MetaMetrics: identify opensea_api_enabled

* metametrics.test: alphabetize traits

* metametrics.test: add new traits
- nft_autodetection_enabled
- opensea_api_enabled

* MetaMetrics: @property use string literals

* MetaMetrics.test: update with openSeaEnabled & useCollectibleDetection

* MetaMetrics: alphabetize

* MetaMetrics: update MetaMetricsTraits @typedef
- add nft_autodetection_enabled
- add opensea_api_enabled
2022-04-15 10:39:55 -03:00
Ariella Vu
0c52723885
Update segment instantiation check. Only check if SEGMENT_WRITE_KEY exists (#14407)
* segment: instantiate w/out SEGMENT_HOST check

If SEGMENT_HOST is null, then the analytics-node library will usea defaulted host

* Segment: rm IN_TEST check for instantiation
2022-04-14 18:31:54 -03:00
kumavis
54ac00027b unblock ci: update vuln deps + fix npm registry for snaps firefox (#14437)
* dep-audit-fix for async@2.6.3

* deps - update async for vuln fix and remove patch

* deps/ci-yarn-audit - remove outdated ignored vulns

* deps/lock - deduplicate async@2

* deps/lock - deduplicate async@2 + remove indirectly used dep

* Use regular NPM registry for snaps on Firefox (#14439)

* Use regular NPM registry for snaps on FF

* Fix linting

* Update app/scripts/metamask-controller.js

Co-authored-by: Shane <jonas.shane@gmail.com>

Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: Shane <jonas.shane@gmail.com>

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Shane <jonas.shane@gmail.com>
2022-04-14 08:03:13 -07:00
kumavis
0f4417684b
unblock ci: update vuln deps + fix npm registry for snaps firefox (#14437)
* dep-audit-fix for async@2.6.3

* deps - update async for vuln fix and remove patch

* deps/ci-yarn-audit - remove outdated ignored vulns

* deps/lock - deduplicate async@2

* deps/lock - deduplicate async@2 + remove indirectly used dep

* Use regular NPM registry for snaps on Firefox (#14439)

* Use regular NPM registry for snaps on FF

* Fix linting

* Update app/scripts/metamask-controller.js

Co-authored-by: Shane <jonas.shane@gmail.com>

Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: Shane <jonas.shane@gmail.com>

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: Shane <jonas.shane@gmail.com>
2022-04-13 17:28:03 -10:00
Brad Decker
922ebd57cb
track address book usage (#14382)
* track address book usage

* Update app/scripts/controllers/metametrics.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

* Update shared/constants/metametrics.js

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-04-13 11:46:49 -05:00
Niranjana Binoy
455d4a9825
Update DetectTokenController for token detection V2 (#14216) 2022-04-13 12:23:41 -04:00
Dan J Miller
432c88e185 Remove duplicate gas simulation error messages (#14409)
* Remove duplicate gas simulation error messages

* Fixing locales

* Fixing unit tests

* Fixing e2e

Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-04-13 08:01:21 -07:00
Dan J Miller
e768119dd0
Remove duplicate gas simulation error messages (#14409)
* Remove duplicate gas simulation error messages

* Fixing locales

* Fixing unit tests

* Fixing e2e

Co-authored-by: ryanml <ryanlanese@gmail.com>
2022-04-13 08:00:10 -07:00
Olusegun Akintayo
9bd391a35f
User trait - number of nft collections (#14377)
* Add new user trait for 'Number of NFT collections'.

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

FIx JS DOC

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

Arrange TRAITS in alphabetical order

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

Unit Tests for allCollectibles traits tracking.

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

change cid to chainId

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

* invert condition

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

* jsdoc - alphabetical order

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

* change {string} to the literal {number_of_nft_collections}

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

* Optimize _getNumberOfNFTs

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-04-10 11:42:00 +04:00
Daniel
2d24a4d643 Swaps timer improvements, optional refresh rates and fix for a notification UI (#14300)
* Set up correct timer value for fetching new quotes

* Show red timer in Swaps if quotes fetching will happen in less than 10s (previously it was 30s)

* Fix a UI issue with the notification close button

* Make stx refresh rates optional, since not every network supports them
2022-04-07 03:01:50 -07:00
George Marshall
94378c773d Fix/14302 about fox logo (#14308) 2022-04-07 02:43:35 -07:00
George Marshall
36a736d3b5 Fix/14230 dark mode fixes (#14305)
* Dark mode fixes

* removing unused icon svg
2022-04-07 02:42:52 -07:00
ryanml
b8c9f370ef Merge remote-tracking branch 'origin/master' into Version-v10.13.0 2022-04-07 02:32:07 -07:00
David Walsh
af963d7f7b
Dark Mode: What's New Announcement (#14346) 2022-04-05 14:55:00 -05:00
Mark Stacey
831d274a40 Restore version missing from certain build steps (#14344)
Certain build steps accidentally omitted the `version` variable. It has
now been restored to all steps, ensuring that all environment variables
are correctly injected into all bundles.

A check has been added to the Sentry setup module to ensure the release
is not omitted in the future.
2022-04-04 21:06:12 -02:30
Brad Decker
d6df3700f7
track rpc method usage (#14269) 2022-04-04 14:26:13 -05:00
Mark Stacey
2d08fe35e5
Restore version missing from certain build steps (#14344)
Certain build steps accidentally omitted the `version` variable. It has
now been restored to all steps, ensuring that all environment variables
are correctly injected into all bundles.

A check has been added to the Sentry setup module to ensure the release
is not omitted in the future.
2022-04-04 16:44:32 -02:30
Frederik Bolding
0556feb142
Add snap version to details page (#14110)
* Start to add snap version to details page

* Show install date

* Clean up

* Address PR comments
2022-04-04 19:40:24 +02:00
Frederik Bolding
e77ff0bce8
Fix a few Snap state issues (#14339)
* Fix clearSnapState

* Simplify getSnapState
2022-04-04 16:32:49 +02:00
Daniel
fc17fbe1ad
Swaps timer improvements, optional refresh rates and fix for a notification UI (#14300)
* Set up correct timer value for fetching new quotes

* Show red timer in Swaps if quotes fetching will happen in less than 10s (previously it was 30s)

* Fix a UI issue with the notification close button

* Make stx refresh rates optional, since not every network supports them
2022-04-04 15:14:50 +02:00
Frederik Bolding
cb963f3c29
snaps-skunkworks@0.10.7 (#14323)
* snaps-skunkworks@0.10.7

* Bump iframe-execution-environment
2022-04-01 18:14:48 +02:00
George Marshall
e62678464c
Fix/14302 about fox logo (#14308) 2022-04-01 07:00:33 -07:00
George Marshall
8edeb9a281
Fix/14230 dark mode fixes (#14305)
* Dark mode fixes

* removing unused icon svg
2022-03-31 13:11:06 -07:00
Ariella Vu
f088db99a3
MetaMetrics: add segment.identify (#14195)
* MetaMetrics: add segment.identify

* MetaMetrics: rm non-existent typedef

* MetaMetrics: WIP segment.identify pt. 2

* Revert "MetaMetrics: WIP segment.identify pt. 2"

This reverts commit 8126de4dff9312aab2275cba81d0432bfcdb097b.

* MetaMetrics: add identify tests

* MetaMetricsController: update identify w/ fix

* MetaMetricsController: fix identify tests

* MetaMetricsController#identify: warn instead of throw

* MetaMetrics: transform date into ISO string

* MetaMetricsController: alphabetize test

* MetaMetricsController: restore asset in test

* MetaMetrics: rn traits -> userTraits

* MetaMetrics: restore trackEvent location

* update to follow analytics-node api

* MetaMetricsController: update tests + @link

* MetaMetrics: destimation -> destination

Co-authored-by: brad-decker <bhdecker84@gmail.com>
2022-03-31 16:21:01 -03:00
VSaric
8184b150cb
Redesign screen/page "List of networks" (#13560)
Co-authored-by: George Marshall <george.marshall@consensys.net>
Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-03-31 09:41:39 -05:00
Niranjana Binoy
8174aaa6b5
Adjusting the padding in Alert / error state (#13819) 2022-03-31 10:02:47 -04:00
Niranjana Binoy
9f7c4eb658
Enable Token search functionality on supported networks (#14034) 2022-03-31 09:48:05 -04:00
Niranjana Binoy
9361fab187
Enable Token Detection by default on supported networks (#14002) 2022-03-31 09:47:19 -04:00
Mark Stacey
646bad8a58 Merge remote-tracking branch 'origin/develop' into master-sync
* origin/develop: (210 commits)
  Dark Mode: Remove unwanted background for price quote (#14278)
  Dark Mode: Fix colors in toggle button (#14280)
  Ensure proper color for swaps edit link (#14273)
  Dark Mode: Ensure actionable message button colors are the same color as previously (#14271)
  Add token standard to Token Added event. (#14253)
  Token Aggregators component for Tokens Detected page (#14157)
  Ensure Metafox follows cursor on Fetching quotes screen (#14261)
  TransactionsControllerTest: catch uncaught errors (#14196)
  GasModalPageContainer story: convert knobs and actions to controls / args (#13516)
  Show STX switch for wrapping / unwrapping (#14225)
  Change over ImportToken stories to use controls instead of knobs, update props in stories (#14246)
  Change over FeeCard stories to use controls instead of knobs, update props in stories (#13766)
  Update What's new screen with Token Detection information (#14124)
  Improvements for multi-layer fee UX (#13547)
  metaMetricsEvent -> trackEvent (#14249)
  E2e dapp interactions (#14149)
  failing contract interaction e2e (#14227)
  Removed metrics event (#14042)
  Add TypeScript to the build system (#13489)
  Build user traits object when metamask state changes (#14192)
  ...
2022-03-30 22:54:28 -02:30
Mark Stacey
98f187c301 Update SRP representation
An array of integers is now used to represent the SRP in three cases:

* In the import wallet flow, the UI uses it to pass the user-provided
  SRP to the background (which converts the array to a buffer).
* In the create wallet flow, the UI uses it to retrieve the generated
  SRP from the background.
* When persisting the wallet to state, the background uses it to
  serialize the SRP.

Co-authored-by: Elliot Winkler <elliot.winkler@gmail.com>
2022-03-30 21:01:26 -02:30
Niranjana Binoy
68f07ce1f7
Token Aggregators component for Tokens Detected page (#14157) 2022-03-30 16:21:27 -04:00
Ariella Vu
aac40c75ee
TransactionsControllerTest: catch uncaught errors (#14196) 2022-03-30 11:13:25 -03:00
Niranjana Binoy
4e6d61abcb
Update What's new screen with Token Detection information (#14124) 2022-03-29 17:41:58 -04:00
Dan J Miller
09512c7148
Improvements for multi-layer fee UX (#13547)
* 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>
2022-03-29 16:51:45 -02:30
PeterYinusa
1130b58910 E2e metrics (#13904)
* remove metrics build

* remove segment server from tests

* enable cors

* mock segment globally

* metrics e2e test

* running test builds

* move file

* destructuring
2022-03-29 07:35:06 -02:30
Brad Decker
b525c620f4
Build user traits object when metamask state changes (#14192) 2022-03-28 16:56:56 -05:00
George Marshall
7f8dc260b5
Dark mode: onboarding icons and colors (#14209) 2022-03-28 09:42:09 -05:00
George Marshall
2118b4825d
Dark mode: updating permissions redirect check icon (#14200)
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-25 16:01:17 -05:00
Daniel
115971d79c Improvements for Smart Transactions / Swaps (#14022)
- 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
2022-03-25 17:13:43 -02:30
Dan J Miller
5fec2b53a7 Transaction updates methods return whole tx meta (#14147)
* Transaction updates methods return whole tx meta

* Fix unit test

Co-authored-by: Dan Miller <danjm@pop-os.localdomain>
2022-03-25 17:13:43 -02:30
George Marshall
b1cfdd2475
Dark mode: confirm approve content popout and user approve check icon (#14211) 2022-03-25 20:40:45 +01:00
Niranjana Binoy
85d3c888ac
Token address component for Tokens Detected page (#14104) 2022-03-25 15:29:16 -04:00
George Marshall
cf0bc662c1
Dark mdoe: token search icon (#14213) 2022-03-25 10:59:22 -07:00
George Marshall
53da89cea1
Dark mode: user preferenced currency eth logo (#14210) 2022-03-25 18:35:11 +01:00
Dan Miller
d5c693d9db Merge remote-tracking branch 'origin/master' into Version-v10.12.0-alt 2022-03-25 14:56:57 -02:30
Olusegun Akintayo
c54f9b3097
update gas fees (#13646)
* Draft methods to brak updateTransaction into smaller more targeted
methods.

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

* This is a combination of 76 commits.

normalize and validate tx params.

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

Method to normalize tx and check if it's unapproved.

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

Move the methods to controllers/transactions/index.js

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

Flesh out the methods to update transaction with custom notes.

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

enforce that only the properties for the specific methid can be updated via the method.

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

Test update gas fees

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

Update swap approval transaction

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

use lodash to remove undefined properties
update swap transaction tests

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

Updates transaction user settings.

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

Lint fixes.

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

Add more parameters to updateSwapTransaction
    approvalTxId
    estimatedBaseFee

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

Add Update Transaction Metrics

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

Update transaction gas fees actions.js

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

Lint fixes.

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

Update EIP 1559 Params.

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

Lint Fixes.

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

Documentations.

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

Remove metrics from this PR

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

Lint fixes: Removed unused variables

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

Add more params to updateTransactionGasFees.

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

Update eip1559 method to editableParams.

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

lint fixes.

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

Fix Mocha tests

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

add gasPrice to updateEditableParams

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

Remove duplicated Params in notes.

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

A few more tests to cover if
    transaction status is not unapproved
    transaction is passed more parameters than it requires.

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

Update Transaction Gas Fees.

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

Update gas fees in edit-gas-popover.

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

Remove metrics.

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

Update gas settings and user settings.

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.

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

Lint fixes.

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

Draft methods to brak updateTransaction into smaller more targeted
methods.

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

normalize and validate tx params.

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

Method to normalize tx and check if it's unapproved.

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

Move the methods to controllers/transactions/index.js

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

Flesh out the methods to update transaction with custom notes.

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

Test update gas fees

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

Update swap approval transaction

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

use lodash to remove undefined properties
update swap transaction tests

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

Updates transaction user settings.

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

Lint fixes.

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

Add Update Transaction Metrics

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

Update transaction gas fees actions.js

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

Lint fixes.

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

Update EIP 1559 Params.

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

Lint Fixes.

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

Documentations.

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

Remove metrics from this PR

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

Lint fixes: Removed unused variables

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

Add more params to updateTransactionGasFees.

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

Update eip1559 method to editableParams.

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

lint fixes.

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

Fix Mocha tests

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

add gasPrice to updateEditableParams

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

Remove duplicated Params in notes.

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

A few more tests to cover if
    transaction status is not unapproved
    transaction is passed more parameters than it requires.

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

Update Transaction Gas Fees.

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

Remove metrics.

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

Update gas settings and user settings.

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.

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

Lint fixes.

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

Remove dup;icated method from rebase.

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

unrelated change

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

Force re-run workflow

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

Lint fix

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

Do not hideLoading since we're not showing it.

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

UpdateTransaction should be renamed to updateGasFees

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

updateGasFees in gas-modal-page-container.

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

fix:
    update previous gas params update method
    add types to the jsdoc comments.

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

updateTransactionGasFees should have been updatePreviousGasParams

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

Previous gas fees can be updated for confirmed transactions.

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

add updatePreviousGasParams to mocked functions.

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

Lint fixes

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

* we need to await the first dispatch before we call the second

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

* update values to make tests pass

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

* More changes to make e2e pass

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

* Need to wait a bit after save for changes to take effect.

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

* Remove merge comments.

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

* Await one dispatch before calling another

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

* We don't need goHome anymore.

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

* Tests must use async...await syntax too since we have await in the
useTranasctionFunction

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

* Add delay after button click for values to update

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

* Wait a moment after clicking save for values to update

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

* Wait after clicking save...

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

* Merge update transaction gas fees and transaction user settings
Show loading indicator on edit gas popover
Fix tests.

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

* Lint fixes

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

* Fix JSDoc

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

* updatePreviousGasParams should also return updated transaction meta.

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-25 21:11:04 +04:00
George Marshall
853002bc0b
Dark mode: add network times icon (#14202) 2022-03-25 15:33:53 +01:00
George Marshall
e850bcbc4a
Dark mode: advanded-gas-fee-input-subtext icons (#14197) 2022-03-25 15:30:22 +01:00
George Marshall
729e89015f
Dark mode: search icon (#14201) 2022-03-25 15:22:56 +01:00
Alex Donesky
3e2506b2e4
add space between sentences in insufficient currency warning (#14019)
* add space between sentences in insufficient currency warning and add link to buy modal for all buyable networks
2022-03-25 09:02:08 -05:00
George Marshall
6688117c7e
Dark mode: Updating lock icon decrypt message (#14198) 2022-03-25 08:37:42 -05:00
Alex Donesky
172b9d51e6
fix instance of browser.extension.getURL() (#14168) 2022-03-24 09:57:24 -05:00
Dan J Miller
81b3e6e925
Transaction updates methods return whole tx meta (#14147)
* Transaction updates methods return whole tx meta

* Fix unit test

Co-authored-by: Dan Miller <danjm@pop-os.localdomain>
2022-03-24 11:16:51 -02:30
George Marshall
351a51d4a4
Dark mode: first time flow icons (#14160) 2022-03-23 19:05:55 -05:00
George Marshall
7ffc68a518
Updating hardware wallet logos (#14163) 2022-03-23 19:05:40 -05:00
George Marshall
39e63432bf
Dark mode: icon transaction confirmed (#14130)
* Dark mode transaction confirmed replacing check icon

* Updating story path

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-23 13:35:52 -07:00
George Marshall
60bd757f45
Dark mode: updating close icon in edit approval permissions modal (#14135)
* Dark mode udpating close icon in edit approval permissions modal

* Fixing border color

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-03-23 12:49:55 -07:00
Daniel
4c16b583c3
Improvements for Smart Transactions / Swaps (#14022)
- 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
2022-03-23 20:28:26 +01:00
George Marshall
386a760285
Dark mode: Updating arrows icon in build quote (#14155) 2022-03-23 12:07:29 -07:00
George Marshall
90e4b35db5
Dark mode: Updating currency input icon (#14152) 2022-03-23 18:53:56 +01:00
George Marshall
00e64eb6c1
dark-mode-icon-disconnect-icon (#14151) 2022-03-23 12:48:15 -05:00
George Marshall
90fc9cad8b
Updating arrows for account menu scroll and signature request (#14138) 2022-03-23 10:03:02 -07:00
George Marshall
7be1cfe9e4
Dark mode: Adding wyre, transak and deposit eth logo (#13953) 2022-03-23 16:52:04 +01:00
George Marshall
cbaedf55e1
Dark mode: Removing double and single arrows svg icons for confirm-page-container-navigation (#14136) 2022-03-23 16:48:48 +01:00
George Marshall
8fc5266a8d
Dark mode: icons ens input (#14133)
* Dark mode ens input on send page icons convert to font-awesome

* Updating for close in dark mode
2022-03-23 08:45:52 -07:00
George Marshall
3d3670e807
Dark mode: Replacing svg image with font awesome icon for main-quote-summary (#14137) 2022-03-23 16:25:28 +01:00
George Marshall
532c326793
Dark mode: transaction activity log icons (#14139) 2022-03-23 16:24:56 +01:00
George Marshall
4ad22252c5
Dark mode: Removing connected svg from account menu in favour of fontawesome (#14140) 2022-03-23 16:24:27 +01:00