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

5749 Commits

Author SHA1 Message Date
Brad Decker
ddadc79f60
remove unnecessary usage of renderableGasButton logic (#15422) 2022-08-02 16:56:35 -05:00
Filip Sekulic
ea247d4e4a
Fix 'block link explorer on custom networks' (#13870)
* 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
2022-08-02 16:56:02 -05:00
Brad Decker
f425e482e4
fix issues relating to race conditions where draftTx does not exist (#15420)
* fix issues relating to race conditions where draftTx does not exist

* add another fail safe for inflight initializations
2022-08-02 13:52:09 -05:00
Alex Donesky
fb191c865b
Enhance approval screen title logic (#15406) 2022-08-02 13:38:15 -05:00
Dan J Miller
d484f107c0
Fix optimism send flow (#15419) 2022-08-02 15:54:24 -02:30
Guillaume Roux
9ce4a8f987
[FLASK] Fix key management permission copy (#14849) 2022-08-02 11:29:40 +02:00
Alex Donesky
fc304680d4
Fix error that occurs when attempting to display transaction value for an approval transaction with no value argument in the transaction data (#15398) 2022-08-01 11:42:58 -05:00
Jyoti Puri
bca9a61d6b
MV3: Re-activate service worker and reconnect UI streams (#14781) 2022-08-01 18:53:21 +05:30
Nidhi Kumari
194f7c8dd8
added AvatarBase Component (#15307)
* added AvatarBase Component

* added README file to storybook

* converted avatar-base to base-avatar

* props for snapshot testing

* replaced snapshot testing

* Updates to stories and component

* used arrow function for component

* fixed merge conflicts

* removed box stories

* changed import order for scss files

* replaced base-avatar import with component scss file

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-08-01 15:14:33 +05:30
Brad Decker
c72199a1a6
update prettier (#15360) 2022-07-31 13:26:40 -05:00
kumavis
9e7c75d06d
Bundle optimazation 0 (#14782)
* optimism/contracts - import minimal subset

* ui helpers - dont import whole of mm controllers

* lint fix
2022-07-30 03:07:29 -02:30
George Marshall
8185175968
Adding readme for component-library folder (#15381)
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-07-29 16:24:32 -05:00
Brad Decker
8e9df0457b
cast chainId to hex for metrics (#15332)
* cast chainId to hex for metrics

* Update ui/pages/settings/networks-tab/networks-form/networks-form.js

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

Co-authored-by: Ariella Vu <20778143+digiwand@users.noreply.github.com>
2022-07-29 10:37:48 -05:00
Daniel
f31bac9fbf
Performance improvements for Swaps (#15359) 2022-07-28 15:56:15 +02:00
Dan J Miller
aea5c5824f
Clean up of code introduced with 43f7a44 (#15158) 2022-07-27 15:19:05 -05:00
George Marshall
6075e86838
Adjusting the height of account menu nav items to expand scroll area (#15302)
* Adjusting the height of account menu nav items to expand scroll area

* reducing font size

* Adding back max height media query
2022-07-27 12:35:52 -07:00
Brad Decker
693a6dfc0c
Remove unnecessary file extensions (#15352) 2022-07-27 14:32:17 -05:00
ryanml
c677edc51d
[FLASK] disable "Mark all as read button" when there are no notifications (#15333)
* [Flask] disable "Mark all as read button" when there are no notifications

* Adding test case

* Addressing feedback
2022-07-27 09:49:34 -07:00
Nidhi Kumari
e12d0a94e8
Updates to stories and component (#15357)
* Updates to stories and component

* removed SECONDARY color options

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-07-27 09:46:13 -07:00
Nidhi Kumari
2cf7cd40d0
added tx details popup to cancelled Swap (#15273)
* added tx details popup to cancelled Swap

* removed unnecessary console statements
2022-07-27 20:41:48 +05:30
Brad Decker
652d631cda
remove exclusions for mismatched object jsdoc type casing (#15351) 2022-07-27 08:28:05 -05:00
Nidhi Kumari
7424e98416
Updated all instances of "Component API" to "Props" in storybook documentation (#15324)
* replaced Component API with Props

* replaced Component API with Props in DOCUMENTATION.stories.mdx

* removed base avatar component
2022-07-27 00:22:40 +05:30
Brad Decker
1db0ee87ec
Update Eslint and deps (#15293) 2022-07-26 13:10:51 -05:00
Alex Donesky
b82d357a0d
Remove decentralized 4byte function signature registry since it contains incorrect signatures and we can't algorithmically check for best option when 4byte.directory is down (#15300)
* remove decentralized 4byte function signature registry since it is griefed and we can't algorithmically check for best option when 4byte is down

* add migration

* remove nock of on chain registry call in getMethodDataAsync test
2022-07-26 12:01:14 -05:00
Alex Donesky
8536c86ed5
Improve tokenId parsing and clean up useAssetDetails hook (#15304) 2022-07-23 09:37:31 -05:00
Hassan Malik
1f943a7d69
[FLASK] Fix snaps authorship pill (#15190)
* add truncation

* add title to show complete package name

* Remove hardcoded max-width

* truncation

* reduced max-width

* final changes

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
Co-authored-by: eriknson <eriks@mail.se>
2022-07-23 00:58:46 -04:00
Dan J Miller
101fe0b27a
Metrics adjustments (#15313)
* Don't send errors to sentry if users have not opted-in to participate in metametrics

* Don't capture opt-out metrics

* Move the metrics-opt in screen to immediately after the welcome screen

* Ensure that global.getSentryState is set in the background

* Fix e2e tests after rearranging onboardin flow

* Fix unit tests

* More e2e test fixes

* Remove unnecessary wrappers around capture exception
2022-07-22 18:09:48 -02:30
Nidhi Kumari
132c1818df
added storybook controls for confirm send ether component (#15235)
* added storybook controls for confirm send ether component

* fixed lint errors

* corrected the argTypes for send-ether-storybook component
2022-07-22 10:58:37 -07:00
VSaric
f1ca3e56e7
Modify transaction type and add contract method data to metrics (#15175) 2022-07-22 12:45:04 -05:00
Nidhi Kumari
2e6f579ee5
Converted BuildQuote story to use controls and action argType (#15234)
* added build quote component

* fixed updated test-data to use Rinkeby instead of ropsten
2022-07-22 12:14:35 +05:30
George Marshall
5592687df1
Updating design tokens package and shadow values with new tokens (#15264)
* Updating design tokens v1.8 and shadows

* Adding missing stories

* Some fixes and updates to css and stories

* removing unneeded story

* Fixing story order
2022-07-21 15:43:31 -07:00
Nidhi Kumari
c85af877bd
added storybook controls for confirm deploy contract component (#15236)
* added storybook controls for confirm deploy contract component

* fixed args in confirm-deploy-contract-storybook

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-07-21 14:34:13 -07:00
Ernesto García
e6931e3f5d
Fix: Actionable Message on Confirm Transaction view is over Tabs (#15272)
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-07-21 16:09:18 -05:00
Alex Donesky
b2fde5114a
fix blockExplorer link on setApprovalForAll confirmation screen (#15312) 2022-07-21 14:39:55 -05:00
Dan J Miller
a0c9738924
Ensure that editing a tx from a transfer to a simple send resets data and updates type (#15248)
* Ensure that editing a transaction from a transfer to a simple send properly resets data and updates type

* Handle case where there are no unapproved txes

* Improve comment in updateSendAsset

* Remove unnecessary code in send transaction edit function

* Fix

* Ensure hex data is properly reset when changing from a safe transfer from tx to native send
2022-07-20 20:33:23 -02:30
Frederik Bolding
9e1814952f
Fix stringified object on NFT approve screen (#15287) 2022-07-20 18:24:50 -02:30
George Marshall
05a20bb721
Add responsive props to Box component (#15106)
* Adding responsive props to Box component

* Updating margin array prop instances

* Updating padding array prop instances

* Updates to docs, tests and margin, padding instances

* Optimizing class name object

* Simplifying single value logic

* replacing for loop with switch statement

* Memoizing generateClassNames function
2022-07-20 13:47:51 -07:00
Dor Wiser
98fc0060f3
DefinitionList story: convert knobs and actions to controls / args (#15185)
* tabs story changes

* removed knobs and implemented controls

* object to select control typography

* added argtypes only for relevant stories + fixes
2022-07-20 11:58:14 -07:00
Alex Donesky
78b32153f5
show asset name instead of symbol for setApprovalForAll calls on NFT contracts where possible (#15296) 2022-07-20 13:42:57 -05:00
David Walsh
95adbc245c
Set default getFetchWithTimeout default timeout value (#14218) 2022-07-19 11:13:45 -05:00
Filip Sekulic
7d321c48e0
Removed ui related code from shared directory (#15252) 2022-07-19 11:07:13 -05:00
Nidhi Kumari
fe76317eef
added storybook files to alert and breadcrumbs component (#15156)
* added storyblok files to alert and breadcrumbs component

* formatted the files

* added confusable, i18n, export, hextToDecimal stories

* replaced alert class component to functional component

* removed i18n story files

* added storyblok files to alert and breadcrumbs component

* formatted the files

* added confusable, i18n, export, hextToDecimal stories

* replaced alert class component to functional component

* removed i18n story files

* added README files to storybook elements and fixed lint issues

* added readme files

* updated README file for confusable

* fixed linting errors in test

* removed unwanted tests
2022-07-19 21:10:04 +05:30
Nidhi Kumari
7a3ff7e436
added storybook component for send-content-stories (#15210)
* added storybook component for send-content-stories

* added draftTransactions to storybook
2022-07-19 14:05:45 +05:30
Niranjana Binoy
2223e81c67
Disable Seedphrase import button if any of the characters is in uppercase (#15186) 2022-07-18 20:17:43 -04:00
ryanml
e38cc863a4
Remove dark mode and transaction insights announcements (#15279) 2022-07-18 16:41:10 -07:00
Alex Donesky
3ddebf818b
Preserve send amount when editing an ERC20 transaction (#15275)
* preserve amount when editing an ERC20 transaction

* fix tests
2022-07-18 12:20:02 -05:00
Brad Decker
751c119d10
enable direct routing to the send page (#15259) 2022-07-18 12:01:10 -05:00
Alex Donesky
d92936475a
Fix default currency symbol for wallet_addEthereumChain + improve warnings for data that doesn't match our validation expectations (#15201)
* 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
2022-07-18 10:59:38 -05:00
George Marshall
81a876f979
Adding media query sass vars, mixins and docs (#15053)
* Adding media query sass vars, mixins and docs

* Updates to docs and fixing page order in storybook
2022-07-18 08:23:27 -07:00
Alex Donesky
09164dcabb
Bump controllers v30.0.2 (#14906)
* bump @metamask/controllers to v30.0.2 and adapt
2022-07-18 09:43:30 -05:00
Daniel
2744eaf760
Update the "results" state if "initialResultsState" array length is different (#15270) 2022-07-18 16:30:36 +02:00
Alex Donesky
4993d28a8f
Only send the rpc origin to segment when calling trackevent for newly added custom networks (#15227) 2022-07-15 12:08:44 -05:00
Alex Donesky
cbda923c61
small approve confirmation ui fixes (#15239) 2022-07-14 13:22:12 -05:00
ryanml
9e63a9a449
Adding "What's New" Notification for Add Popular networks (#15121)
* Adding "What's New" Notification for Add Popular networks

* Adding action text to notification

* Addressing review feedback

* Flag removal
2022-07-14 11:08:32 -07:00
ryanml
959a376347
Remove 'ADD_POPULAR_NETWORKS' feature flag (#15229) 2022-07-14 08:58:34 -07:00
Filip Sekulic
6b4fa46908
Removed the Infura v3 key from rpcUrl display (#15193)
* Removed infura v3 key from rpcUrl display

* Code refactor

* Fixed error

* Prevent submission of form when editing an featured rpc and there is a chainId error

* Add optional chaining to rpcurls to prevent type errors

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-07-14 07:13:56 -02:30
Dan J Miller
0c163dd8aa
Show users a warning when they are sending directly to a token contract (#13588)
* 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>
2022-07-13 19:45:38 -02:30
Daniel
75ac87e487
Show a block explorer URL hostname, hide token import if block explorer URL is not available (#15198) 2022-07-13 18:42:50 +02:00
Filip Sekulic
7246058797
Added metrics for adding a new network (#15176)
* Added metrics for adding a new network

* Applied requested changes

* Added missed changes
2022-07-13 11:47:13 -02:30
Dan J Miller
f785f77959
Improve confirm screen tests (#15163)
* Improve confirm screen tests

* Fix transaction controller unit test

* Fix unit test fixtures

* Fix e2e test
2022-07-12 14:50:20 -02:30
Makoto Inoue
fdd8646ce8
Support for ENS wildcard and offchain resolution (#14675) 2022-07-12 09:30:31 -05:00
Nidhi Kumari
0fd37cd5ff
removed i18nValue component (#15179)
* removed i18nValue component

* fixed bracket issue
2022-07-12 19:29:38 +05:30
VSaric
baeaf763d7
Handling invalid prop loading console warning (#15177) 2022-07-12 08:44:49 -05:00
Alex Donesky
4f0115fcdc
Add setApprovalForAll confirmation view (#15010)
* enhance setApprovalForAll confirmation flow

* cleanup

* address feedback
2022-07-11 18:32:55 -05:00
Justin Léger
2a73dea54d
Update confirmation screen styling (#15136)
* Added 8px of margin to the top of the network display as it was touching the edge of the view
* Removed the SiteIcon component and passed the icon url to the SiteOrigin to display the icon next to the origin.

Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-07-11 16:08:43 -07:00
Dor Wiser
5ca8651fe1
NicknamePopover story: convert knobs and actions to controls / args (#15167)
* tabs story changes

* nickname popover implemented controls and actions

* fixed lint error
2022-07-11 14:09:30 -07:00
Dor Wiser
8ccd235a27
tabs story changes (#15147) 2022-07-11 09:01:02 -07:00
Daniel
8cbfa2ea9e
Show a tx link and the "create a new swap" link for STX (#14995) 2022-07-11 17:53:07 +02:00
Niranjana Binoy
bafc235928
Disable Seedphrase import button after switching seedphrase length (#15139) 2022-07-07 11:37:21 -04:00
Dan J Miller
e8ea973f0f
Add feature flag to prevent add popular networks from being available on prod (#15117) 2022-07-04 12:20:37 -02:30
PeterYinusa
79d0a2c8ba
Update wallet-overview.js (#15125) 2022-07-01 12:35:40 -02:30
Brad Decker
94967072f7
Remove global transaction state from send flow (#14777)
* remove global transaction state from send slice

* fixup new test
2022-07-01 08:58:35 -05:00
Dan J Miller
f4b25d7ea5
Ensure native asset icon does not display incorrectly when switching networks and balance is loading (#15116) 2022-07-01 10:38:42 -02:30
Filip Sekulic
43f7a44c25
Adding popular custom network integration (#14557)
* Initial push

* Refactored the code

* Additional code

* Removed the unused message

* Added a tooltip

* Fixed tests

* Lint fix

* Added style to a tooltip

* Fix e2e test failure

* Lint fix and code revert

* Fix e2e test

* Fixed paddings

* Fixed paddings

* CSS fix

* Minified svg files

* Applied requested changes

* Fixed theme issue

* Code revert

* Added back overridden code

* Icon problem fixed

* Lint fix

* Replaced H3 with H4

* Added unit test

* Added breadcrumbs

* Added const props for networks

* Lint fix

* Lint fix

* Added toggle button for showing the custom network list and resolved few issues

* Fixed routes

* Refactored a piece of code

* Enabled searching for the newly created option

* Fixed unit test

* Updated theme
2022-06-30 13:49:07 -02:30
Alex Donesky
3a31326199
Add fallback image/card for NFTs when image was not fetched correctly or does not exist (#15034)
* 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>
2022-06-30 08:46:38 -07:00
Dan J Miller
c3623ab729
Remove change from cb77f94 that breaks ens inputs in send flow (#15069) 2022-06-28 17:06:55 -02:30
Dan J Miller
cb77f94bc5
Ensure that addresses are properly hex-prefixed in the generate ERC token transfer functions (#15064)
* Ensure that addresses are properly hex-prefixed in the generate ERC token transfer functions

* Ensure hex-prefixed addresses in send input

* Update unit tests

Co-authored-by: Frederik Bolding <frederik.bolding@gmail.com>
2022-06-28 14:21:09 -02:30
Alex Donesky
5290402181
Fix tokenIds larger than MAX_SAFE_INTEGER converted to scientific notation and failing to import (#15016)
* fix tokenIds larger than MAX_SAFE_INTEGER breaking

* add tests
2022-06-27 19:31:25 -05:00
Daniel
5fa88bebce
Show how much a cancellation of a smart transaction will cost (#15011) 2022-06-22 18:58:51 +02:00
David Walsh
6ffd0ce063
Fix 14802 - Prevent children error in page container (#14809) 2022-06-21 18:38:39 -05:00
George Marshall
051254dffd
Fixing tooltip theming by enforcing default theme (#14992)
* Fixing tooltip theming by enforcing background color

* Removing wide prop
2022-06-21 09:50:44 -07:00
daniba
085126d275
Move search icon and add to storybook (#14940)
* move search icon || update imports || add to story

* Optimized svg path, updated icon api and updating colors

* update other icons

* update snapshot

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-06-21 10:18:35 -05:00
Zachary Belford
5a1bc94aa4
Changed accounts fuzzy search threshhold to match all (#14914)
* Changed accounts fuzzy search threshhold to match all

* Changed account search only when there is at least 2 terms

* Fixed linting issue

* Lint fix account menu component
2022-06-20 15:35:07 -07:00
Guillaume Roux
25739a5fc1
[FLASK] Fix notifications icon color (#14941) 2022-06-20 23:23:51 +02:00
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
白宦成
adbd1c79be
fix EditGasDisplay (#13980)
Co-authored-by: David Walsh <davidwalsh83@gmail.com>
2022-06-17 13:04:59 -05:00
George Marshall
fdf3e9d2d7
Fix/14856 network settings page (#14857)
* Removing other features code

* Improving acccessibility of check icon

* Fixing add network button footer in popover view

* Fixing unit tests
2022-06-15 13:16:53 -07:00
Ariella Vu
73488766b6
SB:EditGasDisplay: fix error (#14946) 2022-06-15 14:55:04 -05:00
Daniel
ebf967562b
Remove experimental gas editing for Swaps (#14942) 2022-06-15 21:08:13 +02:00
Ariella Vu
1771ed4925
ErrorMessage: add @deprecated (#14945) 2022-06-15 13:45:54 -05:00
David Walsh
ea49b40d33
Make the accounts menu accessible (#14936) 2022-06-15 12:49:18 -05:00
Jordon
f5c6d0054f
Convert knobs and actions to controls/args for MainQuoteSummary (#14758)
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-06-15 10:43:26 -05:00
Ariella Vu
ede801e143
MetaMetrics: fix onCancel trackEvent (#14935)
should mirror first-time-flow/metametrics-opt-in logic
2022-06-14 11:00:11 -05:00
Soralit
804db7f1dc
fix animated qr in dark mode (#14900) 2022-06-13 16:07:51 -05:00
VSaric
f9edbf50ce
Empty balance while switching network (#14354) 2022-06-13 14:39:48 -05:00
VSaric
136218893b
Fix contact address pet name (#14613)
* The contact pet name isn't replaced by the recipients address

* Create getEnsResolutionByAddress selector and use it in the codebase

* Modified the getRecipient selector such that it returns an ens resolution as the nickname if a nickname isn't present but a ens resolution is.

* Update ui/ducks/send/send.js

Co-authored-by: Brad Decker <bhdecker84@gmail.com>

* Checked if ens resolution is present in the getRecipient selector

Co-authored-by: Brad Decker <bhdecker84@gmail.com>
2022-06-13 11:18:33 -05:00
Alex Donesky
b170211700
Fix to infinite loading on approve screen (#14756) 2022-06-11 12:55:35 -05:00
ryanml
496d9d81c3
Fix Enhanced Gas Fee toggle setting metrics event (#14874) 2022-06-10 16:05:25 -07:00
Zachary Belford
7dc6a5feaa
Merge pull request #14837 from MetaMask/prop-type-fixups
Prop type fixups
2022-06-10 12:36:31 -07:00