From b2b7d4e52467e234cb5499327e64a39a27a78e12 Mon Sep 17 00:00:00 2001 From: Giuseppe Natale <12249307+giunatale@users.noreply.github.com> Date: Thu, 30 Apr 2026 16:49:07 +0200 Subject: [PATCH] fix error check --- app/upgrades/v4/upgrades.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index 3c37c282..b78efbf1 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -251,7 +251,7 @@ func migrateLastMinDeposit(ctx context.Context, cdc codec.Codec, govKeeper *govk lastMinDeposit, err := lastMinDepositItem.Get(ctx) if err != nil { // If not set, skip migration - if err.Error() == "collections: not found" { + if errors.Is(err, collections.ErrNotFound) { return nil } return fmt.Errorf("failed to get last min deposit: %w", err) @@ -277,7 +277,7 @@ func migrateLastMinInitialDeposit(ctx context.Context, cdc codec.Codec, govKeepe lastMinInitialDeposit, err := lastMinInitialDepositItem.Get(ctx) if err != nil { // If not set, skip migration - if err.Error() == "collections: not found" { + if errors.Is(err, collections.ErrNotFound) { return nil } return fmt.Errorf("failed to get last min initial deposit: %w", err)