Skip to content

Persist currentCurrency from state when re-initialising controller - #173

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

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

Conversation

@rickycodes

@rickycodesrickycodes commented Nov 1, 2019

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
ContributorAuthor

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

@rickycodesrickycodes changed the title Persist currentCurrency from state when re-instantiating controllerPersist currentCurrency from state when re-initialising controllerNov 1, 2019
@codecov-io

codecov-io commented Nov 1, 2019

Copy link
Copy Markdown

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 FilesCoverage Δ
src/assets/CurrencyRateController.ts100% <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.

Comment threadpackage.json Outdated
Comment threadsrc/assets/CurrencyRateController.ts Outdated

@brunobar79brunobar79 left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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

@danjm

danjm commented Nov 1, 2019

Copy link
Copy Markdown
Contributor

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

@rickycodes

rickycodes commented Nov 1, 2019

Copy link
Copy Markdown
ContributorAuthor

@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?)

@whymarrhwhymarrh left a comment

Copy link
Copy Markdown
Contributor

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:developNov 3, 2019
@whymarrhwhymarrh mentioned this pull request Nov 5, 2019
Merged
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>
Mrtenz pushed a commit to Mrtenz/core that referenced this pull request Jun 17, 2026
---------
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: legobt <6wbvkn0j@anonaddy.me>
Co-authored-by: legobeat <109787230+legobeat@users.noreply.github.com>
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Sign up for freeto 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

@rickycodes@codecov-io@brunobar79@danjm@whymarrh