-
Notifications
You must be signed in to change notification settings - Fork 83
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
Added capability of migrating wallet through the node.js wrapper #895
Conversation
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 is not yet usable in practice - libvcx, unlike aries-vcx, is singletonish about everything - there's concept of "main wallet", "main pool", "main agency client" etc.
While technically you have access to wallet handle (open_as_main_wallet
returns it), there's no place we need nodejs consumers to actually work with (any) handles. So to stay consistent, I would rather prefer to have something like "migrate_main_wallet(destWalletHandle)"
with expectation that the user must call open_as_main_wallet
first, and that's gonna be the source wallet.
The problem with migrate_main_wallet(destWalletHandle)
however is that you don't have any way to get the destWalletHandle
, because of singletonish nature of libvcx
.
So a solution for that would be to have interface migrate_main_wallet(wallet_config, wallet_credentials)
on vcx-napi-rs
level, and also libvcx_core
level, then proceed and within that function open the destination wallet and provide the handle to the migrator itself.
It would be good to include simple unit test - create wallet and migrate it (even if there's no records) just to make sure that the basic flow works and the API can be worked with.
96de327
to
d7a31ca
Compare
Codecov Report
@@ Coverage Diff @@
## main #895 +/- ##
=======================================
Coverage 43.36% 43.36%
=======================================
Files 438 438
Lines 34778 34781 +3
Branches 7581 7591 +10
=======================================
+ Hits 15080 15082 +2
- Misses 15234 15237 +3
+ Partials 4464 4462 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
359de67
to
63db665
Compare
Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Bogdan Mircea <[email protected]>
63db665
to
76a8bdb
Compare
…per (#895)" This reverts commit be57e49. Signed-off-by: Patrik Stas <[email protected]>
…per (#895)" This reverts commit be57e49. Signed-off-by: Patrik Stas <[email protected]>
…per (#895)" (#906) This reverts commit be57e49. Signed-off-by: Patrik Stas <[email protected]>
* Revert "Added capability of migrating wallet through the node.js wrapper (#895)" * testing/remove-mixed-breed --------- Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
* Added capability of migrating wallet through the node.js wrapper Signed-off-by: Bogdan Mircea <[email protected]> Signed-off-by: Patrik Stas <[email protected]>
Exposes the wallet migration functionality in the Node.js wrapper