MetaMask / MetaMask/eth-ledger-bridge-keyring

Elaborate Serializing and Deserializing of Data

Open
#161 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
84
Forks
122
PR merge metrics
No merged PRs in 30d

Description

Some improvements can be made to the serializing and deserializing of data:

- `this.hdk` can/should be serialised and deserialised
- Only the `publicKey` and `chainCode` needs to serialised/deserialised
- Setting `this.hdKey` can be refactored via a `setHdKey` method
- `this.page` and `this.unlockedAccount` should be included in data serialization
- `this.hdPath` can be changed via deserialization without triggering the `this.setHdPath` method
- `implementFullBIP44` is incorrectly serialised
- Should be `implementFullBIP44: this.implementFullBIP44` instead of `implemntFullBIP44: false`
- Some "resetting" of data can be refactored (i.e., see `forgetDevice`, `setHdPath` and the `constructor`)
- Some refactoring for filtering `this.accounts` can be done
- `this.bridgeUrl` can be changed via deserialisation without updating the `iframe` URL
- This should either be only settable via `init`, or should trigger `iframe` deletion and recreation (less desireable)

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the constructor, serialization and deserialization paths, then inspect forgetDevice, setHdPath, init, and the iframe handling mentioned in the issue. Verify that the listed state fields round-trip correctly, the implementFullBIP44 key is preserved, account filtering is consistent, and bridgeUrl changes follow the chosen lifecycle behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
security
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.