Closed z497688734 closed 1 year ago
Can you give me a webpage that I can use, or show me the "console" part in "Inspect" after right-clicking on the extension?
Can you give me a webpage that I can use, or show me the "console" part in "Inspect" after right-clicking on the extension?
Thank you for your reply. https://github.com/z497688734/glitter-wallet-keplr.git ,
this code can work well in previous version of keplr can can not work in new version(12)
you can down the code and run it . 1 npm install , 2 npm run dev . node14 or node18 is ok.
const authInfoBytes = makeAuthInfoBytes([{ pubkey: pubk, sequence }], "1000000000000000agli", gasLimit);
If you look at this part, feeAmount is entered incorrectly. Perhaps [{denom:"agli", amount: "1000000000000000"}]
was your intent. The difference between 1.0 and 2.0 comes from improvements in the logic, but it's not wrong that 2.0 throws an error because you asked for a signature in the wrong form.
const authInfoBytes = makeAuthInfoBytes([{ pubkey: pubk, sequence }], "1000000000000000agli", gasLimit);
If you look at this part, feeAmount is entered incorrectly. Perhaps[{denom:"agli", amount: "1000000000000000"}]
was your intent. The difference between 1.0 and 2.0 comes from improvements in the logic, but it's not wrong that 2.0 throws an error because you asked for a signature in the wrong form.
yes it work well now;thanks very much.
const pubk = Any.fromPartial({ typeUrl: "/ethermint.crypto.v1.ethsecp256k1.PubKey", value: PubKey.encode({ key: pubkeyBytes }).finish(), }) let sequence = 2 let gasLimit = 100000000 const authInfoBytes = makeAuthInfoBytes([{ pubkey: pubk, sequence }], "1000000000000000abc", gasLimit); console.log("authInfoBytes:",authInfoBytes) const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, 23); const { signature, signed } = await signer.signDirect(address, signDoc); console.log("signature:",signature) const a = TxRaw.encode({ bodyBytes: signed.bodyBytes, authInfoBytes: signed.authInfoBytes, signatures: [fromBase64(signature.signature)], }).finish()