From 17f5bde970b12c958e0a3e6d222831e40c3c66ba Mon Sep 17 00:00:00 2001 From: Adam Tucker Date: Mon, 15 May 2023 13:39:58 -0500 Subject: [PATCH] add check for both bonded and unbonding --- x/superfluid/keeper/migrate.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x/superfluid/keeper/migrate.go b/x/superfluid/keeper/migrate.go index cc8fe4613d3..40d1554877d 100644 --- a/x/superfluid/keeper/migrate.go +++ b/x/superfluid/keeper/migrate.go @@ -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