8000 JSON Keystore wallets by naps62 · Pull Request #185 · ethui/ethui · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

JSON Keystore wallets #185

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 23 commits into from
May 28, 2023
Merged

JSON Keystore wallets #185

merged 23 commits into from
May 28, 2023

Conversation

naps62
Copy link
Member
@naps62 naps62 commented May 23, 2023

Turning Wallet into a trait object, and implementing support for a new type of wallet, decrypted from a JSON keystore file
Since both types of wallets are so different, this should already help create a much better abstraction

Some notable differences:

  • there's not currentPath here. Keystores are not HD Wallets. they have a single address
  • building the signer requires a password
  • decrypting the signer from file + password is expensive. Takes a few seconds actually. So we need to cache the object for some time in memory

Notable code changes:

  • the wallet settings form and zod schema now has some fancy typescript to deal with the multiple types of wallets
  • the "Add wallet" button is now a dropdown menu
  • the cached signer is written using a RwLock for interior mutability. this allows us to still use Wallets::read() when we want to get a signer. Using Wallets::write() would be terrible, since it would block UI updates while the file is being decrypted

image

image

image

@naps62 naps62 marked this pull request as draft May 23, 2023 10:06
@naps62 naps62 mentioned this pull request May 26, 2023
3 tasks
@naps62 naps62 marked this pull request as ready for review May 28, 2023 08:16
@naps62 naps62 merged commit af633ac into main May 28, 2023
@naps62 naps62 deleted the keystore branch May 28, 2023 10:11
CondeGil pushed a commit to CondeGil/iron that referenced this pull request May 29, 2023
@naps62 naps62 added the A-feature A new finished feature label May 30, 2023
@naps62 naps62 added this to the mainnet support milestone Jun 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-feature A new finished feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0