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

5632 Commits

Author SHA1 Message Date
Frederik Bolding
fa9d703aa0
Fix SRP paste duplication (#14625)
* Fix SRP paste duplication

* Remove else-case for paste event

* Add E2E test that would catch this issue in the future

* Fix linting
2022-05-09 14:46:20 +02:00
Brad Decker
564ad2f81b
Track send flow history on txMeta (#14510) 2022-05-04 11:54:46 -05:00
David Walsh
8a71f0f008
Add search information for Theme dropdown (#14476) 2022-05-04 09:57:01 -05:00
Daniel
9daab6aa59
Disable STX if a regular tx is in progress (#14554)
* Disable STX if a regular tx is in progress

* disableStxIfRegularTxInProgress : early return

* Fix UTs

* Trigger Build
2022-05-03 17:55:41 +02:00
Frederik Bolding
3b3a680682
Stop using 4bytes for contract deployment (#14598) 2022-05-02 16:49:01 -05:00
Alex Donesky
12a088e638
Fix browser.tab.get call (#14550)
* update to expect promise from browser api polyfill rather than pass callback
2022-04-29 09:21:06 -05:00
Thomas Huang
d139e69545
Unit test proptype (#14509)
* Confirm page container content currentTransaction proptype change string to object

* Add title prop
2022-04-28 15:14:53 -07:00
George Marshall
ad1abaaef4
Updating text/muted to text/alternative for select text on home screen (#14553) 2022-04-28 06:03:12 -07:00
Guillaume Roux
6309d53650
Dark Mode : Add OS option in theme selection dropdown (#14379) 2022-04-28 14:36:28 +02: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
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
Guillaume Roux
7a9662b88e
Add token standard to custom token details (#14506)
* use getTokenStandardAndDetails to get token standard

* remove console.log and fix test

* remove console.log
2022-04-26 12:08:14 -07:00
ryanml
0c49bc14d4
Fixing 'Learn more' casing on import token screen (#14529) 2022-04-26 10:25:07 -07:00
Brad Decker
193c22588e
call controller methods directly in send duck (#14465) 2022-04-26 12:07:39 -05:00
Alex Donesky
cf2c6a3164
show token approval details on confirm approve screen by default (#14523) 2022-04-26 10:21:52 -05: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
amerkadicE
8fef9fd8df
Update display of switching current network (#13450)
Co-authored-by: Amer Kadic <amerkadic@Amers-MacBook-Pro.local>
Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-04-25 13:28:52 -05:00
Dan J Miller
284bab1cbc
Ensure network name in confirm page container is defined (#14520) 2022-04-25 15:04:44 -02:30
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
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
Olusegun Akintayo
095cc94ed0
Add new token added event (duplicating the existing event structure) when collectible is manually added (#14279)
* Add new token added event (duplicating the existing event structure) when auto detection occurs for NFTs
Set source property to detected on the new token added event,
2022-04-21 13:29:39 -05:00
Brad Decker
8f47c19b9d
increase test coverage of nonce sorted transaction selector (#14486) 2022-04-21 12:33:44 -05:00
Dan J Miller
3ecc04e42d
Fix the alerts toggles in settings (#14498) 2022-04-21 09:48:03 -07:00
Dan J Miller
b1df04c253
Disable swaps whenever the environment is not development or testing, so that behaviour follows production for QA purposes (#14499) 2022-04-21 09:19:34 -07:00
Brad Decker
488d64ae8b
increase test coverage of nonce sorted transaction selector (#14479) 2022-04-21 09:45:31 -05:00
Hassan Malik
308c6e4fe3
Add snaps view search (#14419)
* add snaps view search

* add snaps view search

* fix to add in settings constants

* removed spread

* remove unused import

* add fencing

* more fencing

* ternary refactor, updated settings tests

* refactor
2022-04-19 11:08:09 -04:00
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
Daniel
eed6ae2b8c
Swaps: Sort "token_from" dropdown tokens by their fiat value first and "token_to" by top tokens (#14436) 2022-04-15 14:57:58 +02:00
Guillaume Roux
76615b7bec
Enhanced Gas Fee UI : Fix gas values overlaping with labels (#14392) 2022-04-14 19:30:19 +02:00
Dan J Miller
b7b041c43b
Fix speed-up/cancel: don't update existing transaction data (#14355)
* Fix speed-up/cancel: don't update existing transaction data

* Move retryTxMeta state management to useGasFeeInputs.js

* Handle initial retryTxMeta set if no transaction is passed to useGasFeeInputs

* Ensure previousGas is use on retry transaction if it is available in useGasFeeInputs

* Remove update transaction mock and correctly test gas fee increase scenarios now that updateTransaction used in cancel-speedup is defined on the front end
2022-04-14 13:20:48 -02:30
Daniel
9403ee9c7a
Disable Swaps on Rinkeby for production (#14372)
* Disable Swaps in Rinkeby for production

* Use arrays instead of objects for allowed chain ids

* Trigger Build
2022-04-14 17:02:38 +02:00
Niranjana Binoy
455d4a9825
Update DetectTokenController for token detection V2 (#14216) 2022-04-13 12:23:41 -04: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
Guillaume Roux
4b3977044f
Swap : Fix undefined icon url (#14411) 2022-04-13 14:18:35 +02:00
Frederik Bolding
637a960d3c
Use correct casing for "learn more" (#14412) 2022-04-08 18:21:41 +02:00
Guillaume Roux
14a5dda24f
Dark Mode : Fix connected account permission icon color (#14406) 2022-04-07 15:26:35 -05:00
Niranjana Binoy
89ce0cee85
Updating info ActionableMessage type to default (#14385) 2022-04-07 13:11:42 -04:00
George Marshall
9ce966ba1d
Storybook housekeeping 🧹 (#14331)
* Removing argTypes that are related to static props and don't have anything to do with the component. Also some general house keeping

* updates
2022-04-07 08:14:22 -07:00
Hassan Malik
e0e466490e
Settings search refactor (#14350)
* removed unnecessary eslint disable and removed key prop from SettingsSearchList

* removed unnecessary function, refactored settings pages to use only handleSettingsRefs

* simplified utils, removed unnecessary test

* updated usage of util functions

* fixed type error, allow for ampersand in search input

* removed unnecessary var

* fixed test

* fixes per comments

* fixed var name

* fixed property name

* changed some properties in SETTINGS_CONSTANTS to accept t param

* redid util functions

* changed from multiline comment to single line

* replace empty descriptions

* updated util logic

* fix undefined issue
2022-04-06 16:27:08 -04:00
Niranjana Binoy
07231e42b2
Update token detection logic to only control auto-detection (#14251) 2022-04-06 13:59:16 -04:00
Ariella Vu
7e059550a2
TabBar: prevent text from wrapping early (#14368) 2022-04-06 11:00:52 -03:00
Ariella Vu
582f6168f9
Settings:TabBar: Fix text wrap style (#14348)
* TabBar: fix text wrap style

* TabBar: adjust icon alignment
2022-04-05 20:22:41 -03:00
David Walsh
af963d7f7b
Dark Mode: What's New Announcement (#14346) 2022-04-05 14:55:00 -05:00
David Walsh
d8fd5f68ce
Dark Mode: Fix Actionable Messages (#14361) 2022-04-05 13:51:05 -05:00
Thomas Huang
2cd1472e3a
Fix imported component name and change size proptype type to string (#14237)
* Fix imported component name and change size proptype type to string

* Change IconTokenSearch size prop back to number and change usage to number
2022-04-05 10:48:03 -07:00
Dan J Miller
fc4ae4ef61
Fix the close button in the speed up and cancel popovers (#14356) 2022-04-05 11:06:58 -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
ryanml
7e7b97d7c9
Improving identicon settings accessibility (#13760)
* Improving identicon settings accessibility

* Make settings keyboard accessible
2022-04-04 10:36:56 -07:00
Mark Stacey
4bcb48df53
Replace ReadOnlyInput (#14330)
Replace the last two uses of the `ReadOnlyInput` with a div. The idea
of using an input for read-only data is silly. We can just put it in
the DOM directly instead.
2022-04-04 12:37:01 -02:30
George Marshall
6e73c34e2b
Updatin contract deployment text label to be darker (#14333) 2022-04-04 16:17:54 +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
Niranjana Binoy
96610742ce
Token Details component for Tokens Detected page (#14169) 2022-04-02 17:33:35 -04:00
George Marshall
dfd3e233e8
color fix for hover on swaps quote (#14334) 2022-04-02 06:40:33 -07:00
David Walsh
5a159ef991
Dark Mode: Fix QR display (#14312) 2022-04-01 14:53:14 -05:00
filipsekulic
8cb1f4af2e
Renamed metametrics.new.js to metametrics.js (#14327) 2022-04-01 14:11:12 -05:00
Niranjana Binoy
afcc3a8f26
Token Value component for Tokens Detected page (#14274) 2022-04-01 11:52:22 -04:00
ryanml
6f5cc9c6c7
Fix Buy Ether via Moonpay and Wyre actions (#14322) 2022-04-01 08:51:30 -07:00
George Marshall
e62678464c
Fix/14302 about fox logo (#14308) 2022-04-01 07:00:33 -07:00
George Marshall
c516760382
Fix/14303 show private keys (#14314) 2022-04-01 06:59:46 -07:00
George Marshall
44b4b9b012
Fixing account details label colors (#14315) 2022-04-01 06:58:02 -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
Pieter Tolsma
cb1890d928
Convert knobs and actions to controls/args for CountdownTimer (#14222)
Co-authored-by: Pieter Tolsma <pietertolsma@Pieters-MacBook-Air.local>
2022-03-31 13:31:31 -05:00
白宦成
aef2541e57
Convert UrlIcon knobs and actions to controls / args (#13981)
Co-authored-by: George Marshall <georgewrmarshall@gmail.com>
Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-03-31 13:30:15 -05:00
filipsekulic
59131f5da5
Deleted the old metametrics.js (#14292) 2022-03-31 12:10:19 -05:00
Rob Dawson
e50ef0c787
Mįgrated list item stories from addon knobs to use controls. (#13627)
* mįgrated list item stories from addon knobs to use controls.

* Updates

Co-authored-by: georgewrmarshall <george.marshall@consensys.net>
2022-03-31 10:10:02 -07: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
George Marshall
4bb2582200
Swaps select quote highlight fix (#14270) 2022-03-31 08:58:09 -05:00
Niranjana Binoy
9f7c4eb658
Enable Token search functionality on supported networks (#14034) 2022-03-31 09:48:05 -04:00
Mark Stacey
e9a815e477
Merge pull request #14289 from MetaMask/master-sync
Sync `develop` with `master`
2022-03-31 09:24:12 -02:30
Olusegun Akintayo
3c2e4e9c9e
Add asset_type to 'Tokens Added' event. (#14252)
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-31 11:43:26 +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
David Walsh
00025afe4c
Dark Mode: Remove unwanted background for price quote (#14278) 2022-03-30 15:42:18 -07:00
David Walsh
97be10becd
Dark Mode: Fix colors in toggle button (#14280) 2022-03-30 17:29:59 -05:00
David Walsh
9d7f4d2005
Ensure proper color for swaps edit link (#14273) 2022-03-30 14:54:25 -07:00
David Walsh
8c7b643eac
Dark Mode: Ensure actionable message button colors are the same color as previously (#14271) 2022-03-30 14:54:10 -07:00
Olusegun Akintayo
4ac0f82125
Add token standard to Token Added event. (#14253)
Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-31 00:25:49 +04:00
Niranjana Binoy
68f07ce1f7
Token Aggregators component for Tokens Detected page (#14157) 2022-03-30 16:21:27 -04:00
ryanml
085c9753de
Ensure Metafox follows cursor on Fetching quotes screen (#14261) 2022-03-30 10:54:01 -07:00
BoxedFruits
950de390b3
GasModalPageContainer story: convert knobs and actions to controls / args (#13516) 2022-03-30 08:46:37 -05:00
Daniel
69d7c51c56
Show STX switch for wrapping / unwrapping (#14225) 2022-03-30 10:02:55 +02:00
jesseharte
4f1cee4b87
Change over ImportToken stories to use controls instead of knobs, update props in stories (#14246) 2022-03-29 15:20:19 -07:00
Jurriaan Den Toonder
1521e63913
Change over FeeCard stories to use controls instead of knobs, update props in stories (#13766)
This PR changes over the deprecated knobs and actions in `fee-card.stories.js` to controls.
I attempted to create a `README.mdx`, but unfortunately the `<ArgsTable of={FeeCard} />` refused to render out any of the documentation comments I added to the `FeeCard.propTypes`, thus that has not been included (and no documentation has been added to the propTypes of FeeCard).

_Please note:_ currently nested arg types are not possible in StoryBook, but discussions are open: https://github.com/storybookjs/storybook/issues/11486. This means that the StoryBook shows `primaryFee`, `primaryMaxFee`, `secondaryFee` and `secondaryMaxFee`, but these are mapped to the 2 `primaryFee` and `secondaryFee` props of the component. This is visible if the developer clicks on the `Show code` button at the docs page in StoryBook.

Signed-off-by: Jurriaan Den Toonder <1493561+Fastjur@users.noreply.github.com>
2022-03-29 16:13:00 -06: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
Daniel
7cb22bd883
metaMetricsEvent -> trackEvent (#14249) 2022-03-29 19:19:40 +02:00
filipsekulic
ee89eddb82
Removed metrics event (#14042) 2022-03-29 08:46:24 -05:00
Dan J Miller
85385233e5 Fix missing scss variable 2022-03-28 17:17:19 -02:30
George Marshall
24ca3c5aa3 Dark Mode: Network display fix (#14159) 2022-03-28 10:29:43 -07:00
Guillaume Roux
a3ab204d11
Dark Mode: Fix some colors (#14228)
* fix some colors

* fix test and address requested changes

* address requested changes
2022-03-28 10:23:27 -07:00
Dan J Miller
1ded5618a1 Ensure only letters, numbers and spaces can be entered in settings search input (#14226) 2022-03-28 12:37:09 -02:30
Dan J Miller
794d6f72bd Fix color in v2 gas fee modal (#14224) 2022-03-28 12:35:33 -02:30
Dan J Miller
b7ea820a82
Ensure only letters, numbers and spaces can be entered in settings search input (#14226) 2022-03-28 12:33:41 -02:30
Dan J Miller
74ef9edd54
Fix color in v2 gas fee modal (#14224) 2022-03-28 12:32:53 -02:30
ryanml
067fd78ea6
Add 'Enhanced Gas UI' setting to search index (#14206) 2022-03-28 07:50:32 -07:00
George Marshall
7f8dc260b5
Dark mode: onboarding icons and colors (#14209) 2022-03-28 09:42:09 -05:00
Julian Y
21afcc75ce
Fix import typo (#14180) 2022-03-25 23:57:20 -07:00
David Walsh
7f239997dc
Dark Mode: Remove feature flag (#14207) 2022-03-25 20:42:52 -05:00
Guillaume Roux
a7ac83f9d3
Dark Mode: Swap hex colors in ui/pages (#14214)
* swap hex colors in ui/pages

* update snapshots
2022-03-25 15:15:31 -07:00
VSaric
31f0b245c3
Fixed issue where the "lock screen" shows up briefly between the "create password" screen and the success screen (#14111)
Co-authored-by: Alex Donesky <adonesky@gmail.com>
2022-03-25 16:03:49 -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
Olusegun Akintayo
67ef1ce51e On send/edit page, disable app header so that networks can't be changed (#14115)
* On send/edit page, disable app header so that networks can't be changed
in the middle of a transaction.

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

* Only disable header if we're in edit mode

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-25 17:13:42 -02:30
Niranjana Binoy
e9cd1237ce ImportToken does not clear up the page when going back (#14093) 2022-03-25 17:13:42 -02:30
Ariella Vu
73b3881348 Fix Settings Header Back Button and update "Add Contacts" position (#14103)
* Settings: use IconCaretLeft
- fix missing icon and fix icon position

* IconCaretLeft: fix onClick handler

* Settings: fix Add Contacts btn position

* Settings: update back btn paddings
- shrink padding a little because IconCaretLeft adds more width
2022-03-25 17:13:42 -02:30
Dan J Miller
07bcf1ca0a Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043) 2022-03-25 17:13:42 -02:30
ryanml
b0a9b83f6f Removing iconClassName prop from NetworkDisplay (#14035) 2022-03-25 17:13:42 -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
David Walsh
382669bb34
Dark Mode: Remove last unused colors (#14208) 2022-03-25 14:30:36 -05: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
Guillaume Roux
06e196441a
swap hex colors in ui/components/app folder (#14189) 2022-03-25 08:32:36 -07:00
Guillaume Roux
e8d4f11cbf
Dark Mode: Swap hex colors in ui/components/ui folder (#14191) 2022-03-25 10:09:22 -05:00
Guillaume Roux
57818fabbe
Dark Mode: Remove ui colors (#14184) 2022-03-25 10:07:47 -05: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
VSaric
30ef26101a
Remove the useSegmentContext function from metametrics.new.js (#14013) 2022-03-25 09:26:09 -05: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
VSaric
5564176d72
Remove usages of useNewMetricEvent hook (#13955) 2022-03-25 08:21:29 -05:00
Ariella Vu
69cba6d9fb
ui/index: fix getPlatformInfo w/ polyfill (#14171) 2022-03-25 07:24:27 -02:30
Guillaume Roux
4c009d5ae5
Dark Mode : Permission flow (#14071) 2022-03-24 18:26:49 -05:00
Guillaume Roux
974491a3cf
Dark Mode: Remove white, black and gray color tokens (#14186)
* remove white, black and gray color tokens

* Update ui/pages/first-time-flow/seed-phrase/reveal-seed-phrase/reveal-seed-phrase.component.js

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

* Add RevealSeedPhrase story

Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-03-24 13:27:41 -07:00
George Marshall
fd36eea443
Dark mode: Updating all left over static hex values in scss (#14167) 2022-03-24 19:08:08 +01:00
Dan J Miller
b7e0fc860e
Ensure state updates after accepting or rejecting a watched asset, to prevent navigation errors. (#14043) 2022-03-24 13:56:38 -02:30
David Walsh
d15de941e3
Dark Mode: Remove grays (#14175) 2022-03-24 09:00:15 -07:00
Olusegun Akintayo
bc8d4a3a44
On send/edit page, disable app header so that networks can't be changed (#14115)
* On send/edit page, disable app header so that networks can't be changed
in the middle of a transaction.

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

* Only disable header if we're in edit mode

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-24 13:21:22 -02:30
David Walsh
86fb8e3a41
Dark Mode: Remove Malibu (#14176) 2022-03-24 09:45:16 -05:00
David Walsh
2ab2b594ed
Dark Mode: Remove Scorpion (#14174) 2022-03-24 09:45:00 -05:00
David Walsh
dd032dc324
Dark Mode: Import Private Key Colors (#14173) 2022-03-24 09:44:40 -05:00
David Walsh
7a57942305
Dark Mode: Remove secondary legacy colors (#14154) 2022-03-24 15:15:09 +01:00
David Walsh
0ada0816ef
Dark Mode: Update tippy text color (#14178) 2022-03-24 15:14:40 +01:00
David Walsh
065d525d58
Dark Mode: Remove --ui-white (#14162) 2022-03-24 15:13:26 +01: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
David Walsh
e152eaf27b
Dark Mode: Transaction statuses (#14092) 2022-03-23 21:28:01 -05:00
David Walsh
0df365f895
Dark Mode: Confirm Approve Content (#14148) 2022-03-23 20:33:07 -05:00
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
David Walsh
e3100a0efb
Dark Mode: Remove primary-1 (#14150) 2022-03-24 00:43:38 +01:00
David Walsh
5399daeeb2
Dark Mode: Remove --ui-black (#14164) 2022-03-24 00:42:26 +01:00
David Walsh
45a1c30624
Dark Mode: Export Key (#14141)
Co-authored-by: George Marshall <george.marshall@consensys.net>
2022-03-24 00:40:21 +01:00