From e6039956039fad548415b218b95809e457be5f2c Mon Sep 17 00:00:00 2001 From: Matt Kocubinski Date: Thu, 11 May 2023 09:48:43 -0500 Subject: [PATCH] chore(x/auth): deprecate legacy aminojson sign mode --- x/auth/migrations/legacytx/stdsign.go | 1 + x/auth/tx/legacy_amino_json.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/x/auth/migrations/legacytx/stdsign.go b/x/auth/migrations/legacytx/stdsign.go index 5e31a88f6126..dbe044713950 100644 --- a/x/auth/migrations/legacytx/stdsign.go +++ b/x/auth/migrations/legacytx/stdsign.go @@ -45,6 +45,7 @@ type StdSignDoc struct { } // StdSignBytes returns the bytes to sign for a transaction. +// Deprecated: Please use x/tx/signing/aminojson instead. func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string, tip *tx.Tip) []byte { msgsBytes := make([]json.RawMessage, 0, len(msgs)) for _, msg := range msgs { diff --git a/x/auth/tx/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 1be6ce542f81..3d7f1efcae0c 100644 --- a/x/auth/tx/legacy_amino_json.go +++ b/x/auth/tx/legacy_amino_json.go @@ -22,18 +22,22 @@ type signModeLegacyAminoJSONHandler struct{} // NewSignModeLegacyAminoJSONHandler returns a new signModeLegacyAminoJSONHandler. // Note: The public constructor is only used for testing. +// Deprecated: Please use x/tx/signing/aminojson instead. func NewSignModeLegacyAminoJSONHandler() signing.SignModeHandler { return signModeLegacyAminoJSONHandler{} } +// Deprecated: Please use x/tx/signing/aminojson instead. func (s signModeLegacyAminoJSONHandler) DefaultMode() signingtypes.SignMode { return signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON } +// Deprecated: Please use x/tx/signing/aminojson instead. func (s signModeLegacyAminoJSONHandler) Modes() []signingtypes.SignMode { return []signingtypes.SignMode{signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON} } +// Deprecated: Please use x/tx/signing/aminojson instead. func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, data signing.SignerData, tx sdk.Tx) ([]byte, error) { if mode != signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON { return nil, fmt.Errorf("expected %s, got %s", signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, mode)