-
Notifications
You must be signed in to change notification settings - Fork 492
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
Jade wallet implement #12041
Jade wallet implement #12041
Conversation
In the future, if the hardwarewallet fimware is changes, we can check the the path format to what comes from hwi.
I needed to spoil hwi commands data and changed the long lined "if" statement to switch
I have Jade somewhere at home, will try to find it and test. |
1- Is done already. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cACK, code LGTM.
I run TrezorTKataAsync
and tested using Trezor T.
You probably should add this to WalletDirTests.GetFriendlyNameTest
:
Assert.Equal("Jade", HardwareWalletModels.Jade.FriendlyName());
I started the Wasabi wallet and was able to add it as a wallet.
Did you send a transaction using Jade?
I have Jade somewhere at home, will try to find it and test.
@kristapsk Can you also run this test JadeKataAsync
?
Yes, hope so (need to find device), ETA - before end of this week. |
fixes #11908 ? |
Yes, i tried to added to main net and testnet too with successfully. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Easy PR, if it's tested and it works then merging is pretty trivial.
It's a shame tho that the implementation is not more generic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not that much familiar with HWI stuff. So just a few comments.
HwiEnumerateEntry entry = Assert.Single(enumerate); | ||
Assert.NotNull(entry.Path); | ||
Assert.Equal(HardwareWalletModels.Jade, entry.Model); | ||
Assert.True(HwiParser.ValidatePathString(entry.Model, entry.Path)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a bit confused: So there is this new ValidatePathString
method but it's used only for Jade but not for others. Why is it not used for other HW models if the method supports other models?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR focus on Jade wallet, after if this PR is merged I will start to extend with new tests the current HWI Wallet tests and then i will put there the new parse method to the right places.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Kimi <58662979+kiminuo@users.noreply.github.com>
Co-authored-by: Kimi <58662979+kiminuo@users.noreply.github.com>
Co-authored-by: Kimi <58662979+kiminuo@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
/// <param name="path">The wallet path which come from HWI enumerate command.</param> | ||
/// <param name="model">The hardware wallet model.</param> | ||
/// <returns><c>true</c> if the path matches the model's regex, <c>false</c> otherwise.</returns> | ||
public static bool ValidatePathString(HardwareWalletModels model, string path) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You only use this in the tests. You should move this logic out of the production code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright.
Manual testing
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PSBT workflow can be enabled in the UI however the device is not supporting is. The settings should be disabled. Can you add it in this PR if the code is simple?
It wouldn't be simple as in that case for HW wallets the whole settings would be empty and the wallet settings should be also hidden. And in a separate PR, it could be fixed for all HW wallets. Another plus point would be to fix it after the Wallet Rename feature is merged, as after that the wallet settings would never be empty even for HW wallets, so the fix would be simpler. WDYT? @molnard |
I agree. |
ACK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tACK. 🥇 Well done!
woop woop on getting your first PR merged @Whem, you started with a banger! 🎉🖤 |
Fixes: zkSNACKs/WalletWasabi#11908
Introduction
The HWI already supports the Blockstream Jade hardware wallet, but until now, Wasabi wallet did not. Therefore, we decided to implement this in the current codebase.
Solution
We acquired a Blockstream Jade hardware wallet and initialized it with the appropriate parameters. After this, I implemented the new Enums, HardwareWalletModel and WalletType, in the code.
I started the Wasabi wallet and was able to add it as a wallet.
Subtasks