Skip to content

Commit

Permalink
fix: Fix GetSignBytes with correct codec (#1480)
Browse files Browse the repository at this point in the history
* fix: Fix GetSignBytes with correct codec

* remove log

* fix(x/ecocredit): amino codec registration

* Update x/ecocredit/base/types/v1/msg_send_test.go

Co-authored-by: tyler <{ID}+{username}@users.noreply.github.com>
  • Loading branch information
amaury1093 and tyler authored Sep 8, 2022
1 parent 00829da commit 6823489
Show file tree
Hide file tree
Showing 38 changed files with 69 additions and 101 deletions.
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1337](https://github.com/regen-network/regen-ledger/pull/1337) Add `AddCreditType` msg-based gov proposal
- [#1346](https://github.com/regen-network/regen-ledger/pull/1346) Add `RemoveAllowedDenom` msg-based gov proposal
- [#1349](https://github.com/regen-network/regen-ledger/pull/1349) Add `UpdateBasketFees` msg-based gov proposal
- [#1465](https://github.com/regen-network/regen-ledger/pull/1465) Renamed to `UpdateBasketFee`
- [#1465](https://github.com/regen-network/regen-ledger/pull/1465) Renamed to `UpdateBasketFee`
- [#1351](https://github.com/regen-network/regen-ledger/pull/1351) Add `signer` option to transaction messages
- [#1362](https://github.com/regen-network/regen-ledger/pull/1362) Add `BatchBalance` state validation checks
- [#1362](https://github.com/regen-network/regen-ledger/pull/1362) Add `BatchContract` state validation checks
Expand All @@ -88,19 +88,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1354](https://github.com/regen-network/regen-ledger/pull/1354) Add `AddClassCreator` msg-based gov proposal
- [#1354](https://github.com/regen-network/regen-ledger/pull/1354) Add `RemoveClassCreator` msg-based gov proposal
- [#1354](https://github.com/regen-network/regen-ledger/pull/1354) Add `ToggleCreditClassAllowlist` msg-based gov proposal
- [#1463](https://github.com/regen-network/regen-ledger/pull/1463) Renamed to `SetClassCreatorAllowlist`
- [#1463](https://github.com/regen-network/regen-ledger/pull/1463) Renamed to `SetClassCreatorAllowlist`
- [#1354](https://github.com/regen-network/regen-ledger/pull/1354) Add `UpdateClassFees` msg-based gov proposal
- [#1466](https://github.com/regen-network/regen-ledger/pull/1466) Renamed to `UpdateClassFee`
- [#1466](https://github.com/regen-network/regen-ledger/pull/1466) Renamed to `UpdateClassFee`
- [#1391](https://github.com/regen-network/regen-ledger/pull/1391) Add `BasketFees` params query
- [#1465](https://github.com/regen-network/regen-ledger/pull/1465) Renamed to `BasketFee`
- [#1465](https://github.com/regen-network/regen-ledger/pull/1465) Renamed to `BasketFee`
- [#1412](https://github.com/regen-network/regen-ledger/pull/1412) Add `EventRemoveAllowedDenom`
- [#1416](https://github.com/regen-network/regen-ledger/pull/1416) Add `QueryAllBalances` query
- [#1417](https://github.com/regen-network/regen-ledger/pull/1417) Add ecocredit params state migration
- [#1423](https://github.com/regen-network/regen-ledger/pull/1423) Add `CreditClassAllowlistEnabled` params query
- [#1463](https://github.com/regen-network/regen-ledger/pull/1463) Renamed to `ClassCreatorAllowlist`
- [#1463](https://github.com/regen-network/regen-ledger/pull/1463) Renamed to `ClassCreatorAllowlist`
- [#1423](https://github.com/regen-network/regen-ledger/pull/1423) Add `AllowedClassCreators` params query
- [#1423](https://github.com/regen-network/regen-ledger/pull/1423) Add `CreditClassFees` params query
- [#1466](https://github.com/regen-network/regen-ledger/pull/1466) Renamed to `ClassFee`
- [#1466](https://github.com/regen-network/regen-ledger/pull/1466) Renamed to `ClassFee`
- [#1423](https://github.com/regen-network/regen-ledger/pull/1423) Add `CreditClassAllowlistEnabled` params query
- [#1450](https://github.com/regen-network/regen-ledger/pull/1450) Add `QueryBalancesByBatch` query
- [#1462](https://github.com/regen-network/regen-ledger/pull/1462) Add `AllowedBridgeChain` table and `QueryAllowedBridgeChains` query
Expand Down Expand Up @@ -158,6 +158,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1354](https://github.com/regen-network/regen-ledger/pull/1354) Removed `paramsKeeper` parameter from `core/Keeper`
- [#1447](https://github.com/regen-network/regen-ledger/pull/1447) Remove `.core` from legacy amino codec names

#### State Machine Breaking

- [#1480](https://github.com/regen-network/regen-ledger/pull/1480) Fix amino codec registration for all ecocredit msgs

### x/group

#### Removed
Expand Down
5 changes: 2 additions & 3 deletions x/ecocredit/base/types/v1/codec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package v1

import (
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/codec/legacy"
codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down Expand Up @@ -40,11 +39,11 @@ func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) {
}

var (
amino = codec.NewLegacyAmino()
amino = codec.NewLegacyAmino()
ModuleCdc = codec.NewAminoCodec(amino)
)

func init() {
RegisterLegacyAminoCodec(legacy.Cdc)
RegisterLegacyAminoCodec(amino)
cryptocodec.RegisterCrypto(amino)
sdk.RegisterLegacyAminoCodec(amino)
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_add_allowed_bridge_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgAddAllowedBridgeChain{}
Expand All @@ -20,7 +18,7 @@ func (m MsgAddAllowedBridgeChain) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgAddAllowedBridgeChain) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_add_class_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgAddClassCreator{}
Expand All @@ -19,7 +17,7 @@ func (m MsgAddClassCreator) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgAddClassCreator) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_add_credit_type.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgAddCreditType{}
Expand All @@ -20,7 +18,7 @@ func (m MsgAddCreditType) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgAddCreditType) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_bridge.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

"github.com/regen-network/regen-ledger/types/eth"
"github.com/regen-network/regen-ledger/types/math"
"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -25,7 +24,7 @@ func (m MsgBridge) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgBridge) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/base/types/v1/msg_bridge_receive.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func (m MsgBridgeReceive) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgBridgeReceive) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/base/types/v1/msg_cancel.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (m MsgCancel) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgCancel) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/base/types/v1/msg_create_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (m MsgCreateBatch) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgCreateBatch) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 2 additions & 1 deletion x/ecocredit/base/types/v1/msg_create_class.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)
Expand All @@ -20,7 +21,7 @@ func (m MsgCreateClass) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgCreateClass) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/base/types/v1/msg_create_project.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func (m MsgCreateProject) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgCreateProject) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_mint_batch_credits.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -21,7 +20,7 @@ func (m MsgMintBatchCredits) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgMintBatchCredits) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_remove_allowed_bridge_chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgRemoveAllowedBridgeChain{}
Expand All @@ -20,7 +18,7 @@ func (m MsgRemoveAllowedBridgeChain) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgRemoveAllowedBridgeChain) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_remove_class_creator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgRemoveClassCreator{}
Expand All @@ -19,7 +17,7 @@ func (m MsgRemoveClassCreator) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgRemoveClassCreator) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_retire.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -21,7 +20,7 @@ func (m MsgRetire) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgRetire) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_seal_batch.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -19,7 +18,7 @@ func (m MsgSealBatch) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgSealBatch) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_send.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/types/math"
"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -22,7 +21,7 @@ func (m MsgSend) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgSend) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
9 changes: 9 additions & 0 deletions x/ecocredit/base/types/v1/msg_send_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,12 @@ func (s *msgSend) ExpectTheError(a string) {
func (s *msgSend) ExpectNoError() {
require.NoError(s.t, s.err)
}

func TestMsgSendAmino(t *testing.T) {
msg := &MsgSend{}
require.Equal(
t,
`{"type":"regen/MsgSend","value":{}}`, // Make sure we have the `type` and `value` fields
string(msg.GetSignBytes()),
)
}
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_set_class_creator_allowlist.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (

sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgSetClassCreatorAllowlist{}
Expand All @@ -19,7 +17,7 @@ func (m MsgSetClassCreatorAllowlist) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgSetClassCreatorAllowlist) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_update_class_admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -16,7 +15,7 @@ func (m MsgUpdateClassAdmin) Route() string { return sdk.MsgTypeURL(&m) }
func (m MsgUpdateClassAdmin) Type() string { return sdk.MsgTypeURL(&m) }

func (m MsgUpdateClassAdmin) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

func (m *MsgUpdateClassAdmin) ValidateBasic() error {
Expand Down
4 changes: 1 addition & 3 deletions x/ecocredit/base/types/v1/msg_update_class_fee.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
)

var _ legacytx.LegacyMsg = &MsgUpdateClassFee{}
Expand All @@ -20,7 +18,7 @@ func (m MsgUpdateClassFee) Type() string { return sdk.MsgTypeURL(&m) }

// GetSignBytes implements the LegacyMsg interface.
func (m MsgUpdateClassFee) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

// ValidateBasic does a sanity check on the provided data.
Expand Down
3 changes: 1 addition & 2 deletions x/ecocredit/base/types/v1/msg_update_class_issuers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/migrations/legacytx"

"github.com/regen-network/regen-ledger/x/ecocredit"
"github.com/regen-network/regen-ledger/x/ecocredit/base"
)

Expand All @@ -18,7 +17,7 @@ func (m MsgUpdateClassIssuers) Route() string { return sdk.MsgTypeURL(&m) }
func (m MsgUpdateClassIssuers) Type() string { return sdk.MsgTypeURL(&m) }

func (m MsgUpdateClassIssuers) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

func (m *MsgUpdateClassIssuers) ValidateBasic() error {
Expand Down
2 changes: 1 addition & 1 deletion x/ecocredit/base/types/v1/msg_update_class_metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func (m MsgUpdateClassMetadata) Route() string { return sdk.MsgTypeURL(&m) }
func (m MsgUpdateClassMetadata) Type() string { return sdk.MsgTypeURL(&m) }

func (m MsgUpdateClassMetadata) GetSignBytes() []byte {
return sdk.MustSortJSON(ecocredit.ModuleCdc.MustMarshalJSON(&m))
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&m))
}

func (m *MsgUpdateClassMetadata) ValidateBasic() error {
Expand Down
Loading

0 comments on commit 6823489

Please sign in to comment.