From 4739b0f6c0ff3deb5610f5a57993b8baa718fe9b Mon Sep 17 00:00:00 2001
From: Daniel Wedul <dwedul@figure.com>
Date: Wed, 22 Jun 2022 15:43:05 -0600
Subject: [PATCH] Create Mango rc2 handler. (#888)

* Move the mango upgrade to mango-rc2 and add an empty mango upgrade since that's what actually happened for v1.11.1-rc1.

* Add changelog entry.

* Keep the code in the original mango upgrade (as well a the mango-rc2 upgrade).

* Clarify changelog entry.

* Fix changelog entry.
---
 CHANGELOG.md    | 1 +
 app/upgrades.go | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 64afd4e1fb..97531434e4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -40,6 +40,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
 ### Bug Fixes
 
 * Add new `msgfees` `NhashPerUsdMil`  default param to param space store on upgrade (PR [#875](https://github.com/provenance-io/provenance/issues/875))
+* Add `mango-rc2` upgrade handler to do a couple migration pieces that were missed in v1.11.1-rc1, but needed [PR 888](https://github.com/provenance-io/provenance/pull/888).
 
 ---
 
diff --git a/app/upgrades.go b/app/upgrades.go
index a3f317f5d6..b188977d40 100644
--- a/app/upgrades.go
+++ b/app/upgrades.go
@@ -36,6 +36,15 @@ var handlers = map[string]appUpgrade{
 			return versionMap, nil
 		},
 	}, // upgrade for 1.11.x
+	"mango-rc2": {
+		Handler: func(app *App, ctx sdk.Context, plan upgradetypes.Plan) (module.VersionMap, error) {
+			params := app.MsgFeesKeeper.GetParams(ctx)
+			app.MsgFeesKeeper.SetParams(ctx, params)
+			versionMap := app.UpgradeKeeper.GetModuleVersionMap(ctx)
+			return versionMap, nil
+		},
+	}, // upgrade for 1.11.1-rc2
+
 	// TODO - Add new upgrade definitions here.
 }