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

Confusing design of the wallets and addresses models. #367

Open
stdevCrow opened this issue Mar 28, 2021 · 6 comments
Open

Confusing design of the wallets and addresses models. #367

stdevCrow opened this issue Mar 28, 2021 · 6 comments
Assignees
Labels
help wanted Extra attention is needed qml_models QML models to connect to core interface

Comments

@stdevCrow
Copy link
Contributor

I'm coding the C++ version of the model that shows wallets and its addresses in the main page, and I realize that:

But despite a wallet has a list of addresses, there's no connection between them but a walletId property in the QAddress type, and a QWallet does not have such property, so this whole design makes no sense to me.

Describe the solution you'd like

  • A C++ WalletsModel that contains a list of Wallet types that contains an AddressesModel type containing the list of Address types related to that wallet.

It's there any problem with this implementation?

@stdevCrow stdevCrow added help wanted Extra attention is needed qml_models QML models to connect to core interface labels Mar 28, 2021
@stdevCrow stdevCrow self-assigned this Mar 28, 2021
@stdevCrow
Copy link
Contributor Author

@stdevCrow @olemis pls take a look at this 👆 asap, I need a yes or no to continue.

@olemis
Copy link
Contributor

olemis commented Mar 28, 2021

@stdevCrow I guess model name should be Wallet (instead of Wallets ...)

@stdevCrow
Copy link
Contributor Author

@olemis Agree, but are you okay with the propossed implementation?

@olemis
Copy link
Contributor

olemis commented Mar 29, 2021

@stdevCrow Original code works that way for a reason , it seems to me that it's due to the fact that golang wallet address objects are generated by wallet enumeration methods hence they might differ from one method call to the next

This would be of particular importance through the C API

@stdevCrow
Copy link
Contributor Author

@olemis I'm not talking about changing underlying system. I meant that if the addresses contains a walletId, both can be grouped together in the Qt model. The backend will not know the difference. And the model of addresses will not know the existence of the model of wallets. The will work as always, but addresses with the same walletId will be grouped under the same wallet in the WalletModel.

@olemis
Copy link
Contributor

olemis commented Mar 30, 2021

@stdevCrow it seems to me (cmiiw) it's not a wallet ID but an address ID . See BIP-44 hierachical addressing standard . It's not a list of addresses , but an inifinite derivations tree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed qml_models QML models to connect to core interface
Projects
None yet
Development

No branches or pull requests

2 participants