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

bug(vesting): clawback only unvested coins #317

Merged
merged 14 commits into from
Mar 1, 2022
Merged

Conversation

danburck
Copy link
Contributor

@danburck danburck commented Mar 1, 2022

Description

This PR adds integration tests for clawback, remove unnecessary staking logic during clawback (as staking unvested tokens is not allowed ) and refactors the clawback to only allow clawback of unvested tokens.

@codecov
Copy link

codecov bot commented Mar 1, 2022

Codecov Report

Merging #317 (bda2642) into main (b71526c) will increase coverage by 0.49%.
The diff coverage is 100.00%.

❗ Current head bda2642 differs from pull request most recent head a9b9823. Consider uploading reports for the commit a9b9823 to get more accurate results

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #317      +/-   ##
==========================================
+ Coverage   65.04%   65.53%   +0.49%     
==========================================
  Files          93       93              
  Lines        6191     6137      -54     
==========================================
- Hits         4027     4022       -5     
+ Misses       2007     1963      -44     
+ Partials      157      152       -5     
Impacted Files Coverage Δ
x/vesting/keeper/msg_server.go 88.95% <100.00%> (+13.39%) ⬆️
x/vesting/types/clawback_vesting_account.go 96.42% <100.00%> (+7.62%) ⬆️
x/vesting/types/schedule.go 100.00% <100.00%> (ø)
x/vesting/types/utils.go 100.00% <0.00%> (+8.82%) ⬆️

@danburck danburck marked this pull request as ready for review March 1, 2022 16:04
@danburck danburck changed the title clawack only unvested bug(vesting); clawback only unvested coins Mar 1, 2022
@danburck danburck changed the title bug(vesting); clawback only unvested coins bug(vesting): clawback only unvested coins Mar 1, 2022
go.sum Show resolved Hide resolved
x/vesting/keeper/integration_test.go Outdated Show resolved Hide resolved
x/vesting/types/schedule.go Show resolved Hide resolved
x/vesting/types/clawback_vesting_account.go Outdated Show resolved Hide resolved
x/vesting/types/clawback_vesting_account.go Show resolved Hide resolved
Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

ACK, pending changelog entry

@fedekunze fedekunze enabled auto-merge (squash) March 1, 2022 20:39
@fedekunze fedekunze merged commit a9dfe36 into main Mar 1, 2022
@fedekunze fedekunze deleted the clawack-only-unvested branch March 1, 2022 21:14
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