Skip to content

Commit

Permalink
imp: remove sdk.MustSortJSON from ics29 `acknowledgement.Acknowledg…
Browse files Browse the repository at this point in the history
…ement()` (cosmos#5395)

Co-authored-by: Carlos Rodriguez <carlos@interchain.io>
  • Loading branch information
chandiniv1 and Carlos Rodriguez authored Dec 20, 2023
1 parent 7c48b96 commit 3fadc29
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions modules/apps/29-fee/types/ack.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package types

import (
sdk "github.com/cosmos/cosmos-sdk/types"
"encoding/json"
"errors"
)

// NewIncentivizedAcknowledgement creates a new instance of IncentivizedAcknowledgement
Expand All @@ -23,5 +24,10 @@ func (ack IncentivizedAcknowledgement) Success() bool {
// Acknowledgement implements the Acknowledgement interface. It returns the
// acknowledgement serialised using JSON.
func (ack IncentivizedAcknowledgement) Acknowledgement() []byte {
return sdk.MustSortJSON(ModuleCdc.MustMarshalJSON(&ack))
res, err := json.Marshal(&ack)
if err != nil {
panic(errors.New("cannot marshal acknowledgement into json"))
}

return res
}

0 comments on commit 3fadc29

Please sign in to comment.