* Add React and Redux DevTools
* Conditionally load react-devtools
* Add start:dev npm script to run the app with devtools
Co-Authored-By: Mark Stacey <markjstacey@gmail.com>
This package is deprecated, and is incompatible with React v16. It has
been replaced by `react-test-renderer`, which has a drop-in replacement
for `react-addons-css-transition-group`.
Strangely, `react-test-renderer` was already listed as a dependency
despite not being used. I had to downgrade it, as the version already
listed was for React v16, and we're still using React v15.
The `stage-0` Babel preset has been replaced with the specific Babel
plugins that we depend upon. We don't use most of `stage-0`, so this
allowed us to remove many unnecessary transformations. We had to remove
this preset soon anyway, because all of the stage presets are
deprecated in Babel 7.
The `stage-0` preset consisted of these plugins:
```
"transform-do-expressions"
"transform-function-bind"
"transform-class-constructor-call"
"transform-export-extensions"
"transform-class-properties"
"transform-decorators"
"syntax-dynamic-import"
"syntax-trailing-function-commas"
"transform-async-generator-functions"
"transform-async-to-generator"
"transform-exponentiation-operator"
"transform-object-rest-spread"
```
Of that list, only 'transform-class-properties', 'transform-object-
rest-spread', and 'transform-async-to-generator' were being used.
The `disc` gulp command no longer works. I wasn't able to fix this
easily, so instead it has been removed. We can probably find something
better to replace it with.
The integration tests are slow, and rather inconvenient to run in
development on a regular basis (they break if you move the mouse). They
have been removed from the `test` script, to make running `test`
frequently during development less painful.
This silences a warning message that was printed to the console whenever
this module was loaded during tests.
The API changes between these two versions were reviewed carefully for
differences. The only difference made was to `PBKDF2_HMAC_SHA256.bytes`,
which was replaced by `Pbkdf2HmacSha256`.
The length argument no longer has a default value, so it has been set
to match what the default value was in the previous version we used,
which is 32 (the SHA256 hash size).
The flat tests also rely upon these transformations, yet invoke
browserify from the command line rather than using the gulpfile. The
transformations have been specified on the command line for those
instead.
Of course it's not ideal to have the same transformations listed in two
different places, but the plan is to delete the flat tests soon anyway,
so this should suffice until then.
Closes#4538
The source maps generated previously were mapping the bundled files to
the post-Babel files - they weren't showing mapping to the source files
as written.
It looks like this was a result of `reactify` being used in addition to
babel - that transformation must have dropped the source maps.
`reactify` still needs to be listed as a dependency because it is
an unlisted requirement of the `boron` package, which we use. We don't
need to use it to create our bundles though, as Babel already performs
the transformations we need.
The `watch` npm script did not work - it must have gone unused for some
time. The following changes were required for it to work:
* Use the `--watch` flag, rather than the `watch` command (which appears
to not exist)
* Set the `METAMASK_ENV` environment variable to "test"
* Include the tests in the `ui` directory
* require the `test/setup.js` file before running the tests
The reporter was also changed to `min`, which is generally recommended
for use with the `--watch` flag.
* Adds 4byte registry fallback to getMethodData() (#6435)
* Adds fetchWithCache to guard against unnecessary API calls
* Add custom fetch wrapper with abort on timeout
* Use opts and cacheRefreshTime in fetch-with-cache util
* Use custom fetch wrapper with timeout for fetch-with-cache
* Improve contract method data fetching (#6623)
* Remove async call from getTransactionActionKey()
* Stop blocking confirm screen rendering on method data loading, and base screen route on transactionCategory
* Remove use of withMethodData, fix use of knownMethodData, in relation to transaction-list-item.component
* Load data contract method data progressively, making it non-blocking; requires simplifying conf-tx-base lifecycle logic.
* Allow editing of gas price while loading on the confirm screen.
* Fix transactionAction component and its unit tests.
* Fix confirm transaction components for cases of route transitions within metamask.
* Only call toString on id if truthy in getNavigateTxData()
* Fix knownMethodData retrieval and data fetching from fourbyte
The following packages have been removed as I work to figure out what is causing
npm audit to produce errors:
eth-json-rpc-filters
eth-json-rpc-infura
eth-json-rpc-middleware
eth-ledger-bridge-keyring
eth-trezor-keyring
ethereumjs-tx
gaba
These packages will slowly be added back in forthcoming commits.