diff --git a/CHANGELOG.md b/CHANGELOG.md index 6dbb2af08..2d09947e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Improvements - [#1169](https://github.com/crypto-org-chain/chain-main/pull/1169) Update linter and tidy up code +- [#1170](https://github.com/crypto-org-chain/chain-main/pull/1170) Use maps.Copy for cleaner map handling *July 9, 2025* diff --git a/app/app.go b/app/app.go index c57ef7348..14d1cd07c 100644 --- a/app/app.go +++ b/app/app.go @@ -6,6 +6,7 @@ import ( "fmt" "io" "io/fs" + "maps" "net/http" "os" "path/filepath" @@ -1010,9 +1011,7 @@ func RegisterSwaggerAPI(ctx client.Context, rtr *mux.Router) { // GetMaccPerms returns a copy of the module account permissions func GetMaccPerms() map[string][]string { dupMaccPerms := make(map[string][]string) - for k, v := range maccPerms { - dupMaccPerms[k] = v - } + maps.Copy(dupMaccPerms, maccPerms) return dupMaccPerms }