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

fix: removed btc status unbonding from error return string #140

Merged
merged 5 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)

## Unreleased

### Bug Fixes

* [#140](https://github.com/babylonlabs-io/babylon/pull/140) Removed `unbonding`
and add `verified` to delegation status parse `NewBTCDelegationStatusFromString`.

### State Machine Breaking

* [#130](https://github.com/babylonlabs-io/babylon/pull/130) Fix bugs in the
Expand Down
4 changes: 3 additions & 1 deletion x/btcstaking/types/btc_delegation.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ func NewBTCDelegationStatusFromString(statusStr string) (BTCDelegationStatus, er
switch statusStr {
case "pending":
return BTCDelegationStatus_PENDING, nil
case "verified":
return BTCDelegationStatus_VERIFIED, nil
case "active":
return BTCDelegationStatus_ACTIVE, nil
case "unbonded":
return BTCDelegationStatus_UNBONDED, nil
case "any":
return BTCDelegationStatus_ANY, nil
default:
return -1, fmt.Errorf("invalid status string; should be one of {pending, active, unbonding, unbonded, any}")
return -1, fmt.Errorf("invalid status string; should be one of {pending, verified, active, unbonded, any}")
}
}

Expand Down
Loading