1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 18:00:18 +01:00
Commit Graph

4007 Commits

Author SHA1 Message Date
Dan J Miller
9573aa7515
Update @metamask/controllers to v6.2.1 (#10701) 2021-03-25 17:37:52 -02:30
David Walsh
7afd3156e0
Fix mismatchedChain typo in custom network approval screen (#10723) 2021-03-25 13:26:55 -05:00
MetaMask Bot
5ea02142b5 Version v9.2.1 2021-03-25 15:49:31 -02:30
Niranjana Binoy
04f92a5f14 Setting balance to 0x0 when the original value is undefined (#10634) 2021-03-25 15:49:31 -02:30
ryanml
1cfa58287c
Removing hard references to 12 word seed phrases in copy (#10704)
Adding translation entry for "Wallet Seed"

Fixed label padding issue by adding missing CSS rule
2021-03-24 10:55:03 -07:00
kumavis
bfdc1e68f5
Delete setupFetchDebugging.js (#10636)
* Delete setupFetchDebugging.js

* remove fetch-debugging (now handled corrently by sentry)
2021-03-23 18:05:49 +08:00
Brad Decker
1b4504e233
make migration more safe (#10689) 2021-03-22 10:21:52 -05:00
Brad Decker
a81629e104
refactor incoming tx controller (#10639) 2021-03-19 16:54:30 -05:00
ryanml
530e8c132f
Fixing incorrectly typed token decimal attribute (#10666) 2021-03-19 10:17:39 -07:00
gitpurva
fc999f948b
Change 'Send ETH' title to 'Send' (#10651) 2021-03-19 14:42:11 -02:30
Shane
b50fe3184a
fix: replace dnode background with JSON-RPC (#10627)
fixes #10090
2021-03-18 11:23:46 -07:00
Dan J Miller
480512d14f
Swaps support for local testnet (#10658)
* Swaps support for local testnet

* Create util method for comparison of token addresses/symbols to default swaps token

* Get chainId from txMeta in _trackSwapsMetrics of transaction controller

* Add comment to document purpose of getTransactionGroupRecipientAddressFilter

* Use isSwapsDefaultTokenSymbol in place of repeated defaultTokenSymbol comparisons in build-quote.js
2021-03-18 07:50:06 -02:30
Brad Decker
5a233e4634
colocate tests in flat structure (#10655) 2021-03-16 16:00:08 -05:00
Mark Stacey
9ce7b31719 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  Position the 3dot menu in the same spot on asset screen and home screen (#10642)
  Move swaps constants to the shared constants directory (#10614)
  prefer chainId over networkId in most cases (#10594)
  no more node:console (#10640)
  fix: speedup cancellation (#10579)
  Setting balance to 0x0 when the original value is undefined (#10634)
  Hide zero balance tokens at useTokenTracker layer (#10630)
  Removing double click bug from delete custom network modal (#10628)
  remove transactionCategory in favor of more types (#10615)
  Ensure permission log will only store JSON-able data (#10524)
  Replace logic for eth swap token in fetchQuotesAndSetQuoteState with getSwapsEthToken call (#10624)
  add trezor HD path for ledger wallets (#10616)
2021-03-15 13:20:43 -02:30
Dan J Miller
153bbc6053
Move swaps constants to the shared constants directory (#10614) 2021-03-15 10:51:35 -02:30
Brad Decker
3d4dfc74a8
prefer chainId over networkId in most cases (#10594) 2021-03-12 16:23:26 -06:00
Shane
b21cc5660f
fix: speedup cancellation (#10579)
fixes #7305
2021-03-12 11:26:07 -08:00
Niranjana Binoy
84b1379b40
Setting balance to 0x0 when the original value is undefined (#10634) 2021-03-12 10:20:33 -05:00
Brad Decker
2ed5bafa11
remove transactionCategory in favor of more types (#10615)
* remove transactionCategory in favor of more types

* remove reference to STANDARD in stubs
2021-03-10 14:16:44 -06:00
Erik Marks
a29fc51838
Ensure permission log will only store JSON-able data (#10524) 2021-03-10 11:50:06 -08:00
MetaMask Bot
2c12f19442 Version v9.2.0 2021-03-10 15:37:18 -03:30
Brad Decker
38fe75b7d9
prefer chainId when building block explorer urls (#10587) 2021-03-09 15:37:19 -06:00
David Walsh
92680cf56f
Add support for multiple Ledger & Trezor hardware accounts (#10505) 2021-03-09 14:39:16 -06:00
David Walsh
aeffe176b3
Hide zero balance tokens with preference (#10486) 2021-03-09 13:35:55 -06:00
Dan J Miller
c86ceacfd9
Standard reference to ETH_SWAPS_TOKEN_ADDRESS via ETH_SWAPS_TOKEN_OBJECT.address (#10613) 2021-03-09 12:29:35 -03:30
Brad Decker
9f11fadd95
remove proper noun Ethereum from all locales for onlyAddTrustedNetworks (#10598) 2021-03-08 12:28:06 -06:00
ryanml
45c076e232
Adding warnings for excessive custom gas input (#10582)
Fixes MetaMask/metamask-extension#9811
2021-03-05 10:32:09 -07:00
Mark Stacey
79a7199a2f
Fix mobile sync of ERC20 tokens (#10591)
In #10510 we changed how tokens are stored, keying them by `chainId`
rather than network type. However we didn't update our mobile sync
function to account for this, which ended up breaking the filtering
logic used to prepare the data that is synced.

Specifically, custom tokens added by users are filtered out to just
those that are confirmed to be ERC20 tokens in our built-in list of
tokens. This filters out unrecognized tokens and NFTs.

The filtering logic has been restored to the pre-#10510 behaviour.
2021-03-04 18:43:15 -03:30
Mark Stacey
40ffaa7265
Remove unused localized message (#10589)
This message was accidentally added in #10126.
2021-03-04 16:52:45 -03:30
matteopey
91ffb80606
Update italian translation (#10126)
* Update italian translation

* Update translation after review
2021-03-04 14:13:18 -03:30
Mark Stacey
6c72b55b11 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  Updating references to MetaMask support (#10563)
  Remove dead code related to the selectedFromToken variable in swaps/index.js (#10570)
  make lavamoat optional for dev mode (#10538)
  Adding a warning when sending a token to its own contract address (#10546)
  handle undefined network (#10560)
  cache balances by chain id (#10545)
  Fix/handle safe low undefined (#10561)
  Remove unused `hasHexData` prop (#10529)
  Resolving pull-ws to v3.3.2 (#10543)
  Sync `master` with `develop` (#10540)
2021-03-03 22:21:57 -03:30
MetaMask Bot
9d97dcb22e Version v9.1.1 2021-03-03 19:07:29 +00:00
ryanml
a8b1653566
Updating references to MetaMask support (#10563)
* Updating references to support email

Fixes MetaMask/metamask-extension#10188

* Removing UniqueImage component

* Removing unused UniqueImage locales
2021-03-03 10:15:24 -07:00
ryanml
3c6cdef074
Adding a warning when sending a token to its own contract address (#10546)
Fixes MetaMask/metamask-extension#9437
2021-03-02 17:28:12 -07:00
Brad Decker
e42658b590
cache balances by chain id (#10545) 2021-03-02 16:53:07 -06:00
Brad Decker
8bcd5e3b08
Sync master with develop (#10540)
Co-authored-by: MetaMask Bot <metamaskbot@users.noreply.github.com>
Co-authored-by: Thomas Huang <tmashuang@users.noreply.github.com>
2021-03-01 16:37:54 -06:00
MetaMask Bot
5026c1e6d0 Version v9.1.0 2021-03-01 11:26:49 -06:00
Dan J Miller
46ecf70741
Update swaps failure copy to help users get support (#10525) 2021-03-01 13:02:02 -03:30
David Walsh
8013e85c20
Accommodate for 0 sources verifying swap token (#10521) 2021-03-01 09:20:38 -06:00
Brad Decker
616b71271a
add chainId to all new transaction metadata (#10528) 2021-03-01 09:15:42 -06:00
ty
b04120dd0f
Warn users when an ENS name contains 'confusable' characters (#9187)
* Add warning system for 'confusable' ENS names (#9129)

Uses unicode.org's TR39 confusables.txt to display a warning when
'confusable' unicode points are detected.

Currently only the `AddRecipient` component has been updated, but the new
`Confusable` component could be used elsewhere

The new `unicode-confusables` dependency adds close to 100KB to the
bundle size, and around 30KB when gzipped.

Adds 'tag' prop to the tooltop-v2 component

Use $Red-500 for confusable ens warning

Lint Tooltip component

Update copy for confusing ENS domain warning.

* Fix prop type

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-02-27 01:56:04 -03:30
Brad Decker
caa32d87fb
key tokens by chainId (#10510) 2021-02-26 09:40:25 -06:00
Brad Decker
1a2dc850a3
addEthereumChain bug fixes (#10520) 2021-02-25 16:25:51 -06:00
Brad Decker
15d78b8158
use chain id for enabling ENS IPFS resolution (#10507) 2021-02-25 05:40:57 -06:00
Mark Stacey
3181eca351
Add tl localized messages (#10269)
These translations were provided by Lionbridge.
2021-02-24 23:54:01 -03:30
Mark Stacey
1860f486bd
Update ru localized messages (#10268)
These translations were provided by Lionbridge.
2021-02-24 23:53:37 -03:30
Niranjana Binoy
465dcb5e91
Wrong Currency Symbol when using Custom Network (#10490) 2021-02-24 15:39:56 -05:00
Mark Stacey
684c5855cd
Remove unused TransactionController option (#10508)
The function `getNetwork` was being passed into the
TransactionController constructor, but no such option was used in the
controller itself.
2021-02-24 01:01:09 -03:30
Brad Decker
aaec480e32
fix misuse of getCurrentNetwork (#10504) 2021-02-23 12:33:33 -06:00
Brad Decker
823466b62a
Re-add handler for addEthereumChain (#10489) 2021-02-23 10:32:46 -06:00
Brad Decker
1d23b59af3
add Custom Network Added event (#10484) 2021-02-23 09:58:35 -06:00
Brad Decker
aabe653240
Add Custom Network UI (#10310) 2021-02-22 10:20:42 -06:00
David Walsh
3d579dfcef
Remove react-select and SimpleDropdown, use Dropdown (#10468) 2021-02-19 13:03:44 -06:00
Shane
e3084b87cc
fix: manually connect accountsChanged (#10477)
fixes #9933
2021-02-19 09:48:49 -08:00
Dan J Miller
b056867c33
Correct use of useTokenTracker in viewQuote to ensure token data is not disrupted by faulty token in user account (#10456)
* Use the includeFailedTokens option with useTokenTracker in viewQuote

* Show appropriate error message if we do not have data on the balance of token on the view-quote screen

* Update app/_locales/en/messages.json

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

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-02-17 11:19:24 -03:30
Mark Stacey
1a91d985cc
Update vi localized messages (#10270)
These translations were provided by Lionbridge.
2021-02-17 09:52:50 -03:30
Austin Akers
2122b8cf16
Hide links to etherscan when no block explorer is specified for a custom network (#10455)
Conditionally render view on Etherscan text if it's a custom network

Fixes: #5631
2021-02-17 09:45:30 -03:30
Mark Stacey
b33a3deea6
Updated es and es-419 translations (#10258)
* Updating Spanish messages.json

* Updating Spanish (Latin America) messages.json

* More updates to Spanish messages.json

* More updates to Spanish (Latin America) messages.json

* Lint fixes

The message `swapGetQuotes` is no longer used, so it has been removed.
Additionally two descriptions were updated to be English. The
descriptions are not meant to be translated.

Co-authored-by: Fernando Sproviero <fernandospr@gmail.com>
2021-02-16 08:56:09 -03:30
Mentor Palokaj
76836097f5
Faulty use of adjective instead of verb in Dutch (#10448)
* Faulty use of adjective instead of noun in Dutch

The word `imported` in Dutch has different forms for adjective, noun and verb usage. I removed two instances of the letter `e` that I noticed when using Metamask.

Line `166` might similarly be wrong, but I don't know where in the interface it is so didn't verify.

**Question for devs:** is the `description` key in English on purpose or is it use for for me to translate it?

* Another faulty usage of geimporteerde
2021-02-15 13:02:14 -03:30
Brad Decker
4c5edea294
fix contract exchange rate race condition (#10414) 2021-02-12 11:41:53 -06:00
Erik Marks
e48053a6d5
Add custom network RPC method (#9724)
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
Co-authored-by: Brad Decker <git@braddecker.dev>
2021-02-12 09:25:58 -06:00
jpatel888
38078d7a8d
Fix BatchRequest.execute() multiple window issue (#10423) 2021-02-11 18:37:56 -03:30
Brad Decker
bd1683402a
use native currency in asset row (#10413)
* use native currency in asset row

* set native currency on startup
2021-02-11 12:20:08 -06:00
Mark Stacey
3f394c48f0 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  Fix locale lint errors (#10410)
  Update zh_CN translation (#9388)
  cancel unapproved confirmations on network change (#10357)
  Remove unused `confirmTransaction` state (#10396)
  Update `eth-sig-util` and `ethashjs` lockfile versions (#10383)
  Fix `transferFrom` localized message (#10395)
  Storybook: Signature Request (#10400)
  Use string literals for transaction category localized messages (#10391)
  Fix `start:dev` script (#10399)
  storybook/i18n - add i18n party button (#10382)
  Update `ja` localized messages (#10265)
2021-02-09 14:04:04 -03:30
Mark Stacey
91aaa8c540
Fix locale lint errors (#10410)
The updates to `zh_CN` merged in #9388 were a fair bit behind the
`develop` branch, so they ended up introducing various lint failures
despite passing on CI on the PR.

The localized messages have been updated to include English
descriptions, and one extraneous message has been removed.
2021-02-09 13:56:16 -03:30
arisac
a12654ec37
Update zh_CN translation (#9388)
* Update zh_CN translation

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2021-02-08 21:42:41 -08:00
Brad Decker
19fa2f5962
cancel unapproved confirmations on network change (#10357) 2021-02-08 17:22:30 -06:00
Mark Stacey
fd42e3b06d
Update ja localized messages (#10265)
* Update `jp` localized messages

These translations were provided by Lionbridge.

* `ja` localized messages patch via @nyatla

* i18n/ja - remove extra code

* Update app/_locales/ja/messages.json

* Update messages.json

Co-authored-by: kumavis <aaron@kumavis.me>
Co-authored-by: kumavis <kumavis@users.noreply.github.com>
2021-02-08 23:31:17 +08:00
MetaMask Bot
e66709e4b8 Version v9.0.5 2021-02-08 14:10:51 +00:00
Dan J Miller
913fd5aad6
A swaps copy update (#10387) 2021-02-05 15:16:04 -03:30
Dan J Miller
33ab480fbe
Swaps token sources/verification messaging update (#10346)
* Update standard swaps build quote screen token verification message

* Add actionable warning token verification message to swaps build quote screen

* Simplify swapTokenVerification translations

* Use original verifyThisTokenOn message instead of swapsConfirmTokenAddressOnEtherscan

* Restore verifyThisTokenOn message to hi locale

* Support type and the withRightButton option as parameters on the actionable message component

* Use 'continue' in place of swapPriceDifferenceAcknowledgementNoFiat message

* Use wrapperClassName property on infotooltip in actionable-message

* Remove unnecessary change

* Lint fix
2021-02-05 13:41:10 -03:30
Erik Marks
76a2a9bb8b
@metamask/eslint config@5.0.0 (#10358)
* @metamask/eslint-config@5.0.0
* Update eslintrc and prettierrc
* yarn lint:fix
2021-02-04 10:15:23 -08:00
Dan J Miller
e82ab94699
Change copy of submit button on swaps screen (#10373) 2021-02-04 14:42:43 -03:30
David Walsh
eeca0af5b9
Implement price impact acknowledgement button (#10347) 2021-02-04 09:58:46 -06:00
Mark Stacey
20d536d189
Update id localized messages (#10263)
These translations were provided by Lionbridge.
2021-02-03 09:42:35 -03:30
Thomas Huang
6a89261f28
Reject Trezor eth_getEncryptionPublicKey requests (#10330)
Further implements request rejection on eth_getEncryptionPublicKey for Trezor as they do not implement this method either.
2021-02-02 07:25:30 -08:00
Mark Stacey
f9b5b7ee37
Update ko localized messages (#10266)
* Update `ko` localized messages

These translations were provided by Lionbridge.

* Update `lockoutTimeTooGreat` message

* Update statements with bold 'Never'

The sentences did not make sense previously. They have been updated to
be grammatically correct and to emphasize the negation.

* Apply suggested change to 'swapNewQuoteIn'
2021-02-02 11:22:52 -03:30
Etienne Dusseault
6b34fb4184
Use @lavamoat/allow-scripts (#10009)
* use @lavamoat/allow-scripts for package postinstall allow list
* dnode: set "weak" to false

Co-authored-by: kumavis <kumavis@users.noreply.github.com>
Co-authored-by: Erik Marks <25517051+rekmarks@users.noreply.github.com>
2021-02-01 20:08:42 -08:00
Thomas Huang
23bab62008
Reject eth_getEncryptionPublicKey for ledger hw wallets (#10326)
Fixes #10111

Determine if the msgParams/address for the newRequestEncryptionPublicKey is a ledger keyring via getKeyringForAccount and return a promise rejection.
2021-02-01 12:39:09 -08:00
Mark Stacey
d8993883b7
Add origin to signature request confirmation page (#10300)
Fixes #6071

The origin of the dapp that suggested signing has been added to the
signature request confirmation page. This only applies to `eth_sign`,
`personal_sign`, `eth_signTypedData`, and `eth_signTypedData_v1`. The
confirmation page for `eth_signTypedData_v3` and `eth_signTypedData_v4`
already featured the origin.
2021-01-28 14:29:25 -03:30
Brad Decker
471140fdea
Add Truncated Definition List (#10292) 2021-01-28 11:22:37 -06:00
MetaMask Bot
d21dcb919d Version v9.0.4 2021-01-26 17:25:51 -03:30
Mark Stacey
5b48896ab1
Restore missing locale descriptions (#10261)
The localized message descriptions from the `en` locale have been
restored to all other locales. These descriptions are intended to help
translators understand the context for each message, and are not
intended to be translated.
2021-01-26 13:29:44 -03:30
Erik Marks
7ebab83e40
Fix logWeb3ShimUsage metrics (#10286) 2021-01-25 14:20:44 -08:00
Mark Stacey
7b1e12fd95
Update hi localized messages (#10264)
These translations were provided by Lionbridge.
2021-01-22 21:01:35 -08:00
Mark Stacey
74ee13f7c3 Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop: (29 commits)
  Reset swaps routeState in navigateBackToBuildQuote (#10166)
  Fix decrypt message confirmation UI crash (#10252)
  Fix site metadata JSON-RPC handler (#10243)
  Fix design system error constants (#10246)
  Remove unused environment variables (#10234)
  Update `yarn.lock` (#10241)
  Update postMessage structure for TrezorConnect 8 (#10192)
  Increase minimum Firefox version to v68 (#10195)
  Bump socket.io from 2.2.0 to 2.4.1 (#10232)
  Update `@reduxjs/toolkit` from v1.3.2 to v1.5.0 (#10228)
  eth-rpc-errors@4.0.2 (#10226)
  Add MAX_SAFE_CHAIN_ID and refactor chain ID validation (#10224)
  add chip component (#10199)
  add new typography component (#10197)
  @metamask/inpage-provider@8.0.3 (#10219)
  Add NETWORK_TYPE_RPC constant (#10203)
  Further improve organization of constants (#10200)
  add includePaths to sass-loader in storybook (#10213)
  Disable the swaps submit button after the first time it is clicked (#10162)
  Remove default to 18 decimals in quotesToRenderableData method (#10212)
  ...
2021-01-22 17:12:14 -03:30
Thomas Huang
a88a087b60 Fix site metadata JSON-RPC handler (#10243)
* Fix getting the site metadata from the request origin params.

Regressed from inpage-provider ts migration the request. The property domainMetadata is now set as a params key for the request.

https://github.com/MetaMask/inpage-provider/blob/v7.0.0/src/siteMetadata.js#L19-L25
vs
https://github.com/MetaMask/inpage-provider/blob/main/src/siteMetadata.ts#L19-L27

* Change hardcoded mocked response of the request to the prod response.
2021-01-22 15:11:09 -03:30
MetaMask Bot
ae5ee105bf Version v9.0.3 2021-01-22 18:29:03 +00:00
Thomas Huang
1dad4abfdc
Fix site metadata JSON-RPC handler (#10243)
* Fix getting the site metadata from the request origin params.

Regressed from inpage-provider ts migration the request. The property domainMetadata is now set as a params key for the request.

https://github.com/MetaMask/inpage-provider/blob/v7.0.0/src/siteMetadata.js#L19-L25
vs
https://github.com/MetaMask/inpage-provider/blob/main/src/siteMetadata.ts#L19-L27

* Change hardcoded mocked response of the request to the prod response.
2021-01-22 10:27:07 -08:00
David Walsh
9b4715cc8f
Update postMessage structure for TrezorConnect 8 (#10192) 2021-01-21 11:12:54 -06:00
Mark Stacey
408586aa4d
Increase minimum Firefox version to v68 (#10195)
Firefox v68 is the _previous_ Extended Support Release. We are
increasing this because our current minimum version doesn't support
async iterators, so some of our dependencies cause the extension to
crash.

Our metrics show that usage of Firefox versions older than this is
quite low (under 0.7% of Firefox users in the past month). These older
versions are also _very behind_ on security updates. Using the Extended
Support Release also makes it easier for us to test the minimum
version, and ensure our extension remains compatible with it.

Relates to #6805
2021-01-21 09:01:42 -06:00
Erik Marks
30ff153103
eth-rpc-errors@4.0.2 (#10226) 2021-01-20 22:06:41 -08:00
Erik Marks
4fef2b7443
Add MAX_SAFE_CHAIN_ID and refactor chain ID validation (#10224)
* Add MAX_SAFE_CHAIN_ID constant
* Add isSafeChainId to shared utils module
* Move isPrefixedFormattedHexString to shared utils module
* Validate custom RPC chain IDs in network controller
* Update some network controller error messages.
* Add isSafeChainId validation to UI
2021-01-20 15:37:18 -08:00
Mark Stacey
774b537a9b Merge remote-tracking branch 'origin/develop' into sync-master
* origin/develop:
  add new typography component (#10197)
  @metamask/inpage-provider@8.0.3 (#10219)
  Add NETWORK_TYPE_RPC constant (#10203)
  Further improve organization of constants (#10200)
  add includePaths to sass-loader in storybook (#10213)
  Disable the swaps submit button after the first time it is clicked (#10162)
  Remove default to 18 decimals in quotesToRenderableData method (#10212)
  use dart sass, and update related modules (#10208)
  Fetch with a timeout everywhere (#10101)
  Make hiring link a link on text (#10206)
  improve design system scss (#10193)
  zh_TW: Translate buy, assets, activity (#10207)
  Update TW term 乙太 -> 以太 (#10191)
  Fix hardware account selection (#10198)
  Add hiring note to the README (#10190)
  drop the fox in about (#10174)
2021-01-20 18:55:04 -03:30
MetaMask Bot
d7e1ee166f Version v9.0.2 2021-01-20 10:49:50 -08:00
Yahsin Huang
32121107c2 zh_TW: Translate buy, assets, activity (#10207) 2021-01-20 10:49:50 -08:00
gasolin
9ed181f4e1 Update TW term 乙太 -> 以太 (#10191) 2021-01-20 10:49:50 -08:00
Erik Marks
7077ee68dc
Add NETWORK_TYPE_RPC constant (#10203)
* Refactor network display props
* Add NETWORK_TYPE_RPC constant
* Consolidate network constants
2021-01-20 08:49:05 -08:00
Erik Marks
90289ec22a
Further improve organization of constants (#10200) 2021-01-20 08:13:14 -08:00
Erik Marks
7159dd6867
Fetch with a timeout everywhere (#10101)
* Use fetchWithTimeout everywhere
* Memoize getFetchWithTimeout
* Require specified timeout
2021-01-19 08:41:57 -08:00