chainapsis / keplr-wallet

The most powerful wallet for the Cosmos ecosystem and the Interchain
https://www.keplr.app
Other
778 stars 464 forks source link

Issue not found init_funds, sent_funds on Instantiate/Execute using @cosmjs/cosmwasm-stargate #139

Closed gyuguen closed 3 years ago

gyuguen commented 3 years ago

Hello, I'm signing on keplr using @cosmjs/cosmwasm-stargate.

There is one issue of signing. I found that the funds variable has changed in a recent version of @cosmjs/cosmwasm-stargate

init_funds -> funds
sent_funds -> funds

Source Code @cosmjs/cosmwasm-stargate: https://github.com/cosmos/cosmjs/blob/v0.25.0/packages/cosmwasm-stargate/src/aminotypes.ts keplr-extension: https://github.com/chainapsis/keplr-extension/blob/dcc3b3cf0569ac57f3d68f0e736d1a65b012c980/packages/extension/src/pages/sign/amino.tsx#L105

Point of change https://github.com/cosmos/cosmjs/commit/707cc7c8a5dc314b158ef1fc4ad2f544df47d07a#diff-0b7e9b939bbe81ffa7d11ae0e24aec50858f81682379f1ad273102e1027404c5L61

Do you have any plans or solutions?

giansalex commented 3 years ago

@gyuguen which code are you using? I have this example to send txs with cosmwasm-stargate 0.25x https://github.com/giansalex/juno-cw20/blob/master/src/main.js#L93

gyuguen commented 3 years ago

Thank you for your answer. I had a problem using window.getOfflineSignerOnlyAmigo(chainId);. I will create and share an example related to this.

gyuguen commented 3 years ago

Hello, I solved the problem while making an example.

My problem occurred in a local environment and initially failed with window.getOfflineSigner(chainId), so I used window.offlineSignerOnlyAmino(chainId)

However, to create an example, I found that DirectSign was functioning normally with window.getOfflineSigner(chainId) while linking to Testnet.

The problem happened in the local environment when my accountNumber was zero.

If the account number is zero, I wonder if the signature method is different. There's nothing wrong with anything else. Thank you again for your help.