Skip to content

Commit

Permalink
fix encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmao93 committed Jun 15, 2023
1 parent 0edfa7d commit 357fecb
Showing 1 changed file with 3 additions and 17 deletions.
20 changes: 3 additions & 17 deletions sgn-v2/app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,12 @@ package app

import (
"github.com/celer-network/im-executor/sgn-v2/app/params"
"github.com/cosmos/cosmos-sdk/std"
)

var legacyCodecRegistered = false

// MakeEncodingConfig creates an EncodingConfig for testing
func MakeEncodingConfig() params.EncodingConfig {
encodingConfig := params.MakeEncodingConfig()
/*
std.RegisterLegacyAminoCodec(encodingConfig.Amino)
std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
ModuleBasics.RegisterLegacyAminoCodec(encodingConfig.Amino)
ModuleBasics.RegisterInterfaces(encodingConfig.InterfaceRegistry)
if !legacyCodecRegistered {
// authz module use this codec to get signbytes.
// authz MsgExec can execute all message types,
// so legacy.Cdc need to register all amino messages to get proper signature
ModuleBasics.RegisterLegacyAminoCodec(legacy.Cdc)
legacyCodecRegistered = true
}
*/
std.RegisterLegacyAminoCodec(encodingConfig.Amino)
std.RegisterInterfaces(encodingConfig.InterfaceRegistry)
return encodingConfig
}

0 comments on commit 357fecb

Please sign in to comment.