Skip to content
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

Merged
merged 4 commits into from
Jul 20, 2023

Conversation

bobozaur
Copy link
Contributor

@bobozaur bobozaur commented Jul 7, 2023

Exposes the wallet migration functionality in the Node.js wrapper

Copy link
Contributor

@Patrik-Stas Patrik-Stas left a 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.

@bobozaur bobozaur force-pushed the feature/node_wallet_migrator branch from 96de327 to d7a31ca Compare July 18, 2023 13:18
@codecov-commenter
Copy link

codecov-commenter commented Jul 18, 2023

Codecov Report

Merging #895 (63db665) into main (d16b933) will increase coverage by 0.00%.
The diff coverage is 0.00%.

❗ Current head 63db665 differs from pull request most recent head 76a8bdb. Consider uploading reports for the commit 76a8bdb to get more accurate results

@@           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     
Flag Coverage Δ
unittests-aries-vcx 43.36% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
libvdrtools/indy-api-types/src/lib.rs 50.00% <0.00%> (-30.00%) ⬇️

... and 2 files with indirect coverage changes

@bobozaur bobozaur force-pushed the feature/node_wallet_migrator branch from 359de67 to 63db665 Compare July 19, 2023 08:32
@bobozaur bobozaur force-pushed the feature/node_wallet_migrator branch from 63db665 to 76a8bdb Compare July 20, 2023 07:22
@Patrik-Stas Patrik-Stas merged commit be57e49 into main Jul 20, 2023
47 of 51 checks passed
@Patrik-Stas Patrik-Stas deleted the feature/node_wallet_migrator branch July 20, 2023 14:52
Patrik-Stas added a commit that referenced this pull request Jul 21, 2023
Patrik-Stas added a commit that referenced this pull request Jul 21, 2023
Patrik-Stas added a commit that referenced this pull request Jul 21, 2023
bobozaur pushed a commit that referenced this pull request Jul 24, 2023
bobozaur pushed a commit that referenced this pull request Jul 24, 2023
* Revert "Added capability of migrating wallet through the node.js wrapper (#895)"

* testing/remove-mixed-breed

---------

Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Jul 26, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Jul 29, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Jul 29, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Jul 29, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Aug 9, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Aug 19, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Aug 31, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Sep 12, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Patrik-Stas pushed a commit that referenced this pull request Sep 12, 2023
* Added capability of migrating wallet through the node.js wrapper

Signed-off-by: Bogdan Mircea <[email protected]>
Signed-off-by: Patrik Stas <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants