rusk
rusk copied to clipboard
Web-wallet doesnt allow claim rewards without active stake
Describe the bug
After ITN issues and the request to unstake i did an unstake via cli-wallet. This did not auto-claim rewards.
When trying to claim rewards via webwallet got an error:
Claiming rewards via CLI-wallet worked afterwards
To Reproduce
- unstake from cli-wallet
- check staked amount is zero but reward value is still showing up (both in webwallet and CLI wallet
- try to claim via webwallet.
Expected behaviour Would expect an unstake action to autoclaim rewards. If this not happens would expect to be able to claim rewards via web-wallet as well
Logs/Screenshot see above screenshots
Platform
Windows 11 laptop W23H2 Chrome: Versie 121.0.6167.185 (Officiële build) (64-bits)
Additional context N/A
This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267
This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267
Just remove the "has_stake", since makes no sense
This error gets thrown from here https://github.com/dusk-network/dusk-wallet-js/blob/main/src/contracts/stake.js#L267
Just remove the "has_stake", since makes no sense
removing has_staked is okay but that's not the culprit for sure because other people are able to withdraw while they were unstaked. I think it mostly might be a cache issue or the node not being able to return the stake-info correctly
Same situation for me, I’m just gonna add my case wether it helps or not:
I unstaked from the cli-wallet and did not receive my rewards automatically. What’s also weird is once I opened the cli-wallet again I still had the option to unstake! Don't want to mess around with that right now, so I'll leave it be
I can see my rewards in the web-wallet, I try to claim them which takes a few seconds but transaction fails.
I tried to login to the cli-wallet again to check if Unstake is still there and now I get this error:
thread 'main' panicked at 'Invalid cache IO error: While lock file: /root/.dusk/rusk-wallet/cache/LOCK: Resource temporarily unavailable', src/bin/main.rs:86:35
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Edit: the last error for the wallet just seemed to be random. I can access the wallet again (both cli and web).
I unstaked from the cli-wallet and did not receive my rewards automatically.
Correct, rewards must be withdrawn with a different transaction
What’s also weird is once I opened the cli-wallet again I still had the option to unstake!
If you try to unstake you'll get informed that you're not allowed to
I tried to login to the cli-wallet again to check if Unstake is still there and now I get this error:
thread 'main' panicked at 'Invalid cache IO error: While lock file: /root/.dusk/rusk-wallet/cache/LOCK: Resource temporarily unavailable', src/bin/main.rs:86:35 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Edit: the last error for the wallet just seemed to be random. I can access the wallet again (both cli and web).
That means that you have multiple rusk-wallet instance running at the same time
Oh I'm sorry I thought rewards were automatically withdrawn with the unstake transaction. My fault, I misremembered this.
If you try to unstake you'll get informed that you're not allowed to
And wow I didn't recognize that this option is always there..
That means that you have multiple rusk-wallet instance running at the same time
Thanks, I should've known better.
Update: Have checked with Daksh and Seppia – the issue is to be resolved by removing the !info.has_staked
check from stake.js.
Sorry to be that guy, but can we correct the typo? It is "consensus" not "concensus"
Sorry to be that guy, but can we correct the typo? It is "consensus" not "concensus"
Seems like the error has been removed altogether. Reference
However, this change is not yet released.
True, not releases yet, on new testnet issue is still present on web-wallet. Would expect it to throw a gas required action since we don’t have ndusk yet, but it will shows the “no active stake” error.
Can this issue be closed now? cc: @Daksh14 @herr-seppia