Finschia / finschia-js

finschia-js is javascript sdk for Finschia
Apache License 2.0
7 stars 4 forks source link

Amino encode not support some special char(<, >, $). #63

Closed hyenjong-yoo closed 1 year ago

hyenjong-yoo commented 1 year ago

AS-IS

When Tx memo contain special characters (<, >, $), Amino sign does not working

Step1. Write Tx with memo within special char. ex) "Tx & Send" Step2. Sign with Secp256k1HdWallet

Result. Error: Broadcasting transaction failed with code 4 (codespace: sdk). Log: signature verification failed; please verify account number (14), sequence (381) and chain-id (finschia-qa-v0.7.0-rc1): unauthorized at SigningFinschiaClient.broadcastTx (node_modules/@lbmjs/finschia/src/finschiaclient.ts:383:9) at processTicksAndRejections (node:internal/process/task_queues:96:5)

TO-BE

These special char support to DirectSecp256k1HdWallet So,Have to support to DirectSecp256k1HdWallet

loin3 commented 1 year ago

keplr-wallet already dealt with this problem, but did not contributed to cosmjs. https://github.com/chainapsis/keplr-wallet/blob/master/packages/common/src/escape/index.ts#L8

loin3 commented 1 year ago

This issue should be fixed in @cosmjs/amino so I create PR in cosmjs https://github.com/cosmos/cosmjs/pull/1373

loin3 commented 1 year ago

This issue is being developed in https://github.com/cosmos/cosmjs/pull/1388

loin3 commented 1 year ago

cosmjs 0.30.1 which fixed this issue has been released. So I will close this issue and add bump up cosmjs issue.

83