1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-23 02:10:12 +01:00
Commit Graph

3551 Commits

Author SHA1 Message Date
Erik Marks
8f086087d8 blacklist -> blocklist; whitelist -> safelist 2020-06-08 17:49:36 -07:00
Jenny Pollack
7a4bb7f73a replace blacklist with blocklist 2020-06-08 17:49:23 -07:00
Brad Decker
456684ee7d
move activation logic into token rates controller (#8744) 2020-06-05 13:36:55 -05:00
Mark Stacey
e85b162651
Add MESSAGE_TYPE enum (#8743)
Each "message" requiring a user confirmation has a unique `type`
property. These `type` properties have all been added as enums, and the
enum is now used wherever the literal string was used previously.
2020-06-04 16:22:45 -03:00
Erik Marks
c8a995dd9b
Send accountsChanged notification for wallet_requestPermissions (#8742)
* emit accountsChanged for eth_accounts via wallet_requestPermissions

* add/update tests
2020-06-04 12:15:52 -07:00
Whymarrh Whitby
731efcb36d
Move terms of use strings into localized messages (#8736) 2020-06-04 12:28:21 -02:30
Erik Marks
616a446832
Use URL origin instead of hostname for permission domains (#8717)
* use URL.origin instead of hostname for tabs and permissions
2020-06-01 16:24:27 -07:00
MetaMask Bot
f3d64a1851 Version v8.0.0 2020-06-01 21:40:56 +00:00
Mark Stacey
0187153bef Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop: (689 commits)
  Implement asset page (#8696)
  fix crash on signature request (#8709)
  Fix accounts menu styling (#8707)
  Delete docs/porting_to_new_environment.md (#8704)
  Remove unused `getToErrorObject` parameters (#8705)
  hide connected-status on metamask ext (#8703)
  Stop adding permissions middleware to trusted connections (#8701)
  Use `send` state for send flow token (#8695)
  do not display extension id in connection modal (#8699)
  Fix tab content disappearing during scrolling on macOS Firefox (#8702)
  close details when button is pressed (#8694)
  Refactor token selectors (#8671)
  Update eth_accounts permission description (#8693)
  Extract selected token from token input (#8692)
  Fix propType for Home defaultHomeActiveTabName (#8683)
  Fix create account form styling (#8689)
  Remove unused `getSelectedTokenAssetImage` selector (#8691)
  Remove `getTxParams` (#8676)
  do not show account mismatch alert on details (#8678)
  Fix connect hardware styling (#8680)
  ...
2020-06-01 17:08:41 -03:00
Mark Stacey
9a624dd24c Revert the revert of "LoginPerSite"
This reverts commit 466ece4588, which has
the message:

"Revert "Merge pull request #7599 from MetaMask/Version-v7.7.0" (#7648)"

This effectively re-introduces the changes from the "LoginPerSite" PR.
2020-06-01 16:44:42 -03:00
Mark Stacey
df85ab6e10
Implement asset page (#8696)
A new page has been created for viewing assets. This replaces the old
`selectedToken` state, which previously would augment the home page
to show token-specific information.

The new asset page shows the standard token overview as seen previously
on the home page, plus a history filtered to show just transactions
relevant to that token.

The actions that were available in the old token list menu have been
moved to a "Token Options" menu that mirrors the "Account Options"
menu.

The `selectedTokenAddress` state has been removed, as it is no longer
being used for anything.

`getMetaMetricState` has been renamed to `getBackgroundMetaMetricState`
because its sole purpose is extracting data from the background state
to send metrics from the background. It's not really a selector, but
it was convenient for it to use the same selectors the UI uses to
extract background data, so I left it there for now.

A new Redux store has been added to track state related to browser history.
The most recent "overview" page (i.e. the home page or the asset page) is
currently being tracked, so that actions taken from the asset page can return
the user back to the asset page when the action has finished.
2020-06-01 14:54:32 -03:00
Erik Marks
cf60c8e1f6
Stop adding permissions middleware to trusted connections (#8701)
* don't add permissions middleware to trusted connections

* fix test case
2020-05-29 10:53:31 -07:00
Brad Decker
e481166052
do not display extension id in connection modal (#8699) 2020-05-29 12:12:14 -05:00
Erik Marks
606618ee28
Update eth_accounts permission description (#8693)
* update eth_accounts permission description

* make it easier to find permission name locale message

* handle longer permissions descriptions in UI
2020-05-28 15:53:11 -07:00
Erik Marks
22699cb1d9
Fix connect hardware styling (#8680)
* Connect -> Hardware

* fix connect hardware styling

* rename some components and classes

* make hardware account scrolling sane
2020-05-28 11:47:48 -07:00
Whymarrh Whitby
a75dcae9bb
Merge branch 'develop' into manual-connect 2020-05-28 07:20:26 -02:30
Brad Decker
34fb525ce5
Limit Dapp permissions to primary account (#8653) 2020-05-27 22:35:09 -05:00
Whymarrh Whitby
5b1608681c Manually connect via the full connect flow 2020-05-27 21:45:41 -02:30
Whymarrh Whitby
4802ed1df5
Localize permission descriptions (#8661) 2020-05-27 18:15:10 -02:30
Whymarrh Whitby
67c11a24a8
Fix typo in MetaMaskController (#8660) 2020-05-27 15:27:42 -02:30
Mark Stacey
a6f2156386
Update account options menu design (#8654)
The `AccountDetailsDropdown` component has been rewritten to use the
new `Menu` component, and to follow the latest designs.

This should be functionally equivalent. A couple of the icons have
changed, but that's about it.

Support for a subtitle was added to `MenuItem` to support the `origin`
subtitle used for the explorer link for custom RPC endpoints.

A few adjustments were required to `test/helper.js` to accommodate
the use of `Menu` from a JSDOM context (this is the first time it's
been used in a unit test). A `popover-content` element was added to the
fake DOM, and another global was added that `react-popper` used
internally.

An additional driver method (`clickPoint`) was added to the e2e driver
to allow clicking the background behind the menu to dismiss it. This
wasn't possible using the `clickElement` method, because that method
would refuse to click an obscured element. The only non-obscured
element to click was the menu backdrop, and that didn't work either
because the center was obscured by the menu (Selenium clicks the center
of whichever element is targeted).
2020-05-27 12:31:53 -03:00
Erik Marks
e0b31aa6a4
Restrict the size of the permissions metadata store (#8596)
* refactor add metadata functionality

* create pending site metadata cache

* remove metadata for domains w/o permissions if cache exceeds max size
2020-05-26 14:06:15 -07:00
Brad Decker
706dc02cb4
Implement new transaction list design (#8564)
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-05-26 15:49:11 -05:00
Whymarrh Whitby
835386bf35
Persist home tab state (#8612) 2020-05-25 16:31:28 -02:30
Brad Decker
389df9dd37
warn user when sending from different account (#8601) 2020-05-21 15:21:34 -05:00
Mark Stacey
9e2e353a24
Define global web3 as non-enumerable (#8634)
We inject `web3` globally on most websites. This has been breaking
websites that attempted to serialize the `window` object, because any
attempt to access certain `web3` properties (such as `web3.eth.mining`)
would throw an error. This is because `web3` defined a getter for these
properties that would call `.send([method])`, which doesn't work for
most methods.

An example of a site that this breaks is `Storybook`, when the
`@storybook/addon-actions` addon is being used. When using storybook
with this addon and with the MetaMask extension installed, actions
would not be properly dispatched because an error would be thrown in
the attempt to serialize the event (which includes a reference to the
`window`).

The `web3` global we inject is now defined as non-enumerable, so it
will be skipped automatically in any attempt to serialize the `window`
object.
2020-05-20 20:18:25 -07:00
Brad Decker
ec99cc82b8
Design QA fixes for v8 (#8630) 2020-05-20 15:42:18 -05:00
Erik Marks
f748664638
Cleanup network enums (#8627)
* cleanup & consolidate network enums
2020-05-20 08:57:45 -07:00
Whymarrh Whitby
9c1eae2965
Delete unused util functions (#8622) 2020-05-20 10:36:41 -02:30
Whymarrh Whitby
a03ef1b002
Memoize getEnvironmentType function (#8624)
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-05-20 10:36:18 -02:30
Whymarrh Whitby
97d65b645a
Delete the ABTestController and its state (#8620) 2020-05-19 13:27:06 -02:30
Whymarrh Whitby
cf2d1cf8e5
Delete README.md (#8619) 2020-05-19 00:04:12 -02:30
Whymarrh Whitby
8d19d63521
Bind getApprovedAccounts via nodeify (#8610)
This changeset passes the context for getApprovedAccounts to nodeify instead
of binding the function directly, as is the pattern used elsewhere.
2020-05-18 16:53:46 -02:30
ricky
c413d0905f
Add dev config to login automagically based on dot file (#8598)
* Add dev config to login automagically based on runtime config

Co-authored-by: Erik Marks <rekmarks@protonmail.com>
2020-05-15 12:40:06 -07:00
Whymarrh Whitby
d488c16df5
Add Connected Accounts modal (#8313) 2020-05-15 15:53:52 -03:00
Whymarrh Whitby
320804bb71
Delete unused DisconnectAll modal (#8599) 2020-05-15 15:32:46 -02:30
Henrique Dias
890bc25e28
Support IPNS address translations (#8502)
License: MIT
Signed-off-by: Henrique Dias <hacdias@gmail.com>

Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-05-14 07:56:27 -02:30
Mark Stacey
de02eeefbe
Add default values for preferences (#8584)
Defaults have been added for all three preferences. The default values
added are both falsey, so this shouldn't result in any functional
change. This was done to help make this preferences more easily
discoverable.
2020-05-13 11:53:00 -03:00
Mark Stacey
cfea55c2d7
Increase preferences store max listener count (#8578)
The max listener count of the preferences store has been increased to
12. Recently the 12th listener was added, which resulted in console
warnings during the unit tests - this prevents those warnings.

The default max listener value is 10; we didn't see this warning until
now because one of the twelve listeners is only setup when 3Box is
enabled, which doesn't occur during our unit tests.
2020-05-13 02:26:18 -03:00
Erik Marks
24cbb6fc66
Delete retryTransaction action and background (#8576)
* delete retryTransaction action and background
2020-05-12 16:19:33 -07:00
Erik Marks
0470386326
Delete recent blocks controller (#8575)
* delete recent blocks controller

* delete percentile from direct dependencies
2020-05-12 12:40:33 -07:00
Whymarrh Whitby
3b1794f77b
Switch to @metamask/controllers package (#8560) 2020-05-12 12:30:24 -02:30
Mark Stacey
53ec42d95f
Add switch to connected account alert (#8532)
Add alert suggesting that the user switch to a connected account. This
alert is displayed when the popup is opened over an active tab that is
connected to some account, but not the current selected account. The
user can choose to switch to a connected account, or dismiss the alert.

This alert is only shown once per account switch. So if the user
repeatedly opens the popup on a dapp without switching accounts, it'll
only be shown the first time. The alert also won't be shown if the user
has just dismissed an "Unconnected account" alert on this same dapp
and account, as that would be redundant.

The alert has a "Don't show me this again" checkbox that allows the
user to disable the alert. It can be re-enabled again on the Alerts
settings page.
2020-05-12 10:01:52 -03:00
Oscar Martinez
af0d3e27a8
✏️ Improving translation message in Spanish (#8567)
Co-authored-by: Oscar Martinez <oscar.martinez@avaldigitallabs.com>
2020-05-11 11:14:24 -03:00
Mark Stacey
9c06b07c3c
Synchronously update transaction status (#8563)
All transaction status updates were moved into a `setTimeout` callback
and wrapped in a `try...catch` block in #4131, apparently in an attempt
to prevent failures in event subscribers from interrupting the
transaction logic. The `try...catch` block did accomplish that, but by
putting the status update in a `setTimeout` callback the operation was
made asynchronous.

Transaction status updates now happen unpredictably, in some future
event loop from when they're triggered. This creates a race condition,
where the transaction status update may occur before or after
subsequent state changes. This also introduces a risk of accidentally
undoing a change to the transaction state, as the update made to the
transaction inside the `setTimeout` callback uses a reference to
`txMeta` obtained synchronously before the `setTimeout` call. Any
replacement of the `txMeta` between the `setTxStatus` call and the
execution of the timeout would be erased. Luckily the `txMeta` object
is more often than not mutated rather than replaced, which may explain
why we haven't seen this happen yet.

Everything seems to work correctly with the `setTimeout` call removed,
and now the transaction logic is easier to understand.
2020-05-09 10:46:58 -03:00
Mark Stacey
ee4f05c930
Add missing period to localized message (#8562)
The description for the "Unconnected account" alert has been updated to
include a period at the end of the sentence.
2020-05-08 21:48:21 -03:00
Mark Stacey
c4fb514f3d
Allow disabling alerts (#8550)
The unconnected account alert can now be disabled. A "don't show this
again" checkbox has been added to the alert, which prevents that alert
from being shown in the future.

An alert settings page has been added to the settings as well. This
page allows the user to disable or enable any alert.
2020-05-08 16:45:52 -03:00
Mark Stacey
7e75eb15ef
Delete Balance controller and pending balances calculator (#8542)
This controller was not used. It was used by the
`ComputedBalancesController`, which was removed in #7057 (as it was
also unused).

The pending balances calculator was only used by the balances
controller.
2020-05-06 20:19:28 -03:00
Whymarrh Whitby
a171bbe346
Delete scripts/ README.md file (#8541) 2020-05-06 18:20:53 -02:30
Whymarrh Whitby
8b308884b7
Simplify NetworkController re-export (#8528) 2020-05-05 21:02:44 -02:30
Whymarrh Whitby
ceb5970afd
Remove unused NotificationManager#closePopup (#8530) 2020-05-05 21:02:29 -02:30
Mark Stacey
3d0ffc50f8
Minimize inactive timer resets (#8531)
The inactive timer was being reset upon any change to the preferences
store. The intent was only to update the timer when the auto-lock
timeout had changed, so the subscription was updated to only update in
those cases.

There are no indications that this had any effect upon the user. It
looks like the preferences store never updates while the extension is
unattended, so in practice this may have been harmless. It was still
pointless however. This also protects against the possibility of the
preferences store being updated while unattended at some point in the
future.
2020-05-05 20:30:50 -03:00
Whymarrh Whitby
18b00ed835
Update TransactionController README (#8526) 2020-05-05 20:28:45 -02:30
Whymarrh Whitby
6b5bbe50ee
Delete createDnodeRemoteGetter.js (#8523) 2020-05-05 20:10:07 -02:30
Whymarrh Whitby
f5a125fe61
Move export defaults statements alongside their objects (#8525) 2020-05-05 19:49:38 -02:30
Whymarrh Whitby
de127b86eb
Remove unused ExtensionPlatform#closeWindow fn (#8522) 2020-05-05 19:22:14 -02:30
Whymarrh Whitby
664cac0bd5
Delete window.js (#8521) 2020-05-05 19:11:16 -02:30
Whymarrh Whitby
aac16b7134
Delete sw.js (#8520) 2020-05-05 19:10:56 -02:30
Whymarrh Whitby
ecd36a4ec1
Delete controllers/ README.md file (#8519) 2020-05-05 18:48:52 -02:30
Whymarrh Whitby
c7f866c06f
Add no-tabs ESLint rule (#8518) 2020-05-05 18:35:12 -02:30
Erik Marks
79d9209473
Open notification UI when eth_requestAccounts waits for unlock (#8508) 2020-05-05 07:03:21 -07:00
Dan J Miller
fda4c94670
Design improvements for the Connect flow (#8494)
* Design improvements for the Connect flow

* Make new-account-modal close a button

* Update e2e tests for auto select account on connect flow
2020-05-04 18:10:09 -02:30
Erik Marks
5b06bf795b
Delete amountConversionRate and selectors (#8503) 2020-05-04 10:54:54 -07:00
Mark Stacey
b81558ae8f
Backport "fixed Tohen Typo (#7808)" (#8509)
Backport #7808 to v7.7.9

Co-authored-by: Lenard Frommelt <lenny09918050@googlemail.com>
2020-05-04 13:43:22 -03:00
Brad Decker
eaa9f759f9
Fix connection modal style issues (#8433)
Resolves three different style issues due to overflow of content
and addresses an issue where UI was being squished due to available
screen real estate.

- On the choose account modal, when a user has enough accounts to need
to scroll within the account chooser, the last-connected data column
was squished. This is resolved by using a tooltip and icon for this data
rather than text printed in column.
- On the connection permission result screen where it shows the Dapp icon ->
Metamask icon, the bottom of the logos and dropshadows were being cut off
this was resolved by removing the height set on this element and allowing
it to fill the available space.
- On the confirmation screen the content appeared off center due to the scrollbar being overlayed instead of auto. This was resolved by removing some of the setting of manual overflow controls on the body element.
2020-05-04 12:04:41 -03:00
Erik Marks
786e82791e
Reorganize selectors directory (#8497) 2020-05-02 12:41:17 -07:00
Erik Marks
15958683e5 enable disconnecting single or all accounts 2020-05-01 16:50:26 -07:00
Erik Marks
c7d945e62d disconnectAccount -> disconnectSite; close popover 2020-05-01 16:50:26 -07:00
Whymarrh Whitby
85453a2588
Rework pending tx logic (#8398) 2020-05-01 15:19:29 -02:30
Mark Stacey
5b5b67a985
Fix default gas race condition (#8490)
A race condition exists where after adding an unapproved transaction,
it could be mutated and then replaced when the default gas parameters
are set. This happens because the transaction is added to state and
broadcast before the default gas parameters are set, because
calculating the default gas parameters to use takes some time.
Once they've been calculated, the false assumption was made that the
transaction hadn't changed.

The method responsible for setting the default gas now retrieves an
up-to-date copy of `txMeta`, and conditionally sets the defaults only
if they haven't yet been set.

This race condition was introduced in #2962, though that PR also added
a loading screen that avoided this issue by preventing the user from
interacting with the transaction until after the gas had been
estimated. Unfortunately this loading screen was not carried forward to
the new UI.
2020-05-01 12:25:45 -03:00
Mark Stacey
165666b315
Remove unnecessary tx meta properties (#8489)
* Remove `estimatedGas` property from `txMeta`

The `estimatedGas` property was a cache of the gas value estimated for
a transaction when the default gas limit was set. This property wasn't
used anywhere. It may have been useful for debugging purposes, but the
same gas estimate is already stored on the `history` property so it
should be present in state logs regardless.

* Remove `gasLimitSpecified` txMeta property

The `gasLimitSpecified` property of `txMeta` wasn't used for anything.
It might have been useful for debugging purposes, but whether or not
the gas limit was specified can also be determined from looking at the
transaction history, so it's not a huge loss.

* Remove `gasPriceSpecified` txMeta property

The `gasPriceSpecified` property of `txMeta` wasn't used for anything.
It might have been useful for debugging purposes, but whether or not
the gas price was specified can also be determined from looking at the
transaction history, so it's not a huge loss.

* Remove `simpleSend` txMeta property

The `simpleSend` property of `txMeta` was used to ensure a buffer was
not added to the gas limit during gas estimation for simple send
transactions. It was made redundant by #8484, which accomplishes this
without the use of this property.
2020-05-01 08:44:05 -03:00
Mark Stacey
92592fc905
Ensure tx has value before it's added (#8486)
Previously a transaction would get assigned a default value during the
`addTxGasDefaults` function, after the transaction was added and sent
to the UI.

Instead the transaction is assigned a default value before it gets
added. This flow is simpler to follow, and it avoids the race condition
where the transaction is assigned a value from the UI before this
default is set. In that situation, the UI-assigned value would be
overridden, which is obviously not desired.
2020-04-30 21:50:44 -03:00
Mark Stacey
c2b588975c
Refactor analyzeGasUsage to return results (#8487)
`analyzeGasUsage` now returns the results of the analysis rather than
setting them directly on `txMeta`. The caller is now responsible for
mutating `txMeta` instead. Functionally this should be identical to
before.
2020-04-30 21:44:51 -03:00
Mark Stacey
157cc98c3a
Refactor gas limit estimation when gas limit specified (#8485)
The `analyzeGasUsage` function is skipped entirely now when the gas
limit is specified. This is functionally equivalent to how it worked
before.
2020-04-30 20:53:35 -03:00
Mark Stacey
afa2ff65b7
Refactor simple send gas estimation (#8484)
The simple send gas estimation has been moved out of the gas estimation
module, and into the transaction controller. This was done in an effort
to limit the number of places where `txMeta` is mutated while the
default gas parameters are being set.
2020-04-30 19:50:12 -03:00
Mark Stacey
14d4c107e5
Backport "Don't updatePendingTxs outside of block updates (#8445)" (#8474)
Backport #8445 to v7.7.9. Original commit description:

* Don't updatePendingTxs outside of block updates

Refs #8377

Reverts 507397f6c (#5431)

* Check for new block data on unlock

Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-04-30 11:38:33 -03:00
Brad Decker
0c7269f599
fixes firefox popup location (#8467)
Co-Authored-By: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-04-29 17:04:03 -05:00
Mark Stacey
2d36d422ee
Backport "Updating deprecated Etherscam link (#7464)" (#8463)
Backport #7464 to v7.7.9

Co-authored-by: Alice Henshaw <34962750+alicevhenshaw@users.noreply.github.com>
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-04-29 18:40:34 -03:00
Mark Stacey
aab262a3d1
Backport "Use ethereum-ens-network-map for network support (#7960)" (#8465)
Backport #7960 to v7.7.9

Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-04-29 18:40:20 -03:00
Mark Stacey
f91bd3a08d
Backport "Snapshot txMeta without cloning history (#8363)" (#8458)
Backport #8363 to v7.7.9. Note that this uses `clone` instead of
`cloneDeep`, because `clone` hadn't yet been replaced by `cloneDeep` on
`master`.

Backporting that change as well would have been very disruptive, so
I've updated this to use `clone` instead to minimize conflicts. It is
functionally equivalent.

Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-04-29 16:17:52 -03:00
Whymarrh Whitby
0e54c5aecd
Don't updatePendingTxs outside of block updates (#8445)
* Don't updatePendingTxs outside of block updates

Refs #8377

Reverts 507397f6c (#5431)

* Check for new block data on unlock
2020-04-29 16:01:22 -02:30
Mark Stacey
08fd6cf329
Backport "Update deposit copy for Wyre (#7654)" (#8460)
Backport #7654 to v7.7.9

Co-authored-by: Tyson Malchow <tyson.malchow@gmail.com>
2020-04-29 15:17:29 -03:00
Mark Stacey
53feb20803
Alert user upon switching to unconnected account (#8312)
An alert is now shown when the user switches from an account that is
connected to the active tab to an account that is not connected. The
alert prompts the user to dismiss the alert or connect the account
they're switching to.

The "loading" state is handled by disabling the buttons, and the error
state is handled by displaying a generic error message and disabling
the connect button.

The new reducer for this alert has been created with `createSlice` from
the Redux Toolkit. This utility is recommended by the Redux team, and
represents a new style of writing reducers that I hope we will use more
in the future (or at least something similar). `createSlice` constructs
a reducer, actions, and action creators automatically. The reducer is
constructed using their `createReducer` helper, which uses Immer to
allow directly mutating the state in the reducer but exposing these
changes as immutable.
2020-04-29 14:10:51 -03:00
Mark Stacey
57fdc03dc2
Backport "Delete Dai/Sai migration notification (#8418)" (#8447)
This backports the deletion of the Dai/Sai migration notification
(#8418). Note that the migration to delete the now unused background
state has not been included, as it is non-essential and would have been
more difficult to backport. The migration to delete the unused state
will be included in the next major release instead.
2020-04-29 11:40:08 -03:00
Mark Stacey
8fb615c9f6
Backport "Skip adding history entry for empty txMeta diffs (#8379)" (#8449)
Backport #8379 to v7.7.9
2020-04-29 02:31:45 -03:00
Mark Stacey
2a513990c2
Backport "Fix popup not opening (#8314)" (#8446)
This is a backport of #8314. Here's the original description:

MetaMask would sometimes get into a state where the notification popup
would never open. This could happen if the notification window was
closed shortly after being opened. After this happened, no popups would
show up until after the extension was reset.

This was happening because the background thought the popup was already
open. The variable it uses to track whether the popup was open or not
was being set to `true` immediately after the background asked the
browser to open a new window, before a handler was attached that could
respond to the window being closed.

Removing this line seems to solve the problem.

This line was added originally in #5437, which dealt with batch
transactions. Batches of transactions seem to work just fine without
this line though (from local testing), and I can't think of why this
would be required.

Closes #7051
2020-04-29 01:57:25 -03:00
Erik Marks
c011c0406b
Add new inpage provider package (#8442)
* add @metamask/inpage-provider

* fix failing e2e tests

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-04-28 17:14:51 -07:00
MetaMask Bot
a7911ce9b3 Version v7.7.9 2020-04-28 15:40:28 +00:00
Whymarrh Whitby
306f04be8d
Simplify logic in PTT helper fns (#8430) 2020-04-27 18:38:16 -02:30
Whymarrh Whitby
eb06394dd9
Delete Dai/Sai migration notification (#8418) 2020-04-27 16:23:43 -02:30
Whymarrh Whitby
7439cd1662
Mark PendingTransactionTracker#resubmitPendingTxs as async (#8399) 2020-04-27 13:24:39 -02:30
Whymarrh Whitby
b947fd54c7
Move default exports for all tx classes (#8416) 2020-04-27 12:15:00 -02:30
Whymarrh Whitby
8dd886a25b
Update tx:dropped return value in PendingTxTracker (#8397) 2020-04-26 00:03:25 -02:30
Whymarrh Whitby
d612f9988e
Move default export declaration to Migrator class (#8407) 2020-04-26 00:02:41 -02:30
Mark Stacey
bace02ad02
Remove unused ShapeShift components (#8402)
The `shift-list-item` component for displaying ShapeShift transactions
has been removed, along with three other components that were used
solely by that component (`copyButton`, `eth-balance`, and
`fiat-value`).

This component hasn't been used in some time, as ShapeShift
transactions no longer exist to display. The controller that ShapeShift
transactions originated from was removed in #8118, and it became
impossible to create new ShapeShift transactions from within MetaMask
in #6746
2020-04-24 12:33:24 -03:00
Mark Stacey
a36e6d414b
Remove unused currentAccountTab state (#8404)
This state has been removed from the background. It was used for the
old UI, and has been unused for some time. A migration has been added
to delete this state as well.

The action creator responsible for updating this state has been removed
from the UI as well, along with the `callBackgroundThenUpdateNoSpinner`
convenience function, which was only used for this action.
2020-04-24 00:23:28 -03:00
Mark Stacey
26dcb3af9b
Fix comment on migration #42 (#8405)
The comment was accidentally copied from the previous migration.
2020-04-23 23:08:50 -03:00
Mark Stacey
cc41dee92c
Remove leftover references to Coinbase (#8403)
Coinbase was removed as a deposit option some time ago.
2020-04-23 20:32:15 -03:00
Mark Stacey
24a8689090
Remove unused addNewKeyring action (#8400)
Keyrings are added either through the `getKeyringForDevice` background
method (as part of the hardware wallet connect flow), or via
`importAccountWithStrategy` (when importing an account). The
`addNewKeyring` action and corresponding background method has not been
used in a long time.
2020-04-23 20:31:59 -03:00
Whymarrh Whitby
91a75b2417
Add new PendingTransactionTracker tests (#8384)
Co-authored-by: Jenny Pollack <jennypollack3@gmail.com>
2020-04-23 13:19:04 -02:30