Update CHANGELOG.md, update x/auth to avoid base64

This commit is contained in:
Christopher Goes 2018-06-08 01:50:59 +02:00
parent cbc6989ed6
commit 34ec53a761
No known key found for this signature in database
GPG Key ID: E828D98232D328D3
2 changed files with 10 additions and 7 deletions

View File

@ -1,6 +1,7 @@
# Changelog
BREAKING CHANGES
* msg.GetSignBytes() now returns bech32-encoded addresses in all cases
FEATURES

View File

@ -1,6 +1,8 @@
package auth
import (
"encoding/json"
sdk "github.com/cosmos/cosmos-sdk/types"
crypto "github.com/tendermint/go-crypto"
)
@ -83,11 +85,11 @@ func (fee StdFee) Bytes() []byte {
// and the Sequence numbers for each signature (prevent
// inchain replay and enforce tx ordering per account).
type StdSignDoc struct {
ChainID string `json:"chain_id"`
Sequences []int64 `json:"sequences"`
FeeBytes []byte `json:"fee_bytes"`
MsgBytes []byte `json:"msg_bytes"`
AltBytes []byte `json:"alt_bytes"`
ChainID string `json:"chain_id"`
Sequences []int64 `json:"sequences"`
FeeBytes json.RawMessage `json:"fee_bytes"`
MsgBytes json.RawMessage `json:"msg_bytes"`
AltBytes json.RawMessage `json:"alt_bytes"`
}
// StdSignBytes returns the bytes to sign for a transaction.
@ -96,8 +98,8 @@ func StdSignBytes(chainID string, sequences []int64, fee StdFee, msg sdk.Msg) []
bz, err := msgCdc.MarshalJSON(StdSignDoc{
ChainID: chainID,
Sequences: sequences,
FeeBytes: fee.Bytes(),
MsgBytes: msg.GetSignBytes(),
FeeBytes: json.RawMessage(fee.Bytes()),
MsgBytes: json.RawMessage(msg.GetSignBytes()),
})
if err != nil {
panic(err)