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

3203 Commits

Author SHA1 Message Date
Whymarrh Whitby
6bd87e1f09
Add web3 deprecation warning (#7334)
* Add web3 deprecation warning

* Update web3 deprecation article URL
2019-10-31 21:56:02 -02:30
Filip Š
30606327f0 Add support for ZeroNet (#7038) 2019-10-31 15:37:06 -03:00
Frankie
514be408f8
I#6704 eth_getTransactionByHash will now check metamask's local history for pending transactions (#7327)
* tests - create tests for pending middlewares

* transactions - add r,s,v values to the txMeta to match the JSON rpc response

* network - add new middleware for eth_getTransactionByHash that the checks pending tx's for a response value

* transactions/pending - use getTransactionReceipt for checking if tx is in a block

* meta - file rename
2019-10-30 12:15:54 -10:00
Frankie
51e5220d5e
I#3669 ignore known transactions on first broadcast and continue with normal flow (#7328)
* transactions - ignore known tx errors

* tests - test ignoreing Transaction Failed: known transaction message
2019-10-30 11:40:33 -10:00
Erik Marks
5d843db533
Update eth-json-rpc-filters (#7325)
* update eth-json-rpc-filters

* update gaba
2019-10-29 18:38:00 -07:00
Mark Stacey
8dfb0e8154
Add hostname and extensionId to site metadata (#7218)
If the extension ID is set, an alternate title and subtitle are used
for the Connect Request screen. The title is always `External
Extension`, and the subtitle is `Extension ID: [id]` instead of the
origin (which would just be `[extension-scheme]://[id]` anyway).

The hostname for the site is used as a fallback in case it has no
title.

The artificial hostname set for internal connections has been renamed
from 'MetaMask' to 'metamask' because URL objects automatically
normalize hostnames to be all lower-case, and it was more convenient to
use a URL object so that the parameter would be the same type as used
for an untrusted connection.
2019-10-29 13:14:41 -03:00
ricky
af888d0ab2 Add "Retry" option for failed transactions (#7296)
* Begin mocking out retry ui

* Remove "Failed"

* I guess this works?

* Update corresponding test

* wip

* Ok, this appears to be working now

* cleanup

* Move this back to 3

* I don't think I need this

* Rename showRetry to showSpeedUp

* Address PR feedback

* Remove notes

* Rename shouldShowRetry -> shouldShowSpeedUp

* oops
2019-10-28 10:58:46 -02:30
Erik Marks
478d6563f2
Freeze Promise global on boot (#7309)
* freeze background and UI Promise globals on boot

* add new tests

* remove tape
2019-10-24 06:54:32 -07:00
Sirius Tsou
5f4cce13f0 correct the zh-TW translation (#7306) 2019-10-24 08:49:48 -03:00
Dan Finlay
5c8048fcc1
Merge pull request #7304 from MetaMask/routeTypedSignaturesToKeyrings
Move signTypedData signing out to keyrings
2019-10-23 09:43:57 -07:00
Dan Finlay
25076da9cb
Remove unused dependency 2019-10-23 08:59:20 +09:00
Dan Finlay
3eee9a2458
Linted 2019-10-23 08:47:15 +09:00
Dan Finlay
d26a8e7f82 Allow non strigified typed data params 2019-10-22 14:53:25 -07:00
Dan Finlay
4b4bee77c7 Move signTypedData signing out to keyrings
This simplifies the logic of signing and improves security:
- Private keys are never moved to the base controller.
- Hardware wallets are abstracted in the same way as local keys.

This also paves the way for allowing even more modular accounts,
provided by plugins:
https://github.com/MetaMask/metamask-plugin-beta/pull/63

Fixes #7075.
2019-10-22 11:37:04 -07:00
Dan J Miller
55bc9936c6 Turn off full screen vs popup a/b test (#7298) 2019-10-21 20:59:02 -03:00
MetaMask Bot
6bdf6e07db Version v7.3.1 2019-10-21 23:10:57 +00:00
Dan Miller
51cc2faf56 Turn off full screen vs popup a/b test 2019-10-21 20:38:55 -02:30
MetaMask Bot
a5035d49fc Version v7.3.0 2019-10-21 09:21:27 -03:00
Whymarrh Whitby
06536b1d0f
Fix phishing detect script (#7287) 2019-10-18 13:35:32 -02:30
Thomas Huang
9d9f3685bb Prevent Logout Timer that's longer than a week. (#7253) 2019-10-17 12:25:37 -03:00
Dan J Miller
f1c774d8f3 Handle empty fetch response (#7111) 2019-10-09 11:41:18 -03:00
Mark Stacey
08a7308b04 Merge branch 'master' into develop
* master: (34 commits)
  Update changelog for v7.2.3
  Fix e2e tests and gas default (#7267)
  Do not transate on seed phrases
  test:integration - fix renamed test data file
  lint fix
  test:e2e - fix bail condition
  test:e2e - fix responsie argument
  test:e2e - refactor missed spec file
  test:e2e - only overwrite window.fetch once per session
  test:e2e - rework fetch-mocks
  test:e2e - add extra delay before closing popups
  test:e2e - factor out prepareExtensionForTesting
  test - e2e - dedupe fetchMocking + compose script as fn
  Ensure correct tx category when sending to contracts without tx data (#7252)
  Version v7.2.3
  Add v7.2.2 to changelog
  Update minimum Firefox verison to 56.0 (#7213)
  Version v7.2.2
  Update changelog for v7.2.1, v7.2.0, and v7.1.1
  Add `appName` message to each locale
  ...
2019-10-08 20:26:21 -03:00
Dan J Miller
b884cd573c Ensure correct tx category when sending to contracts without tx data (#7252)
* Ensure correct transaction category when sending to contracts but there is no txParams data

* Update gas when pasting address in send

* Gracefully fall back is send.util/estimateGas when blockGasLimit from background is falsy

* Remove network request frontend fallback for blockGasLimit

* Add some needed slow downs to e2e tests
2019-10-08 14:16:23 -03:00
Dan J Miller
38df64783d Ensure correct tx category when sending to contracts without tx data (#7252)
* Ensure correct transaction category when sending to contracts but there is no txParams data

* Update gas when pasting address in send

* Gracefully fall back is send.util/estimateGas when blockGasLimit from background is falsy

* Remove network request frontend fallback for blockGasLimit

* Add some needed slow downs to e2e tests
2019-10-08 04:29:37 +09:00
MetaMask Bot
f94c3b96ed Version v7.2.3 2019-10-07 16:28:17 -03:00
ryanml
3383eabc9d Use translated string for state log (#7255) 2019-10-07 14:54:44 -03:00
Mark Stacey
1369d0280d Mark 3Box sync as experimental
The initial release of the 3Box sync will be marked as experimental.
This is to allow us time to test the 3Box sync and reduce the load on
3Box's infrastructure.
2019-10-02 17:11:20 -03:00
Mark Stacey
9541d1e281
Don't wait for 3Box initialization during login (#7242)
The 3Box initialization is triggered by login, but it no longer blocks
the login from finishing. The 3Box initialization is designed to run in
the background, so there's no reason to block on it.
2019-10-02 16:12:20 -03:00
Dan J Miller
e6e8897434
Custom nonce fixes (#7240)
* Allow default nextNonce to be the custom nonce in cases where highest locally pending is higher than nextNonce

* Reset custom nonce in cases of transaction submission failures

* Make the recommended nonce in the custom nonce field the true 'nextNonce'

* Revert automatic setting of custom nonce to nextNonce

* Make the nextNonce the default placeholder value

* Fix getNextNonce

* Remove unused nonceFieldPlaceholder message

* Fix nits in getPendingNonce and getNextNonce

* Properly handle errors in getNextNonce

* Improve placeholder and value defaults in custom nonce field

* Remove custom error message from getNextNonce
2019-10-02 15:42:04 -02:30
Thomas Huang
45a8fdebf7 Update ETH logo, update deposit Ether logo height and width (#7239) 2019-10-02 10:15:44 -06:00
Dan J Miller
daf4fe439c Ensure 3box validation uses the correct address (#7235) 2019-10-01 10:03:13 -03:00
Mark Stacey
8d97bdc5c9
Fix error handling when checking for 3Box backup (#7232)
The 3Box SDK throws an HTTP 404 error when attempting to get the config
for an account that doesn't yet exist in 3Box. The regex we were using
to differentiate this error from others was broken. This ended up
preventing the user from logging in if they had 3Box enabled but hadn't
yet synced.

The regex has been corrected to catch this case, while allowing other
errors to propogate upward. Other 3Box errors will now be caught and
reported rather than interrupting login completely.

At some point in the future, we should expose these errors to the user
in some way, and allow them to retry in case 3Box was just temporarily
offline.
2019-10-01 10:01:57 -03:00
Thomas Huang
67ab13b74b Master parity with developer/release (#7225)
* Version v7.2.2

* Add v7.2.2 to changelog
2019-09-27 10:35:38 -06:00
ricky
5f254f7325 Add advanced setting to enable editing nonce on confirmation screens (#7089)
* Add UseNonce toggle

* Get the toggle actually working and dispatching

* Display nonce field on confirmation page

* Remove console.log

* Add placeholder

* Set customNonceValue

* Add nonce key/value to txParams

* remove customNonceValue from component state

* Use translation file and existing CSS class

* Use existing TextField component

* Remove console.log

* Fix lint nits

* Okay this sorta works?

* Move nonce toggle to advanced tab

* Set min to 0

* Wrap value in Number()

* Add customNonceMap

* Update custom nonce translation

* Update styles

* Reset CustomNonce

* Fix lint

* Get tests passing

* Add customNonceValue to defaults

* Fix test

* Fix comments

* Update tests

* Use camel case

* Ensure custom nonce can only be whole number

* Correct font size for custom nonce input

* UX improvements for custom nonce feature

* Fix advanced-tab-component tests for custom nonce changes

* Update title of nonce toggle in settings

* Remove unused locale message

* Cast custom nonce to string in confirm-transaction-base.component

* Handle string conversion and invalid values for custom nonces in handler

* Don't call getNonceLock in tx controller if there is a custom nonce

* Set nonce details for cases where nonce is customized

* Fix incorrectly use value for deciding whether to getnoncelock in approveTransaction

* Default nonceLock to empty object in approveTransaction

* Reapply use on nonceLock in cases where customNonceValue in approveTransaction.

* Show warning message if custom nonce is higher than MetaMask's next nonce

* Fix e2e test failure caused by custom nonce and 3box toggle conflict

* Update nonce warning message to include the suggested nonce

* Handle nextNonce comparison and update logic in lifecycle

* Default nonce field to suggested nonce

* Clear custom nonce on reject or confirm

* Fix bug where nonces are not shown in tx list on self sent transactions

* Ensure custom nonce is reset after tx is created in background

* Convert customNonceValue to number in approve tranasction controller

* Lint fix

* Call getNextNonce after updating custom nonce
2019-09-27 00:30:36 -04:00
Dan J Miller
970e90ea70
Add migration on 3box imports and remove feature flag (#7209)
* Delete unused code

* Run threebox imports through migrations

* Remove 3box feature flag

* Remove unnecessary use of 'type' in threebox._updatePlugin

* Fix threebox controller getLastUpdated

* Turn off threebox by default

* Rename restoredFromThreeBox to showRestorePrompt

* Remove accientally added method from threebox controller

* Restore from threebox on import from unlock screen

* Throw on non 404 errors from Box.getconfig in new3Box
2019-09-26 03:24:52 -04:00
Dan J Miller
1bd22b58c0
Add a/b test for full screen transaction confirmations (#7162)
* Adds ab test controller with a fullScreenVsPopup test

* Add migration for fullScreenVsPopup state

* Move abtest state under an 'abtests' object.

* MetaMask shows fullScreen group of a/b test unapproved txs in a full browser tab

* Ensure cancel metrics event in confirm-transaction-base.component.js is sent in all cases

* Switch to existing tab for unapproved tx if it exists when opening in full screen

* Send metrics event for entering a/b test from confirm screen

* Fix lint, unit and integration tests related to a/b test code

* Remove unnecessary tabs.query call in triggerUiInNewTab
2019-09-24 17:08:38 -04:00
Mark Stacey
288553f300 Update minimum Firefox verison to 56.0 (#7213)
The previous minimum version of 56.2 resulted in the build failing
validation when it was uploaded to the Firefox web store, because that
version doesn't exist. It was set to that version because a Firefox
fork uses it.

Instead the minimum version has been reduced so that we pass
validation. Unfortunately this will mean that a single incompatible
version of Firefox Mobile will allow the extension to be installed
(in theory), but there was no other way to avoid cutting off support
to WaterFox (the Firefox fork). The warning about this from the addons
linter can be ignored for now.
2019-09-24 09:56:41 -06:00
MetaMask Bot
2fc6c50de2 Version v7.2.2 2019-09-24 15:50:32 +00:00
Mark Stacey
0ad6e2ada8
Update minimum Firefox verison to 56.0 (#7213)
The previous minimum version of 56.2 resulted in the build failing
validation when it was uploaded to the Firefox web store, because that
version doesn't exist. It was set to that version because a Firefox
fork uses it.

Instead the minimum version has been reduced so that we pass
validation. Unfortunately this will mean that a single incompatible
version of Firefox Mobile will allow the extension to be installed
(in theory), but there was no other way to avoid cutting off support
to WaterFox (the Firefox fork). The warning about this from the addons
linter can be ignored for now.
2019-09-24 12:49:24 -03:00
kumavis
4d71f3f854 mesh-testing - submit infura rpc requests to mesh-testing container (#7031) 2019-09-23 02:54:41 -07:00
kumavis
f5b2977764
obs-store/local-store should upgrade webextension error to real error (#7207)
* obs-store/local-store should upgrade webextension error to real error

* lint fix

* local-store - allow lastError through unchanged if error-like
2019-09-23 11:45:20 +08:00
Jenny Pollack
e86cebde3b address book entries by chainId (#7205) 2019-09-21 14:36:05 -03:00
Dan Finlay
85cbf8a894
Merge pull request #7173 from rekmarks/fix-errors
Fix RPC error messages
2019-09-19 09:40:11 -07:00
Erik Marks
672ade33a6 add user rejected errors 2019-09-18 19:19:12 -07:00
Erik Marks
58c5fe01bf use eth-json-rpc-errors 2019-09-18 19:17:31 -07:00
Mark Stacey
48bf2f8731
Remove unused locale messages (#7190)
* Switch to using string literals for locale keys

Various message keys were being specified with a string template
instead of a string literal. They have been switched to use string
literals so that the script for detecting unused messages can find
them.

* Remove unused locale messages

A number of unused locale messages have been removed - probably
leftover from old UI elements that have since been removed.

The `verify_locale_strings` script has been augmented to search the UI
for string literals, and match those against the locale message keys in
the `en` locale. Any messages without a corresponding string literal
are assumed to be unused.

The script has also been updated with an optional `--fix` parameter,
which will automatically delete any unused messages from locales.

148 unused messages were found in this case, out of a total of about
650 messages. Another 70 messages are _potentially_ unused and require
further investigation, but weren't as easy to rule out because they
were found in string literals.

* Remove additional unused locale messages

The following messages were more difficult to rule out because they
were present as string literals in the UI. They do appear to be
unused as locale keys though.
2019-09-18 20:29:46 -03:00
Jenny Pollack
03f216e27c add goerli to incoming tx 2019-09-18 10:04:39 -07:00
Sunghee Lee
87ac07bb35 Refactor validation function (#7187)
* Update invalidBlockExplorerURL message

* Refactor validation function
2019-09-18 10:57:18 -03:00
Mark Stacey
c007fcab1a
master => develop (#7182)
* Version v7.1.1

* Version v7.2.0

* Version v7.2.1

* Update changelog for v7.2.1, v7.2.0, and v7.1.1
2019-09-17 19:47:42 -03:00
Sergej Müller
ef7d0192c1 Performance: Delivery optimized images (#7176) 2019-09-17 19:01:48 -03:00