* 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
The placeholder for the custom nonce needed to be converted into a
string. The placeholder is omitted if `nextNonce` isn't set, as may be
the case for the initial render.
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.
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.
* 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
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.
* 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
* 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
* ci - install deps - limit install scripts to those needed for build
* Update .circleci/scripts/deps-install.sh
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
* ci - install deps - expand install scripts needed for tests
* ci - install deps - expand install scripts needed for integration tests
* ci - install deps - fix node-sass script ref
* github - set codeowners for scripts/deps-install
* development - add utility to show deps with install scripts
* lint fix
* deps - move read-installed to devDeps
* 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
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.
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.
* Optimize images only during production build
Image optimization is fairly slow (over a minute), and isn't necessary
for test or development builds. It is now only run as part of the
`build` gulp task, which is used during `gulp dist`.
* Remove unused gulp tasks
There were two high-level tasks and one style formatting task that
were not used by any npm scripts, so were probably unused generally.
The `dev` task was a duplcate of `dev:extension`. The `build:extension`
task was useful for just building the extension without performing
other steps required by the final production bundle, but it was
broken. It didn't correctly build the ui-libs and bg-libs required.
Instead of fixing it, it has been removed until the handling of those
separate library bundles is simplified.
The style formatting task seems like it could be useful, but I'm unsure
about keeping it around as opt-in, as in practice it'll just end up
being ignored. Moreover the library authors themselves are recommending
switching to `prettier`, so I think we're better off removing it for
now, then considering using `prettier` if we want to introduce
something like this again.
The stylelint dependency was added because it's a peer dependency of
gulp-stylelint that should have already been listed among our
dependencies. It hadn't caused a problem before because it happened to
be a transitive dependency of gulp-stylefmt, which is no longer needed
and has been removed.
* Use common test build during CI
Previously both e2e test jobs were running `test:build`. Now there is a
separate job that runs `test:build` that runs before each e2e test job,
so that `test:build` is only run once instead of twice.
* Move test builds to separate directory
This prevents the test build from conflicting with the production build
in later jobs.
Any missing messages in the `en` locale are now reported to Sentry as
errors. They are printed to the console as an error upon the first
encounter as well.
If a missing message is found during e2e testing, the error is thrown.
This will likely break the e2e test even if it isn't looking for
console errors, as the UI with the missing message will fail to render.
The `tOrDefault` method was updated to no longer attempt looking for
messages with a key that is a falsey value (e.g. `undefined`). There
are a few places where they key is determined dynamically, where it's
expected during the normal flow for it to be `undefined` sometimes.
In these cases we don't want the error to be thrown.
* Add '--quiet' flag to verify locales script
The `--quiet` flag reduces the console output to just the essential
information for running in a CI environment. For each locale, it will
print the number of unused messages (if any).
* Add `verify-locales` script to lint CI job
The locales are now verified as part of the lint CI job. Any unused
messages detected will result in the job failing.
* 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.
* Remove unused sendWarnings
The send warnings state and associated component is no longer used
anywhere.
* Remove unused subtitleParams
The `subtitleParams` SendHeader prop was being ignored. It has been
removed, along with associated selectors and tests.
A new entry has been added for v7.2.1, and the Brave locales have been
moved from v7.1.1 to v7.2.0. That feature was mistakenly included under
the v7.1.1 heading - it was in fact released in v7.2.0