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

Get and set the cold state based on wallet. #143

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DennisAMenace
Copy link
Contributor

This allows the for a better UX to know the Cold/Hot status of a wallet.

@dangershony
Copy link
Member

Don't we have another way to know if its a hot or a cold wallet?

Actually it seems that after my change to the indexes its now possible to have the wallet as both hot and cold (if the funds are from another wallet)

This scenario sees to work:
Wallet A sends hot funds to Wallet B
and
Wallet B send hot funds to wallet A

@DennisAMenace
Copy link
Contributor Author

Correct, but in the UI, they are not going to be hot AND cold at the same time, so only showing one interface to make the user experience better.

In the x42 wallet, I have this in the settings to change it to a hot wallet:
image

@dangershony
Copy link
Member

@thecrypt0hunter your thoughts? shall we deliberately limit a wallet to be either hot or cold?

@thecrypt0hunter
Copy link
Contributor

This is how it’s used logically, so yes I’d agree. Is there going to be an API that returns the wallet state (hot/cold) as well?

@dangershony
Copy link
Member

dangershony commented Jun 1, 2020

When I think about it, the problem with this approach is that if the wallet is recovered then that flag is not known because its sort of a flag that is set by the user and not something that is discovered on the blockchain itself.

A much better approach will be to check if a hot/cold account has trx associated with it and that will determine what it is.

so a wallet becomes hot or cold based on the trx that is being setup.

If we do take this approach then we probably also need to check that flag when setting up a creating cold stake trx

@DennisAMenace
Copy link
Contributor Author

DennisAMenace commented Jun 1, 2020

Is there going to be an API that returns the wallet state (hot/cold) as well?

Yes, API is in this PR.

A much better approach will be to check if a hot/cold account has trx associated with it and that will determine what it is.

This would be great for setting the default value here on restore, but we still should have this feature so the user can have toggle hot/cold at will.

@thecrypt0hunter
Copy link
Contributor

Can’t it be both hot and cold with that call? You would want it to be one or the other, but not both.

@sondreb
Copy link
Member

sondreb commented Nov 19, 2020

A much better approach will be to check if a hot/cold account has trx associated with it and that will determine what it is.

Anyone can send a cold-staking activation to any address, so if I send to your hot-staking wallet, will we be able to filter and ensure this works properly?

@dangershony
Copy link
Member

What about this PR? did we decide anything?

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.

4 participants