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

11296 Commits

Author SHA1 Message Date
Whymarrh Whitby
b89c8fec13
Fix version used by TransactionController#confirmTransaction (#9503) 2020-10-07 14:27:39 -07:00
Dan J Miller
392f9eafc2
Stop passing a gas param to the estimateGas call initiated in the swaps controller (#9501)
* Stop passing a gas param to the estimateGas call initiated in the swaps controller timedoutGasReturn

* Stop passing gas params to timedoutGasReturn

* Lint fix

* Stop passing no longer used param to setInitialGasEstimate
2020-10-07 16:30:17 -02:30
Whymarrh Whitby
baa2350604
Skip running e2e tests when commit is tagged with '[skip e2e]' (#9486)
[skip e2e]
2020-10-07 15:12:52 -02:30
Mark Stacey
17f7ca2cfe
Update address book state upon custom RPC chainId edit (#9493)
When the `chainId` for a custom RPC endpoint is edited, we now migrate
the corresponding address book entries to ensure they are not orphaned.

The address book entries are grouped by the `metamask.network` state,
which unfortunately was sometimes the `chainId`, and sometimes the
`networkId`. It was always the `networkId` for built-in Infura
networks, but for custom RPC endpoints it would be set to the user-set
`chainId` field, with a fallback to the `networkId` of the network.

A recent change will force users to enter valid `chainId`s on all
custom networks, which will be normalized to be hex-prefixed. As a
result, address book contacts will now be keyed by a different string.
The contact entries are now migrated when this edit takes place.

There are some edge cases where two separate entries share the same set
of contacts. For example, if two entries have the same `chainId`, or if
they had the same `networkId` and had no `chainId` set. When the
`chainId` is edited in such cases, the contacts are duplicated on both
networks. This is the best we can do, as we don't have any way to know
which network the contacts _should_ be on.

The `typed-message-manager` unit tests have also been updated as part
of this commit because the addition of `sinon.restore()` to the
preferences controller tests ended up clearing a test object in-between
individual tests in that file. The test object is now re-constructed
before each individual test.
2020-10-07 15:02:17 -02:30
Dan J Miller
7a28783924
Prevent user from submitting swap if they do not have enough for the max gas fee (#9500) 2020-10-07 09:55:38 -07:00
Mark Stacey
b98b0b6d01
Fix missing app header on Home screen (#9498)
The app header would sometimes mistakenly not get rendered while on the
Home screen. This could happen when a permission request was made while
the UI was open, to either the browser action popup or the fullscreen
UI.

This was caused by faulty logic in the top-level router component. It
would hide the app header if there was a pending permission request,
presumably because the author assumed that a redirect to the permission
flow would shortly follow. This redirect only happens on mount though,
not if the UI was already open when the permission request was
submitted.

The intent of this logic was to hide a brief flash of the app header
prior to rendering the permission flow. This brief flash has now been
restored, which is unfortunate, but is better than the missing app
header bug. We can revisit a solution to removing this flash in the
future, hopefully in a manner that avoids this bug and works for all
notification UI cases.
2020-10-07 14:15:39 -02:30
Brad Decker
9230d75ab0
pass entire tokenData object to getTokenAddressParam (#9499) 2020-10-07 11:40:39 -05:00
Mark Stacey
d1e8f5db86
Prevent redirecting to swaps in notification (#9497)
If a notification popup was opened while the user was partway through
the swaps flow, the notification would display the swaps flow instead
of whatever action triggered the popup (e.g. a connect request or a
confirmation). This is confusing and potentially dangerous, as the
user might mistakenly think the swap was triggered by a dapp.

The swap redirects are now prevented in the notification UI. The user
will still be redirected to an in-progress swap flow if they open the
browser action popup or the fullscreen UI, but not on the notification
popup that is triggered by dapp actions.
2020-10-07 13:49:47 -02:30
Erik Marks
bf1bb6ca7e
Check specified chain ID against endpoint return value (#9491)
Adds additional validation to chainId values in the network form, by comparing the specified value against the value returned by the endpoint.
2020-10-07 11:58:22 -02:30
Mark Stacey
e8774f615d
Fix unbound function in swaps controller (#9496)
The `_fetchAndSetSwapsLiveness` was accidentally passed to
`setInterval` without being bound first, so the `this` reference was
not defined when it was called. It is now bound before being passed to
`setInterval`.
2020-10-06 20:03:59 -07:00
Brad Decker
1ba4061f46
format quotes consistently on main-view and list-view (#9495) 2020-10-06 22:07:38 -02:30
Dan J Miller
534ac25a93
Ensure gas costs are accounted for when calculating the amount of eth received in a swap (#9494) 2020-10-06 21:38:09 -02:30
Erik Marks
46bcba2d63
Fix IconButton prop type (#9489)
* Fix IconButton prop type
2020-10-06 14:09:12 -07:00
Erik Marks
39d5bb73a7
Remove setSpecialRpc functionality (#9490) 2020-10-06 14:06:41 -07:00
Erik Marks
6a6600c730
Use networkVersion for network state; chainId for signing transactions (#9487) 2020-10-06 17:48:24 -02:30
Dan J Miller
1062e2a97d
Fix SwapsController handling of insufficient balance for gas when in max ETH mode 2020-10-06 17:47:58 -02:30
Dan J Miller
94810ce9c9
Compare the networkId against the correct enum in eth and token overview components (#9485) 2020-10-06 17:34:53 -02:30
Whymarrh Whitby
dd3c2cc3ec
Fix create_release_pull_request build step (#9484) 2020-10-06 16:39:53 -02:30
Dan J Miller
30d13422b5
Add MetaMask Swaps (#9482) 2020-10-06 15:58:38 -02:30
Whymarrh Whitby
92314cc3ed
Format manifest file after applying new version (#9480) 2020-10-06 15:27:59 -02:30
Erik Marks
088d4c34f1
Merge pull request from GHSA-c2xw-px2x-pr65
* Remove network config store
* Remove inline networks variable in network controller
* Re-key network controller 'rpcTarget' to 'rpcUrl'
* Require chainId in lookupNetwork, implement eth_chainId
* Require chain ID in network form
* Add alert, migrations, and tests
* Add chainId validation to addToFrequentRpcList
* Update public config state selector to match new network controller
state
* Use network enums in networks-tab.constants
* Ensure chainId in provider config is current
* Update tests
2020-10-06 15:27:02 -02:30
Whymarrh Whitby
8f3b81f67a
Use node-forge@0.10.0 (#9473)
This change updates `node-forge` to the latest published version, 0.10.0. This
update resolves a security advisory [1] brought in via our `3box` dependency.

  [1]:https://www.npmjs.com/advisories/1561
2020-10-01 16:37:07 -02:30
Patryk Łucka
f6d0deb80b
Fix 3Box sync and e2e tests (#9422)
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-09-29 14:17:55 -02:30
ricky
b00cd344d9
Use ethers to validate mnemonic during import (#9463) 2020-09-28 18:43:42 -02:30
Brad Decker
b3d3518bc0
Remove unnecessary functions (#9458)
Removes unnecessary functions with minor code changes to support extraction
2020-09-24 11:42:56 -05:00
Erik Marks
48e2880731
rpc-cap@3.2.0 (#9461) 2020-09-24 08:33:48 -07:00
Erik Marks
60d4b6aa41
@metamask/controllers@3.1.0 (#9460) 2020-09-23 13:24:24 -07:00
Brad Decker
e75bfc4dbc
remove-unused-component (#9457) 2020-09-23 13:11:22 -05:00
Mark Stacey
97b49b7614
Add prettier-plugin-sort-json (#9450)
JSON files are now sorted by key with `prettier`, using the plugin
`prettier-plugin-sort-json`. This does not affect `package.json`
because `prettier` uses a special parser for that file, as it has
a more restrictive format than JSON.
2020-09-23 12:21:42 -02:30
Erik Marks
3f2a7fd6ac
eth-json-rpc-filters@4.2.1 (#9452) 2020-09-22 21:55:59 -07:00
Erik Marks
242a5b3f23
eth-json-rpc-infura@5.1.0 (#9451) 2020-09-22 20:46:02 -07:00
Erik Marks
6b81da2a73
json-rpc-engine@5.3.0 (#9449) 2020-09-22 19:03:26 -07:00
Erik Marks
2eb8a9aca9
eth-json-rpc-middleware@6.0.0 (#9448) 2020-09-22 19:03:12 -07:00
Whymarrh Whitby
4a5a8e40aa
Use the latest ShellCheck (#9446) 2020-09-21 17:38:15 -02:30
Erik Marks
1b00062649
Refactor method middleware (#9436)
* Refactor method middleware

* Vastly improve comments
2020-09-18 11:55:05 -07:00
Brad Decker
37cbeb56a3
make gas edit tooltips use Tooltip (#9434) 2020-09-17 17:05:31 -05:00
Thomas Huang
ee6e986f59
Fix dismiss button css on unconnected alert modal (#9430)
* Fix dismiss button on unconnected alert modal

Set button type to primary, rounded, and set `!important` on css class width

* Update ui/app/components/app/alerts/unconnected-account-alert/unconnected-account-alert.scss

* Add unconnected-account-alert to popover component classname to simplify css selector.

Co-authored-by: Brad Decker <git@braddecker.dev>
2020-09-17 13:23:37 -07:00
Erik Marks
550e49a64c
Gas modal styling fixes (#9433) 2020-09-17 13:02:00 -07:00
Brad Decker
c6a540419c
fix styles on tx detail popover buttons (#9432) 2020-09-17 12:12:42 -05:00
Brad Decker
f4a2a09713
increase specifity of button style overrides on notifications (#9427) 2020-09-17 09:08:02 -05:00
Whymarrh Whitby
feeacc580d
Merge pull request #9429 from MetaMask/sync-master
Sync `master` with `develop`
2020-09-16 19:37:20 -02:30
Whymarrh Whitby
3eda318984 Merge 'sync-master' and 'develop' 2020-09-16 19:14:16 -02:30
Whymarrh Whitby
cca64ae982
Merge pull request #9425 from MetaMask/Version-v8.0.10
Version v8.0.10 RC
2020-09-16 18:21:27 -02:30
Whymarrh Whitby
650c84e5e2
Update CHANGELOG.md 2020-09-16 17:56:42 -02:30
Brad Decker
1123adcb1d
fix overflow issue on approval container (#9415) 2020-09-16 15:18:39 -05:00
Whymarrh Whitby
bffa035bc7
Add MetaMask Bot to the CLA allow list (#9426) 2020-09-16 17:42:16 -02:30
Whymarrh Whitby
0263ac3067 Use eth-phishing-detect@1.1.14 (#9423) 2020-09-16 17:24:08 -02:30
Whymarrh Whitby
c3ece93a43 Use @metamask/controllers@3.0.1 (#9416) 2020-09-16 17:24:08 -02:30
dependabot[bot]
7a9eee28a1 Bump node-fetch from 2.6.0 to 2.6.1 (#9399)
Bumps [node-fetch](https://github.com/bitinn/node-fetch) from 2.6.0 to 2.6.1.
- [Release notes](https://github.com/bitinn/node-fetch/releases)
- [Changelog](https://github.com/node-fetch/node-fetch/blob/master/docs/CHANGELOG.md)
- [Commits](https://github.com/bitinn/node-fetch/compare/v2.6.0...v2.6.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-09-16 17:24:08 -02:30
Whymarrh Whitby
8443ee5416 Use bl@3.0.1, dedupe bl@1.x (#9375) 2020-09-16 17:24:08 -02:30