Skip to content

Commit

Permalink
add check for both bonded and unbonding
Browse files Browse the repository at this point in the history
  • Loading branch information
czarcas7ic committed May 15, 2023
1 parent b966b05 commit 17f5bde
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/superfluid/keeper/migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ func (k Keeper) routeMigration(ctx sdk.Context, sender sdk.AccAddress, lockId ui
if strings.Contains(synthLockBeforeMigration.SynthDenom, "superunbonding") {
migrationType = SuperfluidUnbonding
}
if strings.Contains(synthLockBeforeMigration.SynthDenom, "superbonding") && strings.Contains(synthLockBeforeMigration.SynthDenom, "superunbonding") {
return nil, Unsupported, fmt.Errorf("lock %d contains both superfluid bonded and unbonded tokens", lockId)
}
}

return synthLocksBeforeMigration, migrationType, nil
Expand Down

0 comments on commit 17f5bde

Please sign in to comment.