-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add "Wallet Explorer"; support NEP-6 wallets; support mainnet/testnet transfer/claim #40
Conversation
src/walletExplorer.ts
Outdated
} | ||
} | ||
|
||
export class WalletExplorer implements vscode.TreeDataProvider<WalletTreeItemIdentifier> { |
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 sure a tree view is the best UI metaphor here, though honestly I can't think of something else. Maybe we should just be adding a "create account" item to teh main file explorer tree view if we detect that a given json file is a NEP-6 wallet + just have a "create wallet file" command w/o an explorer UI?
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.
When adding context menu items to the file explorer I only get the choice of matching based on the filename--I'd have to have the "Create account" option show up for all .json files not just NEP-6 wallets. I think that would be confusing.
I'd like to do something like the "Add configuration..." button you see in the editor whenever you edit a launch.json file. I can't find a way to do it though, I think the floating button in launch.json editors may be a special case built-in to vscode and not an actual extensibility point. The closest I have managed to achieve is using a "Code Lens" to add a "Create account" link to the top of the editor window whenever you edit a NEP-6 wallet.
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.
As per my comment in the walletExplorer.ts file, it feels like we don't need an explorer tree view to list all the wallets. But I'm interested in your thoughts on this @djnicholson
- new wallet files can be created via wallet selection dropdowns - new accounts can be created by a codelens links
I got rid of the tree view in the latest push. Creating a new wallet file can be done from the wallet dropdowns in the transfer/claim dialogs. Adding an account to a wallet can be done by clicking a CodeLens link whenever you have a NEP-6 file loaded in the editor. |
It's a little undiscoverable, but I like this. We probably need a docs pass as part of the next release |
I'll also find an appropriate vscode forum or Github to ask whether it is possible for me to do something like the "Add configuration" button in the launch.json editor. This approach is probably sufficient in the meantime though. |
For docs, we should probably suggest using the command palette |
{ | ||
"command": "neo-visual-devtracker.createWalletFile", | ||
"title": "Create new NEP-6 wallet file", | ||
"category": "Neo Express" |
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.
Create NEP-6 wallet + account commands shouldn't be in the Neo Express category.
We probably need to review all of the command categories for things that are specific to neo-express vs. things that are not, but I'm fine doing that as a seperate PR
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.
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.
other than the categories issue, this looks good to go to me. I'm thinking we should go ahead and merge this and open a new issue to track category review across the entire extension.
|
This PR adds a "Wallet explorer" to vscode that will display any NEP-6 format wallets found in the active workspace (it also allows you to create a new NEP-6 wallet file and add accounts to it).
The "Transfer" and "Claim" dialog have been updated to allow you to do transfers/claims using discovered NEP-6 wallets (as well as using private keys from neo-express config files). The transfer and claim dialogs can now also be used on mainnet/testnet (not just on neo-express blockchains).
Fixes #34