Skip to content

Commit

Permalink
refactor: using maps.Clone to simplify the code
Browse files Browse the repository at this point in the history
Signed-off-by: zhuhaicity <zhuhai@52it.net>
  • Loading branch information
zhuhaicity committed Jan 12, 2025
1 parent 04cb6e5 commit 08234b6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"io"
"maps"
"os"
"path/filepath"
"sort"
Expand Down Expand Up @@ -1156,12 +1157,7 @@ func (app *WasmApp) RegisterNodeService(clientCtx client.Context, cfg config.Con
//
// NOTE: This is solely to be used for testing purposes.
func GetMaccPerms() map[string][]string {
dupMaccPerms := make(map[string][]string)
for k, v := range maccPerms {
dupMaccPerms[k] = v
}

return dupMaccPerms
return maps.Clone(maccPerms)
}

// BlockedAddresses returns all the app's blocked account addresses.
Expand Down

0 comments on commit 08234b6

Please sign in to comment.