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

[Wallet]Add last ran wallet version to wallet database. #5252

Closed
SWvheerden opened this issue Mar 16, 2023 · 5 comments
Closed

[Wallet]Add last ran wallet version to wallet database. #5252

SWvheerden opened this issue Mar 16, 2023 · 5 comments
Assignees
Labels
A-wallet Area - related to the wallet C-enhancement Category - New feature or request

Comments

@SWvheerden
Copy link
Collaborator

SWvheerden commented Mar 16, 2023

Add the last ran wallet version to the table WalletSettingSql.
Add the network the wallet is run on on this as well and check it at startup that it matches.

The version should be retrieved from the FFI without initializing the wallet via walet_create

It should not run any migration on the database etc. It should just try and retrieve the version+ network. If this is not found, it should return None/Null

@SWvheerden SWvheerden added C-enhancement Category - New feature or request A-wallet Area - related to the wallet labels Mar 16, 2023
@stringhandler
Copy link
Collaborator

There should be a different database per network, so no need to include the network

@stringhandler
Copy link
Collaborator

although I suppose it couldn't hurt

@SWvheerden
Copy link
Collaborator Author

Yeah should be as per: #5250
But I think it would better if we check this.

@stringhandler
Copy link
Collaborator

You can already see this version from the __diesel_schema_migrations table

SWvheerden added a commit that referenced this issue Mar 24, 2023
Description
---
- Network and client APP_VERSION_NUMBER is now stored when wallet is
initialized.
- Added FFI function `wallet_get_network_and_version` that returns the
`network` and `version` of the client that has last accessed the wallet
database.

Motivation and Context
---
For debugging purposes on the client (e.g. Mobile)

How Has This Been Tested?
---
manually

---------

Co-authored-by: SW van Heerden <swvheerden@gmail.com>
Co-authored-by: stringhandler <mikethetike@tari.com>
SWvheerden added a commit to SWvheerden/tari that referenced this issue Mar 24, 2023
@SWvheerden
Copy link
Collaborator Author

Fixed in #5263

SWvheerden added a commit that referenced this issue Mar 24, 2023
##
[0.49.0-pre.4](v0.49.0-pre.3...v0.49.0-pre.4)
(2023-03-24)


### Features

* added FFI function `wallet_get_network_and_version`
[5252](#5252)
([#5263](#5263))
([4b09b59](4b09b59))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-wallet Area - related to the wallet C-enhancement Category - New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants