Merge PR #1377: types: remove GetMemo from Tx
This method is an unneccessary requirement on Tx. Auth casts the Tx to StdTx, so the memo can be obtained in previous usecases from StdTx. This also makes it more clear for when something is implementing StdTx vs Tx. Resolves #1375
This commit is contained in:
parent
f2a83a07f9
commit
893bb4027d
|
@ -11,6 +11,7 @@ BREAKING CHANGES
|
|||
* Signers of a transaction now only sign over their account and sequence number
|
||||
* Removed MsgChangePubKey from auth
|
||||
* Removed setPubKey from account mapper
|
||||
* Removed GetMemo from Tx (it is still on StdTx)
|
||||
|
||||
FEATURES
|
||||
* [gaiacli] You can now attach a simple text-only memo to any transaction, with the `--memo` flag
|
||||
|
|
|
@ -31,9 +31,6 @@ type Tx interface {
|
|||
|
||||
// Gets the Msg.
|
||||
GetMsgs() []Msg
|
||||
|
||||
// Gets the memo.
|
||||
GetMemo() string
|
||||
}
|
||||
|
||||
//__________________________________________________________
|
||||
|
|
|
@ -38,7 +38,7 @@ func NewAnteHandler(am AccountMapper, fck FeeCollectionKeeper) sdk.AnteHandler {
|
|||
true
|
||||
}
|
||||
|
||||
memo := tx.GetMemo()
|
||||
memo := stdTx.GetMemo()
|
||||
|
||||
if len(memo) > maxMemoCharacters {
|
||||
return ctx,
|
||||
|
@ -85,7 +85,7 @@ func NewAnteHandler(am AccountMapper, fck FeeCollectionKeeper) sdk.AnteHandler {
|
|||
signerAddr, sig := signerAddrs[i], sigs[i]
|
||||
|
||||
// check signature, return account with incremented nonce
|
||||
signBytes := StdSignBytes(ctx.ChainID(), accNums[i], sequences[i], fee, msgs, tx.GetMemo())
|
||||
signBytes := StdSignBytes(ctx.ChainID(), accNums[i], sequences[i], fee, msgs, stdTx.GetMemo())
|
||||
signerAcc, res := processSig(
|
||||
ctx, am,
|
||||
signerAddr, sig, signBytes,
|
||||
|
|
Loading…
Reference in New Issue