fix simulation test, marshal json process

This commit is contained in:
antstalepresh 2021-02-06 01:21:22 +10:00
parent 404dc4f356
commit 46d6fa0ecc
2 changed files with 4 additions and 5 deletions

View File

@ -386,7 +386,7 @@ func operationSimulateMsgVoteWeighted(ak types.AccountKeeper, bk types.BankKeepe
return simtypes.NoOpMsg(types.ModuleName, msg.Type(), "unable to deliver tx"), nil, err
}
return simtypes.NewOperationMsg(msg, true, ""), nil, nil
return simtypes.NewOperationMsg(msg, true, "", nil), nil, nil
}
}

View File

@ -1,13 +1,12 @@
package types
import (
"encoding/json"
"fmt"
"strings"
yaml "gopkg.in/yaml.v2"
sdk "github.com/cosmos/cosmos-sdk/types"
proto "github.com/gogo/protobuf/proto"
yaml "gopkg.in/yaml.v2"
)
// NewVote creates a new Vote instance
@ -62,7 +61,7 @@ func NewNonSplitVoteOption(option VoteOption) WeightedVoteOptions {
}
func (v WeightedVoteOption) String() string {
out, _ := proto.Marshal(&v)
out, _ := json.Marshal(v)
return string(out)
}