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

feat: Recover cancel unbonding logic #110

Merged
merged 8 commits into from
Jan 23, 2024

Conversation

neitdung
Copy link
Collaborator

  • Recover logic cancel unbonding with specific amount
  • Fix NewMultiStakingUnlock construct function

}
cancelUnbondingCoin := sdk.NewCoin(k.keeper.stakingKeeper.BondDenom(ctx), unbondEntry.Balance)

cancelBondAmount := cancelMSCoin.BondValue()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This amount needs to be adjust similarly to AdjustUnbondAmount

Copy link
Collaborator Author

@neitdung neitdung Jan 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AdjustUnbondAmount should be used when we move shares out from validator, my func is not move any shares, I've just re delegate to the same validator

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should adjust unbond amount for staking module. We just keep the lock value

Copy link
Collaborator

@GNaD13 GNaD13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've some update. Could you check that pls @neitdung

x/multi-staking/keeper/unlock.go Outdated Show resolved Hide resolved
x/multi-staking/keeper/unlock.go Outdated Show resolved Hide resolved
}
cancelUnbondingCoin := sdk.NewCoin(k.keeper.stakingKeeper.BondDenom(ctx), unbondEntry.Balance)

cancelBondAmount := cancelMSCoin.BondValue()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should adjust unbond amount for staking module. We just keep the lock value

@catShaark catShaark changed the title !refactor: Recover cancel unbonding logic feat: Recover cancel unbonding logic Jan 23, 2024
@catShaark catShaark merged commit 01b2eee into realiotech:main Jan 23, 2024
4 checks passed
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.

3 participants