cosmwasm: Update for new OfflineSigner
This commit is contained in:
parent
c1cf37380e
commit
798d79b00e
@ -107,7 +107,7 @@ describe("CosmWasmClient.searchTx", () => {
|
||||
const { accountNumber, sequence } = await client.getSequence();
|
||||
const chainId = await client.getChainId();
|
||||
const signDoc = makeSignDoc([sendMsg], fee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.sign(alice.address0, signDoc);
|
||||
const { signed, signature } = await wallet.signAmino(alice.address0, signDoc);
|
||||
const tx: WrappedStdTx = {
|
||||
type: "cosmos-sdk/StdTx",
|
||||
value: makeStdTx(signed, signature),
|
||||
|
||||
@ -240,7 +240,7 @@ describe("CosmWasmClient", () => {
|
||||
const chainId = await client.getChainId();
|
||||
const { accountNumber, sequence } = await client.getSequence(alice.address0);
|
||||
const signDoc = makeSignDoc([sendMsg], fee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await wallet.sign(alice.address0, signDoc);
|
||||
const { signed, signature } = await wallet.signAmino(alice.address0, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
const result = await client.broadcastTx(signedTx);
|
||||
assertIsBroadcastTxSuccess(result);
|
||||
|
||||
@ -126,7 +126,7 @@ async function executeContract(
|
||||
|
||||
const { account_number, sequence } = (await client.auth.account(alice.address0)).result.value;
|
||||
const signDoc = makeSignDoc([theMsg], fee, wasmd.chainId, memo, account_number, sequence);
|
||||
const { signed, signature } = await signer.sign(alice.address0, signDoc);
|
||||
const { signed, signature } = await signer.signAmino(alice.address0, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
return client.broadcastTx(signedTx);
|
||||
}
|
||||
|
||||
@ -361,7 +361,7 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
const { accountNumber, sequence } = await this.getSequence();
|
||||
const chainId = await this.getChainId();
|
||||
const signDoc = makeSignDoc(msgs, fee, chainId, memo, accountNumber, sequence);
|
||||
const { signed, signature } = await this.signer.sign(this.senderAddress, signDoc);
|
||||
const { signed, signature } = await this.signer.signAmino(this.senderAddress, signDoc);
|
||||
const signedTx = makeStdTx(signed, signature);
|
||||
return this.broadcastTx(signedTx);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user