From 81ad742e47b87e12a02b11d9ea09279b73f38002 Mon Sep 17 00:00:00 2001 From: beer-1 Date: Fri, 8 Nov 2024 22:02:27 +0900 Subject: [PATCH] return nil --- app/upgrade.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/upgrade.go b/app/upgrade.go index a7fd646..f9ca920 100644 --- a/app/upgrade.go +++ b/app/upgrade.go @@ -72,7 +72,7 @@ func (app *MinitiaApp) RegisterUpgradeHandlers(cfg module.Configurator) { codeHash := crypto.Keccak256Hash(code).Bytes() // iterate all erc20 contracts and replace contract code to new version - app.EVMKeeper.ERC20s.Walk(ctx, nil, func(contractAddr []byte) (bool, error) { + err = app.EVMKeeper.ERC20s.Walk(ctx, nil, func(contractAddr []byte) (bool, error) { acc := app.AccountKeeper.GetAccount(ctx, contractAddr) if acc == nil { return true, fmt.Errorf("account not found for contract address %s", contractAddr) @@ -102,6 +102,9 @@ func (app *MinitiaApp) RegisterUpgradeHandlers(cfg module.Configurator) { return false, nil }) + if err != nil { + return nil, err + } return versionMap, nil },