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

3082 Commits

Author SHA1 Message Date
Shane
059d5d0488 Fixed firefox Snaps + add initial end-to-end tests (#13671)
* Changed registryUrl for snaps only in firefox
Fixed getPlatform to only be imported into metamask-controller in flask
Removed snaps specific testrunner script and use run-all with a cli option

* Fixed flakey tests

* Removed unneeded await

* Added delay

* Fixed linting
2022-03-22 19:54:33 -07:00
Erik Marks
a3355d9ca5 @metamask/controllers@26.0.0 (#13867)
* @metamask/controllers@26.0.0
2022-03-16 13:12:37 -02:30
Olusegun Akintayo
e7bf63a6d6 Fixes an issue where metamask popup is not loading on eth_accounts (#13840)
(first time).

Signed-off-by: Akintayo A. Olusegun <akintayo.segun@gmail.com>
2022-03-09 23:50:02 -03:30
Niranjana Binoy
8c9efb2a1f Increase the txHistoryLimit in the transaction controller to 60 (#13743) 2022-03-09 09:19:11 -03:30
Niranjana Binoy
3f0fa89d8d Deleting transactions from currentNetworkTxnList based on unique address along with nonce and chainId (#13669) 2022-03-09 09:19:11 -03:30
Mark Stacey
c3feabf4de 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-08 17:15:11 -03:30
Daniel
d17d7f2d18 Set up STX controller state (#13843)
* persist stx controller state

* Pass STX controller state as the 3rd param

* Trigger Build

Co-authored-by: Dan Miller <danjm.com@gmail.com>
2022-03-04 16:52:59 -03:30
Daniel
730f977939 Small fixes for Swaps (#13732)
* Fix: Insufficient number of substitutions for key "stxSuccessDescription"

* Only calculate "approvalGas" if the "approvalNeeded" param is truthy in a quote

* "Swap from" has to be set to enable "Review Swap", set a default token for "Swap from"

* Fix: Unable to find value of key "undefined" for locale

* Use array destructuring
2022-02-23 14:28:31 -07:00
ryanml
5b96e3370e
Using correct metricsEvent arg (#13684) 2022-02-21 10:39:01 -07:00
Daniel
2585f45bde
Add support for Smart Transactions (#12676) 2022-02-18 17:48:38 +01:00
David Walsh
009c6e1455
Use hardware wallet constants when possible (#13634) 2022-02-16 14:54:30 -06:00
Erik Marks
35ac762e10
Add Snaps via Flask (#13462)
This PR adds `snaps` under Flask build flags to the extension. This branch is mostly equivalent to the current production version of Flask, excepting some bug fixes and tweaks.

Closes #11626
2022-02-14 16:02:51 -08:00
Jyoti Puri
2b5b787ca9
Fix: advance defaults should never be used for swaps (#13617) 2022-02-15 00:37:46 +05:30
Niranjana Binoy
b42e1f75fa
Include transactions from all networks in state logs (#13599) 2022-02-14 13:29:24 -05:00
Alex Donesky
7223d4cd2c
fix opensea/autodetect setting dependency relation (#13575) 2022-02-10 14:02:06 -06:00
Daniel
8166d50578
Resolve a BigNumber issue (#13555)
* Do not call `decimalToHex` for `minimumGasLimit`, which is already in hex

* Add `0x` prefix when returning a gas estimate

* Fix UTs

Co-authored-by: Dan J Miller <danjm.com@gmail.com>
2022-02-08 14:44:50 -03:30
Dan J Miller
0a4432513d
captureKeyringTypesWithMissingIdentities() when 'Missing identity for address' in permissions/specifications (#13521)
* captureKeyringTypesWithMissingIdentities() when 'Missing identity for address' in permissions/specifications

* Fix unit tests
2022-02-07 15:30:37 -03:30
Dan J Miller
8ad85e6413
Replace use of .flat with _.flatten, to accomodate chrome < 69 (#13520) 2022-02-07 11:28:28 -03:30
Daniel
1297761de7
Handle a negative gas fee (#13511) 2022-02-07 11:58:31 +01:00
Jyoti Puri
cc1861a34e
Adding metrics events for EIP-1559 V2 flow (#13329) 2022-02-01 23:23:03 +05:30
Alex Donesky
dc217dd536
Yet more NFT UX cleanups (#13435)
* yet more nft ux cleanups
2022-01-31 12:56:49 -06:00
Jyoti Puri
41df6eac1c
Capturing default gas estimates in txMeta and passing it to metrics (#13385) 2022-01-31 22:57:46 +05:30
Jyoti Puri
11c61a3ead
EIP-1559 V2 UI/UX improvements (#13419) 2022-01-31 11:21:43 +05:30
Shane
3772dfee11
Added subjectType to setupProviderConnection and setupUntrustedCommunication (#13437)
These changes were split off from the snaps branch [here](https://github.com/MetaMask/metamask-extension/pull/11837#discussion_r792942834).

The `subjectType` is necessary to handle connecting to snaps using these methods.
2022-01-28 13:42:32 -08:00
yanjade
3eb99babf2
batch fix misspelling (#13449) 2022-01-28 09:09:07 -06:00
David Walsh
851fce9a3b
Enable buying MATIC on Polygon, BNB on BSC, AVAX on Avalanche, FTM on Fantom, CELO on Celo, and respective stablecoins on Transak (#13398) 2022-01-28 07:46:26 -06:00
Alex Donesky
be65eb7339
More nft ux fixes (#13388)
* a batch of nft ux fixes
2022-01-27 11:26:33 -06:00
VSaric
5579061cfa
Proper calculation of the gas limit (#12784) 2022-01-21 09:58:59 -06:00
Alex Donesky
db0230f23a
NFT UX cleanup grab-bag (#13352)
* NFT UX cleanup
2022-01-20 11:49:49 -06:00
PeterYinusa
e2a8886a05
Upgrade ganache - continued (#13354)
* remove ganache-core

* use ganache v7

* convert to hex

* lint
2022-01-20 16:56:52 +00:00
Brad Decker
c58cc631c7
implement event fragments for tx controller (#13331) 2022-01-20 10:26:39 -06:00
Alex Donesky
f7849a0b7c
Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page (#13271)
* Add error that redirects users to Import NFT page when they attempt to add an NFT on the Import Token page
2022-01-19 08:38:33 -06:00
Erik Marks
a5873eb7ff
Fix manually connecting sites (#13320) 2022-01-14 14:31:32 -08:00
Brad Decker
dffad6e35d
use object.values to get array for iteration (#13300) 2022-01-13 12:10:47 -06:00
Brad Decker
b820ef131b
Implement event fragments (#12251) 2022-01-12 13:31:54 -06:00
Jyoti Puri
88faef7e19
Adding user setting option for EIP-1559 V2 (#13242) 2022-01-12 00:47:56 +05:30
Niranjana Binoy
cd0892a3af
EIP-1559 V2: Use default gas preferences of user for all transactions (#13238) 2022-01-10 14:34:54 -05:00
Alex Donesky
4826c8c95e
Feat/collectibles send flow (#13048)
* Add collectibles send flow
2022-01-10 10:23:53 -06:00
Mark Stacey
3732c5f71e
Add JSDoc ESLint rules (#12112)
ESLint rules have been added to enforce our JSDoc conventions. These
rules were introduced by updating `@metamask/eslint-config` to v9.

Some of the rules have been disabled because the effort to fix all lint
errors was too high. It might be easiest to enable these rules one
directory at a time, or one rule at a time.

Most of the changes in this PR were a result of running
`yarn lint:fix`. There were a handful of manual changes that seemed
obvious and simple to make. Anything beyond that and the rule was left
disabled.
2022-01-07 12:27:33 -03:30
Elliot Winkler
af971cd5b6
Remove dupe Prettier config from ESLint config (#13234)
The ESLint config for the extension explicitly includes support for
Prettier. However, this is already being provided by our global ESLint
config (`@metamask/eslint-config`). Therefore there is no need to
include it here. In fact, this is causing weird issues where the `curly`
option is getting overridden somehow. After this change, these syntaxes
are invalid:

``` javascript
if (foo) return;
```

``` javascript
if (foo) return 'bar';
```
2022-01-06 15:56:51 -07:00
Mark Stacey
22f931e6b2
Prevent automatic rejection of confirmations (#13194)
* Prevent automatic rejection of confirmations

Confirmations are now only automatically rejected if a user explicitly
closes the notification window. If we close the window programmatically
because there are no notifications left to show, nothing gets rejected.

This partially avoids a race condition where a confirmation gets
rejected automatically without the user having seen the confirmation
first. This could happen if the confirmation was processed just as the
notification window was being closed.

It's still possible for a confirmation that the user has never seen to
get rejected as a result of the user closing the window. But at least
now it's no longer possible for a confirmation to get rejected in this
manner after the user resolves the last confirmation in the queue.

* Fix bug that prevented automatic closure detection

All windows were being detected as explicit window closures,
essentially just as they were previously, because this variable was
cleared too soon.

* Re-open popup when necessary

After the window is automatically closed, a confirmation may have been
queued up while the window was closing. If so, the popup is now re-
opened.
2022-01-05 13:39:19 -03:30
Erik Marks
75e8b4f8b9
Add missing permissions middleware hook (#13205)
Adds a missing middleware hook for `wallet_requestPermissions` that we failed to add in #12243. Also adds a runtime check that throws an error if any expected hooks are not provided to `createMethodMiddleware`.

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2022-01-04 12:57:18 -08:00
Ikko Ashimine
066b78c722
Fix typo in ComposableObservableStore.js (#13151) 2022-01-04 12:59:08 -06:00
Alex Donesky
c266d4e6af
Feat/check update collectible ownership (#13110)
* Use method to check and update collectible ownership
2022-01-03 14:39:41 -06:00
Mark Stacey
8866c39623
Update the Firefox prerelease version format (#13158)
The Firefox extension version format does not support the version
format we use (SemVer), so we have to specially format the extension
version to be compatible. The format we chose was
`[major].[minor].[patch].[buildType][buildVersion]`. But when we tried
to submit a build with a version in that format, it was rejected as
invalid for unknown reasons.

The Firefox extension format has been updated to
`[major].[minor].[patch][buildType][buildVersion]`. This seems to pass
validation.
2022-01-03 12:48:10 -03:30
Mark Stacey
ae97e91443
Fix how version_name manifest field is used (#13155)
The `version_name` manifest field was being used on Chrome to store the
build type. However, Chrome intended this field to be a full
representation of the version, for display purposes. This was evident
when uploading this version to the Chrome Web Store, because it used
`flask` as the entire version.

Instead the `version_name` field now includes the full SemVer version
string. The version parsing code within the build script and in the
wallet itself have been updated accordingly.
2022-01-03 10:30:13 -03:30
Mark Stacey
fe77367837
Update the Sentry setup log with the build type (#13157)
The `environment` field we use for Sentry includes the build type for
all build types except `main`, but the log message indicating that
Sentry did not include this. This log message is useful for ensuring
that Sentry is setup correctly, so it should display the same
environment that Sentry is using. It has been updated to do just that.
2022-01-03 10:29:44 -03:30
Hassan Malik
f946c030b5
Choose accounts refactor (#13039)
* added wrapper around account list to prevent storybook from collapsing the list

* updated translation files

* added snap-connect page

* refactored account list out of the choose account component

* fixed width

* removed unnecessary scss from choose-account component, fixed props in choose account story

* removed snaps-connect page, added comments to ChooseAccount

* updated choose account subtitle text, updated styling for title & subtitle, removed redundant account list story

* updated component name, updated paths

* fixed linter errors

* added comments

* removed unused message

* removed selectAccounts key from all locales

* updated class name for account list header, updated allAreSelected function to use length checks

* Revert "removed unused message"

This reverts commit 32771bc83c08f120825ef75f0741f3034e7dbecb.

* Revert "removed selectAccounts key from all locales"

This reverts commit ccfa4a860f9a75693d893d7c404384e719de297e.

* updated locale messages to use selectAccounts key

* removed stray import

* updated scss

* updated translation key

* removed chooseAccounts key from en locale

* removed optional chaining

* changes

* updated subjectMetadata

* updated subject types

* update useOriginMetadata function to include unknown subject type

* updated permission connect header props, removed host and added subjectType to targetSubjectMetadata

* added subjectType to targetSubjectMetadata

* removed console.log

* changed prop name to iconUrl
2021-12-14 18:54:46 -05:00
Alex Donesky
1b6e58c417
Feat/collectibles the return (#12970)
* Wire collectibles frontend UI with controller data
2021-12-13 17:41:10 -06:00
Erik Marks
c03b6dd19b
Subject metadata cleanup (#13090)
This PR fixes some subject metadata-related issues that were missed in #13026.
2021-12-13 12:10:20 -08:00