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

3551 Commits

Author SHA1 Message Date
MetaMask Bot
03bbd400d9 Version v8.0.1 2020-07-02 21:52:50 -03:00
Mark Stacey
b25f4bbe4a
Prevent manually connecting to extension UI (#8893)
The `activeTab.id` property is relied upon in the connected sites modal
to prevent the user from manually connecting to the MetaMask extension
itself. Unfortunately the `id` property was never set.

`id` is now set on the `activeTab` state, so manually connecting to the
extension UI is now impossible.
2020-07-02 18:26:45 -03:00
Mark Stacey
a294ca7125
Set empty active tab if origin is invalid (#8890)
The `activeTab` state is now set to an empty object if the `origin` of
the active tab is missing or invalid. It can be invalid if the URL
passed to the `URL` constructor is missing a scheme (e.g.
`about: blank`).

There are currently no cases where the rest of the data in `activeTab`
is useful in the absence of an `origin`. This will make upcoming UI
logic changes a bit simpler than they would be otherwise. Now we can
assume that if any property is set on `activeTab`, it must have a valid
`origin`.
2020-07-02 18:01:04 -03:00
Thomas Huang
259d19850f
Account for a custom nonce of zero (#8883)
* Account for a custom nonce of zero
* Remove default value for customNonceValue
2020-07-02 12:58:12 -07:00
Mark Stacey
7ac0014de8 Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop:
  feature/sync imported accounts with mobile (#8631)
  Fix account order on unconnected account alert (#8863)
2020-06-25 22:48:20 -03:00
Esteban Miño
73257b1cd1
feature/sync imported accounts with mobile (#8631)
* sync imported accounts

* Update app/scripts/metamask-controller.js

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

* exportAccounts action

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-25 22:04:17 -03:00
Mark Stacey
b34dbe9ae1 Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop:
  Restore list item title attributes (#8858)
  Fix mobile sync redirect (#8860)
  Align copy tooltip text and icon (#8861)
  Update inpage provider, deprecation warnings (#8854)
  Update test-dapp (#8856)
  Return after 'reject' in Promise constructor (#8857)
  Replace removed 'copy-to-clipboard' icon (#8853)
  Stop upper-casing exported private key (#8850)
2020-06-24 19:42:34 -03:00
Erik Marks
242db43700
Update inpage provider, deprecation warnings (#8854) 2020-06-24 15:21:57 -07:00
Mark Stacey
828ec0530a
Return after 'reject' in Promise constructor (#8857)
There were three cases where execution unintentionally continued after
an error was encountered. These cases likely are impossible to
encounter in practice due to recent validation improvements in the
`eth-json-rpc-middleware/wallet` module, but they were broken
nonetheless.

Execution inside the Promise constructor now halts immediately after
`reject` is called.
2020-06-24 16:38:53 -03:00
Mark Stacey
cee773e1b5 Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop:
  Fix signing method bugs (#8833)
  replace icons with Checkbox component (#8830)
  Use gulp-cli@2.3.0 (#8845)
  Use node-sass@4.14.1 (#8844)
  Call getMethodDataAsync when knownMethodData[fourBytePrefix] object is empty (#8836)
  Update connected status popover content (#8834)
  Use @metamask/controllers@2.0.1 (#8832)
  ParseInt nextworkNextNonce correction (#8827)
  Fix first time onboarding popup position (#8829)
  fix overflowing contract names and origins (#8823)
  Hide 'Expand view' button in fullscreen (#8826)
2020-06-23 13:13:52 -03:00
Erik Marks
04de9a92c5
Fix signing method bugs (#8833)
* update signTypedData validation

* update tests for new eth-json-rpc-middleware

* remove lowercasing of tx 'from' addresses
2020-06-23 09:12:11 -07:00
Erik Marks
b090625dc1
Update connected status popover content (#8834)
* update connected status popover content

* update highlight styling
2020-06-21 14:00:06 -07:00
Thomas Huang
753a3eb4c9
ParseInt nextworkNextNonce correction (#8827)
* networkNextNonce toNumber

* nonceBN for all getTransactionCount

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-17 14:13:33 -07:00
Mark Stacey
d730c28cd9 Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop:
  Use error.value.message with error.message as fallback (#8825)
  Fix dropped tx detection (#8824)
  delete targetDomainMetadata selector
  remove top/bottom margin on info icon (#8822)
  add send token button on fullscreen asset list (#8812)
  fix getTargetDomainMetadata selector
  select current address in permissions connect (#8811)
  Fix encrypt/decrypt beforeunload bugs (#8816)
2020-06-17 00:30:42 -03:00
Thomas Huang
792366a20f
Use error.value.message with error.message as fallback (#8825)
* Use  over the whole stringified error object which doesn't show the actual error message that is set as the

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
* Feedback commit
2020-06-16 16:21:56 -07:00
Mark Stacey
3b2bbe0705
Fix dropped tx detection (#8824)
The code for checking whether a transaction was dropped or not was
refactored in #8398, but in the process an off-by-one error was
introduced.

The old version of `_checkIfTxWasDropped` would query for an updated
transaction count from the network, and would consider the pending
transaction to be dropped if the count was above the nonce. However,
the version introduced in #8398 considers the transaction to be dropped
if the count is above *or equal to* the nonce.

The pending transaction nonce is expected to be equal to the
transaction count, because the nonce starts at zero. The transaction
count is equal to the expected next nonce.

The variable name has been updated to make this more clear
(`networkNextNonce` is how the `nonce-tracker` refers to this value).

`parseInt` is now called with an explicit radix of `16` as well, to
ensure both nonce strings are always parsed as hex. In all cases I am
aware of, these nonce strings were prefixed by `0x`, meaning that
`parseInt` would default to a radix of `16`, so this likely doesn't
constitute a functional change.

Fixes #8688
2020-06-16 18:05:48 -03:00
Erik Marks
0813cc5c88
Fix encrypt/decrypt beforeunload bugs (#8816) 2020-06-16 07:40:00 -07:00
Mark Stacey
584ff9ec8a Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop: (58 commits)
  Fix site icon fallback letter (#8815)
  add hover style to list-item (#8813)
  Fix site icon size (#8814)
  Consolidate connected account alerts (#8802)
  lowercase web3
  Use markdown-to-jsx@6.11.4 (#8809)
  Update app/_locales/en/messages.json
  Update app/_locales/en/messages.json
  also remove 'dapp' from descriptions
  remove all user-facing instances of 'dapp'
  update button styling on home/asset page (#8800)
  Fix handling of permissions of removed accounts (#8803)
  Clear permssions during createNewVaultAndRestore (#8804)
  Hide token transfers on ETH asset page (#8799)
  Fix account name editing (#8801)
  Fix connect flow account list height (#8798)
  Update color of menu item icons (#8797)
  Update "Connected accounts" empty description (#8796)
  Stop reporting failed transactions to Sentry (#8795)
  Omit state snapshot from Sentry errors (#8794)
  ...
2020-06-16 10:03:14 -03:00
Erik Marks
c391291f43
Merge branch 'develop' into remove-the-word-dapp 2020-06-15 12:11:10 -07:00
Erik Marks
4dfe4e7463
Consolidate connected account alerts (#8802)
* update connected accounts appearance

* consolidate account alerts

* UnconnectedAccountAlert: use ConnectedAccountsList

* move switch account action out of menu in all views

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-15 12:08:53 -07:00
Erik Marks
a48ec51c36 lowercase web3 2020-06-15 11:54:51 -07:00
Erik Marks
7f47eb53ed
Update app/_locales/en/messages.json
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-06-15 11:38:57 -07:00
Erik Marks
22679622f5
Update app/_locales/en/messages.json
Co-authored-by: Whymarrh Whitby <whymarrh.whitby@gmail.com>
2020-06-15 11:38:51 -07:00
Erik Marks
b1fd1e5bde also remove 'dapp' from descriptions 2020-06-15 11:35:15 -07:00
Erik Marks
fc7930f6bc remove all user-facing instances of 'dapp' 2020-06-15 11:30:56 -07:00
Brad Decker
955625278b
update button styling on home/asset page (#8800) 2020-06-15 12:02:38 -05:00
Mark Stacey
6ca18c3573
Fix handling of permissions of removed accounts (#8803)
Imported accounts can be removed, but the permissions controller is not
informed when this happens. Permissions are now removed as part of the
account removal process.

Additionally, the `getPermittedIdentitiesForCurrentTab` selector now
filters out any non-existent accounts, in case a render occurs in the
middle of an account removal.

This was resulting in a render crash upon opening the popup on a site
that was connected to the removed account.
2020-06-15 10:27:27 -03:00
Thomas Huang
d9a4c60d99
Clear permssions during createNewVaultAndRestore (#8804)
One possible solution to #8787.
2020-06-13 18:42:39 -07:00
Mark Stacey
53769a7b3a
Update color of menu item icons (#8797)
Menu item icons are now grey instead of black, as requested in design
QA feedback.
2020-06-12 17:09:47 -03:00
Mark Stacey
8a7e376930
Update "Connected accounts" empty description (#8796)
The copy has been updated to use the term "Web3 site" instead of
"decentralized site".
2020-06-12 12:52:53 -07:00
Mark Stacey
1fb15a52bb
Stop reporting failed transactions to Sentry (#8795)
These error reports are not useful.
2020-06-12 16:41:57 -03:00
Mark Stacey
37da64aa7e
Omit state snapshot from Sentry errors (#8794)
The state snapshot we were attaching to Sentry errors was too large.
As a temporary solution, it has been removed completely. We can re-add
it later after reducing its size.
2020-06-12 16:13:14 -03:00
Brad Decker
2f50e9fd72
Restore timing function (#8774)
* restore and enhance the time est feature

background: we had a feature for showing a time estimate on pending txs
that was accidently removed during the redesign implementation. This PR
restores that feature and also enhances it:
1. Displays the time estimate on all views instead of just fullscreen
2. Uses Intl.RelativeTimeFormat to format the time
3. Adds a way to toggle the feature flag.
4. Uses a hook to calculate the time remaining instead of a component

* Update app/_locales/en/messages.json

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

* do not display on test nets

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-12 13:46:01 -05:00
Erik Marks
5aabe2ac75
Warn users to only add custom networks that they trust (#8789)
* add warning when adding custom network

* give the settings subheader breathing space
2020-06-12 11:21:29 -07:00
Erik Marks
1323233cfa
Make permission approval redirect flow consistent (#8755)
* make redirect flow consistent

* remove cancel redirect

* extract redirect component into own file
2020-06-12 09:38:20 -07:00
Brad Decker
73ba992125
use UI button for add token functionality (#8781) 2020-06-12 11:22:00 -05:00
Mark Stacey
4ac4790cfa
Rename 'History' tab to 'Activity' (#8785)
'Activity' is a better name for this tab because it contains more than
just transactions. Signature requests are also included, and more non-
transaction activity may be included in the future.
2020-06-11 17:14:07 -03:00
Mark Stacey
058c63cf80
Use localized tab names on Home screen (#8784)
The tab names on the Home screen are now localized messages, rather
than being hard-coded as English.
2020-06-11 15:19:13 -03:00
ricky
71e7966b6a
Update Seed Phrase Functionality on Account Import (#8730)
Update seed phrase functionality to be able to conceal seed phrase (as a password field) so it remains hidden on screen.
2020-06-11 10:24:13 -04:00
Victor Baranov
d0a28087dc
Remove 2nd parameter from the call of estimateTxGas (#8783) 2020-06-11 10:16:50 -02:30
Erik Marks
8b649ddeb9 verify-locales:fix 2020-06-10 17:51:22 -07:00
Erik Marks
00a792e191 fix locale messages 2020-06-10 16:44:10 -07:00
Brad Decker
a4e5fc934d
restore status tooltip (#8745)
initially set out to add the failed tooltip back to the transaction list, but
in the process rediscovered the transaction-status component which illuminated
a fair number of statuses that were not properly handled by the refactor of the
list. These statuses were discussed with UX and engineering team members to come
up with a definitive list of statuses that should be reflected in the UI

Changes:
1. normalized the color of status labels to use Red-500 and Orange-500 where applicable
2. added a new color of icon for pending transactions -- grey
3. added support for dropped and rejected labels
4. failed, dropped, rejected and cancelled all have red icons now.
5. cancelled transactions will reflect a change in the user's balance
6. tooltip displayed for failed transactions
7. Icon logic isolated to a new component.
2020-06-10 15:38:34 -05:00
Mark Stacey
1f8a7a72c9
Fix TokenRatesController (#8780)
The `TokenRatesController` was accidentally broken in #8744, when the
logic for starting and stopping polling was moved from the `isActive`
property to start/stop functions.

A reference to the now-obsolete `isActive` property was accidentally
left behind, resulting in no exchange rate updates.
2020-06-10 16:53:37 -03:00
Whymarrh Whitby
87c2c81da7
Remove some unused state keys (#8776)
* Remove unused networkEndpointType state key

* Remove unused coinOptions state key
2020-06-10 14:51:12 -02:30
Mark Stacey
3604c3519c Merge remote-tracking branch 'origin/develop' into Version-v8.0.0
* origin/develop: (35 commits)
  Delete unused InfuraController & tests (#8773)
  Permissions: Do not display HTTP/HTTPS URL schemes for unique hosts (#8768)
  Refactor confirm approve page (#8757)
  blocklisted -> blocked
  Update app/scripts/contentscript.js
  blacklist -> blocklist; whitelist -> safelist
  replace blacklist with blocklist
  Delete unused transaction history test state (#8769)
  fix-formatting-of-gif (#8767)
  Order accounts on connect page (#8762)
  add gif for loading dev build (#8766)
  Bump websocket-extensions from 0.1.3 to 0.1.4 (#8759)
  Fix prop type mismatch (#8754)
  use grid template to position list item (#8753)
  Fix account menu entry for imported accounts (#8747)
  Fix permissions connect close and redirect behavior (#8751)
  Refactor `TokenBalance` component (#8752)
  Fix 'Remove account' in Account Options menu (#8748)
  move activation logic into token rates controller (#8744)
  asset outdated warning inline on full screen (#8734)
  ...
2020-06-10 13:01:40 -03:00
Whymarrh Whitby
f4c255b7c7
Delete unused InfuraController & tests (#8773) 2020-06-10 11:44:04 -02:30
Erik Marks
a84eedb7da
Permissions: Do not display HTTP/HTTPS URL schemes for unique hosts (#8768)
* only show URL.host in connected-accounts component

* strip scheme from URL for unique hosts

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-09 13:56:24 -07:00
Erik Marks
56004db8bf blocklisted -> blocked 2020-06-08 17:57:59 -07:00
Jenny Pollack
1089ebcf53 Update app/scripts/contentscript.js
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
2020-06-08 17:49:36 -07:00