Skip to content

Persist currentCurrency from state when re-initialising controller#173

Merged
whymarrh merged 4 commits intoMetaMask:developfrom
rickycodes:develop
Nov 3, 2019
Merged

Persist currentCurrency from state when re-initialising controller#173
whymarrh merged 4 commits intoMetaMask:developfrom
rickycodes:develop

Conversation

@rickycodes
Copy link
Contributor

@rickycodes rickycodes commented Nov 1, 2019

re: MetaMask/metamask-extension#6710

re: the pinning, when I installed this I got tsc Version 3.6.4

which resulted in the following:

src/util.ts:113:4 - error TS2322: Type 'any' is not assignable to type 'never'.

113  		normalizedTransaction[key] = NORMALIZERS[key](transaction[key]);
     		~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

builds fine with 3.5.3

@rickycodes rickycodes requested a review from rekmarks November 1, 2019 18:19
@rickycodes
Copy link
Contributor Author

I'm going to add a test case for this in a moment :)

@rickycodes rickycodes changed the title Persist currentCurrency from state when re-instantiating controller Persist currentCurrency from state when re-initialising controller Nov 1, 2019
@codecov-io
Copy link

codecov-io commented Nov 1, 2019

Codecov Report

Merging #173 into develop will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           develop   #173   +/-   ##
======================================
  Coverage      100%   100%           
======================================
  Files           23     23           
  Lines         1498   1499    +1     
  Branches       209    210    +1     
======================================
+ Hits          1498   1499    +1
Impacted Files Coverage Δ
src/assets/CurrencyRateController.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 32465fc...ca75312. Read the comment docs.

Copy link
Contributor

@brunobar79 brunobar79 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also need to regenerate the shrinkwrap file

@brunobar79
Copy link
Contributor

@estebanmino didn’t we fix this on the app side while passing the initial state to the engine?

@danjm
Copy link
Contributor

danjm commented Nov 1, 2019

Looks good to me but I'll wait for Bruno's comments to be addressed before approving.

@rickycodes
Copy link
Contributor Author

rickycodes commented Nov 1, 2019

@brunobar79 I removed the version pinning, which should negate the need to update the yarn.lock and npm-shrinkwrap.json (but the next person coming into this might experience the same build issues?)

Copy link
Contributor

@whymarrh whymarrh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@whymarrh whymarrh merged commit 2ca33d3 into MetaMask:develop Nov 3, 2019
@whymarrh whymarrh mentioned this pull request Nov 5, 2019
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
* BREAKING: Remove support for Node.js 14,15,17,19

* Drop Node.js 20 support due todevDependency eslint-plugin-jest conflicting version range
Mrtenz pushed a commit that referenced this pull request Oct 16, 2025
Bumps [@metamask/utils](https://github.com/MetaMask/utils) from 3.0.3 to 3.4.0.
- [Release notes](https://github.com/MetaMask/utils/releases)
- [Changelog](https://github.com/MetaMask/utils/blob/main/CHANGELOG.md)
- [Commits](MetaMask/utils@v3.0.3...v3.4.0)

---
updated-dependencies:
- dependency-name: "@metamask/utils"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants