Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: enable sign mode textual by default #15970

Merged
merged 15 commits into from
Jun 1, 2023
Next Next commit
feat: enable sign mode textual by default
  • Loading branch information
facundomedica committed Apr 27, 2023
commit 7db25635bf8c5fc3bc386b0b2cadafddb4d82825
6 changes: 0 additions & 6 deletions client/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,12 +280,6 @@ func readTxCommandFlags(clientCtx Context, flagSet *pflag.FlagSet) (Context, err

clientCtx = clientCtx.WithFrom(from).WithFromAddress(fromAddr).WithFromName(fromName)

// TODO Remove this once SIGN_MODE_TEXTUAL is released
// ref: https://github.com/cosmos/cosmos-sdk/issues/11970
if keyType == keyring.TypeLedger && clientCtx.SignModeStr == flags.SignModeTextual {
return clientCtx, fmt.Errorf("SIGN_MODE_TEXTUAL is currently not supported, please follow https://github.com/cosmos/cosmos-sdk/issues/11970")
}

// If the `from` signer account is a ledger key, we need to use
// SIGN_MODE_AMINO_JSON, because ledger doesn't support proto yet.
// ref: https://github.com/cosmos/cosmos-sdk/issues/8109
Expand Down
8 changes: 2 additions & 6 deletions x/auth/tx/mode_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"cosmossdk.io/x/tx/signing/direct"
"cosmossdk.io/x/tx/signing/directaux"
"cosmossdk.io/x/tx/signing/textual"

signingtypes "github.com/cosmos/cosmos-sdk/types/tx/signing"
)

Expand All @@ -25,12 +26,7 @@ var DefaultSignModes = []signingtypes.SignMode{
signingtypes.SignMode_SIGN_MODE_DIRECT,
signingtypes.SignMode_SIGN_MODE_DIRECT_AUX,
signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON,
// We currently don't add SIGN_MODE_TEXTUAL as part of the default sign
// modes, as it's not released yet (including the Ledger app). However,
// textual's sign mode handler is already available in this package. If you
// want to use textual for **TESTING** purposes, feel free to create a
// handler that includes SIGN_MODE_TEXTUAL.
// ref: Tracking issue for SIGN_MODE_TEXTUAL https://github.com/cosmos/cosmos-sdk/issues/11970
signingtypes.SignMode_SIGN_MODE_TEXTUAL,
}

// makeSignModeHandler returns the default protobuf SignModeHandler supporting
Expand Down