-
Notifications
You must be signed in to change notification settings - Fork 90
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
feat: migrate business logic in dApp staking v2 to v2(new) architecture #662
Conversation
Visit the preview URL for this PR (updated for commit 80b1a9d): https://astar-apps--pr662-feat-dapps-staking-v-5cnpdvye.web.app (expires Tue, 14 Feb 2023 09:12:00 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: dd76fe72958fe2910fef9d53f0b4539b82b849db |
src/hooks/useClaimAll.ts
Outdated
for (let i = 0; i < batchTxsRef.length; i++) { | ||
const tx = batchTxsRef[i]; | ||
console.log('tx.weight', tx.weight.toString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bobo-k2
I found there is a breaking change in tx.weight
because WeightV2(?) is coming. Could you help take a look at update the logic? We can't claim rewards on Shibuya now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will take a look
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #671
* add getStakeInfo function in repo * migrate getStake function to v2 * fix: modified fetching 'My staking information' logic when users change the account (#666) Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>
…rk/astar-apps into feat/dapps-staking-v2
* diminish snowpack & put space on tvl text (#663) * feat:Support for BNC and vDOT assets (#658) * feat:Support for BNC and vDOT assets * Fix some errors * Update BifrostXcmRepository.ts * Add some constants * 0.0.9 * feat: updated japanese translation (#665) * go back logo (#667) * migrate for useUnbonding hook Co-authored-by: NingBo Wang <2536935847@qq.com> Co-authored-by: github-actions <github-actions@users.noreply.github.com> Co-authored-by: impelcrypto <92044428+impelcrypto@users.noreply.github.com>
…rk/astar-apps into feat/dapps-staking-v2
@impelcrypto @bobo-k2 Finished migrate for useUnbonding by following to useClaim. please review. and I just wondering isn't it the right direction to hide all calls related to |
Main idea was to separate concerns so we can write unit tests and make code maintenance easier.. Eg. on Sub0 there were talks about Polkadot.js replacement. If sometimes in the future we decide to replace Polkadot.js, because of the better api we will need to change repositories only. The rest of the code should be fine. |
when I tried it on my end, it works well. @bobo-k2 can you reproduce this? |
It works on my side. Available to claim refreshes after Claim operation is performed |
It looks like unbonding is not working for some dApps. Try the following on Shibuya:
I tried some other dApps and unbond without problem. Also noticed that Unbonding tab didn't show after successfull unbodning. I needed to refresh the the portal. I can't reproduce this anymore, but it is worth checking |
@sirius651 @bobo-k2 It works properly now |
…etwork/astar-apps into feat/dapps-staking-v2
@bobo-k2 @sirius651 I've fixed this issue. Please test it again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it works well for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@sirius651 You can merge this PR anytime :D |
Pull Request Summary
feat: migrate business logic in dApp staking v2 to v2(new) architecture
Check list
Release notes:
This pull request makes the following changes:
Changes