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

Fix secretcli tx authz grant for Ledger #1173

Open
assafmo opened this issue Sep 12, 2022 · 0 comments
Open

Fix secretcli tx authz grant for Ledger #1173

assafmo opened this issue Sep 12, 2022 · 0 comments

Comments

@assafmo
Copy link
Member

assafmo commented Sep 12, 2022

$ secretcli version --long

version: 1.4.0-beta.5

$ secretcli tx authz grant \
secret1mpf7w0yyz9n3dh42un2zqu2dmsqv7dhkdlh78e generic \
--msg-type /cosmos.gov.v1beta1.MsgVote \
--expiration 1694386800 \
--chain-id pulsar-2 \
--node https://rpc.pulsar.scrttestnet.com \
--gas auto --gas-prices 0.025uscrt \
--gas-adjustment 1.5 \
--from ecostake-test-ledger

raw_log: 'signature verification failed; please verify account number (65436), sequence
  (0) and chain-id (pulsar-2): unable to verify single signer signature 3e32eb70529cd138db03663c83a696e08248385f75dd4df6b2c46404d332ffde17e7c93c30c48e3a9fa823957527ab4f74902aa825a229e06946cc1951961e07
  for signBytes 7b226163636f756e745f6e756d626572223a223635343336222c22636861696e5f6964223a2270756c7361722d32222c22666565223a7b22616d6f756e74223a5b7b2....

This happens because this calls this which encodes msg.Grant.Authorization as protobuf regardless of SIGN_MODE.
Ledger account can only sign using SIGN_MODE_LEGACY_AMINO_JSON, so we need to check for sign mode and encode appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant