-
Notifications
You must be signed in to change notification settings - Fork 63
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 a "Delete All" option from Wallet page #17
Comments
I would like to work on this issue |
@alexcfyung thanks for your interest! updated the description with what we might want to do |
@varadgit thanks for the added detail! Just curious would a feature to switch network like in metamask be useful in this situation? so the user can switch network without removing all the wallet? or the console only support 1 concurrent network? |
Well, |
I was thinking that network is like a blockchain, like ethereum, in metamask, user can change the network, for example, from ethereum to BSC without the need to remove their local ethereum wallet as they can change the network back to ethereum. I could have misunderstood as I am still learning about hyperledger, but I assume "sets up a new Fabric Test network" mean setup a new blockchain, and this feature is to remove the wallet/identities local data when user want to change network, so I wonder if the console can allow the user to switch network without deleting data from old network would be useful. |
ah! I was afraid you would say that :-) The console only supports Hyperledger Fabric at the moment... in the future when we look to expand we can consider switching the wallet |
If I understand correctly, hyperledger fabric is a framework so there could be multiple fabric blockchain network, does the console support multiple fabric network so user can switch between them? As I assume one reason a user want to use the delete all feature is to switch to another fabric network |
@alexcfyung console does not support other flavors of Blockchain. It only supports Hyperledger Fabric since there isn't any sort of standard that we can use from the UI...
At this point all the identities in the wallet are no longer valid and you will need to delete them one at a time which might take a bit of time. It would be nice to clear the wallet with one button click. |
Thanks for the explanation. I understand It only support Fabric, I was wondering that since there could be multiple Fabric blockchain used by different client, can the console help the user manage all Fabric blockchain by allowing user to "switch" between each Fabric blockchain? Also currently I am having trouble setup the dev environment, the
this is my
and
|
cool! you should be able to pass the userid/password as part of the connection string like here...
|
I added the change of the issues I encountered while setting up, I have submit a PR for that while I was working on the delete all feature. |
@varadgit is there a way to setup testing identities without a CA? it seems like the console have import enable only and may need to be on IBM cloud or actual deployment to register a CA, or is there a way to setup testing CA without the deployment work? |
@alexcfyung if you have an existing identity JSON you can keep importing the same... Here is a sample in case you need it... also if you have a valid cert, you can create a JSON also...
|
@alexcfyung What URL are you using to access the console? I just recreated the issue locally by accessing the URL using something other than There is a crypto library console uses that will only work with TLS except the following case
https://developer.mozilla.org/en-US/docs/Web/API/Crypto/subtle Can you try using localhost? |
fyi - i've added the secure context info to a new doc. https://github.com/hyperledger-labs/fabric-operations-console/blob/main/FAQ.md#error-help |
When a user sets up a new Fabric Test network the old identities that are stored as part of Local Storage aren't valid anymore. Need an easy way to clear all the current Identities from wallet.
I think for this particular use case where new components are imported where the wallet items are stale, we can keep the functionally in settings area. Something like the following screen
and when the user click on the button open up the side panel with a text something like "Are you sure you want to delete all items from Wallet? Enter "Delete All" to proceed.
Add a "Delete All" button that will get enabled only after entering the text "Delete All" in the text box to remove the items from local storage.
You should be able to see the side panel pattern in a lot of places. You would add the button here...
https://github.com/hyperledger-labs/fabric-operations-console/blob/main/packages/apollo/src/components/Settings/Settings.js#L467
You should be able to follow the "Import" button pattern to put up a side panel with the message and a prompt.
Add a method in the following file
clearAllIdentities
https://github.com/hyperledger-labs/fabric-operations-console/blob/main/packages/apollo/src/rest/IdentityApi.js
delete the following two keys for the currently logged in user
You can use the following method to get an idea of the keys
IdentityApi.getKey();
The text was updated successfully, but these errors were encountered: