removed assignment of payer and granter to empty string
This commit is contained in:
parent
d843da4a60
commit
b1bba0911e
@ -79,8 +79,8 @@ async function sendTokens(
|
||||
},
|
||||
];
|
||||
const gasLimit = 200000;
|
||||
const feeGranter = "";
|
||||
const feePayer = "";
|
||||
const feeGranter = undefined;
|
||||
const feePayer = undefined;
|
||||
const authInfoBytes = makeAuthInfoBytes([{ pubkey, sequence }], feeAmount, gasLimit, feeGranter, feePayer);
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
|
||||
@ -203,8 +203,8 @@ describe("CosmWasmClient", () => {
|
||||
};
|
||||
const txBodyBytes = registry.encode(txBody);
|
||||
const gasLimit = Int53.fromString(fee.gas).toNumber();
|
||||
const feeGranter = "";
|
||||
const feePayer = "";
|
||||
const feeGranter = undefined;
|
||||
const feePayer = undefined;
|
||||
const authInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence }],
|
||||
fee.amount,
|
||||
|
||||
@ -582,14 +582,12 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
const signedTxBodyBytes = this.registry.encode(signedTxBody);
|
||||
const signedGasLimit = Int53.fromString(signed.fee.gas).toNumber();
|
||||
const signedSequence = Int53.fromString(signed.sequence).toNumber();
|
||||
const signedFeeGranter = signed.fee.granter == undefined ? "" : signed.fee.granter;
|
||||
const signedFeePayer = signed.fee.payer == undefined ? "" : signed.fee.payer;
|
||||
const signedAuthInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence: signedSequence }],
|
||||
signed.fee.amount,
|
||||
signedGasLimit,
|
||||
signedFeeGranter,
|
||||
signedFeePayer,
|
||||
signed.fee.granter,
|
||||
signed.fee.payer,
|
||||
signMode,
|
||||
);
|
||||
return TxRaw.fromPartial({
|
||||
@ -623,14 +621,12 @@ export class SigningCosmWasmClient extends CosmWasmClient {
|
||||
};
|
||||
const txBodyBytes = this.registry.encode(txBody);
|
||||
const gasLimit = Int53.fromString(fee.gas).toNumber();
|
||||
const feePayer = fee.payer == undefined ? "" : fee.payer;
|
||||
const feeGranter = fee.granter == undefined ? "" : fee.granter;
|
||||
const authInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence }],
|
||||
fee.amount,
|
||||
gasLimit,
|
||||
feeGranter,
|
||||
feePayer,
|
||||
fee.granter,
|
||||
fee.payer,
|
||||
);
|
||||
const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
||||
const { signature, signed } = await this.signer.signDirect(signerAddress, signDoc);
|
||||
|
||||
@ -225,8 +225,8 @@ export class ModifyingDirectSecp256k1HdWallet extends DirectSecp256k1HdWallet {
|
||||
}));
|
||||
const modifiedFeeAmount = coins(3000, "ucosm");
|
||||
const modifiedGasLimit = 333333;
|
||||
const modifiedFeeGranter = "";
|
||||
const modifiedFeePayer = "";
|
||||
const modifiedFeeGranter = undefined;
|
||||
const modifiedFeePayer = undefined;
|
||||
const modifiedSignDoc = {
|
||||
...signDoc,
|
||||
bodyBytes: Uint8Array.from(TxBody.encode(modifiedTxBody).finish()),
|
||||
|
||||
@ -362,14 +362,12 @@ export class SigningStargateClient extends StargateClient {
|
||||
const signedTxBodyBytes = this.registry.encode(signedTxBodyEncodeObject);
|
||||
const signedGasLimit = Int53.fromString(signed.fee.gas).toNumber();
|
||||
const signedSequence = Int53.fromString(signed.sequence).toNumber();
|
||||
const signedFeeGranter = signed.fee.granter == undefined ? "" : signed.fee.granter;
|
||||
const signedFeePayer = signed.fee.payer == undefined ? "" : signed.fee.payer;
|
||||
const signedAuthInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence: signedSequence }],
|
||||
signed.fee.amount,
|
||||
signedGasLimit,
|
||||
signedFeeGranter,
|
||||
signedFeePayer,
|
||||
signed.fee.granter,
|
||||
signed.fee.payer,
|
||||
signMode,
|
||||
);
|
||||
return TxRaw.fromPartial({
|
||||
@ -403,14 +401,12 @@ export class SigningStargateClient extends StargateClient {
|
||||
};
|
||||
const txBodyBytes = this.registry.encode(txBodyEncodeObject);
|
||||
const gasLimit = Int53.fromString(fee.gas).toNumber();
|
||||
const feeGranter = fee.granter == undefined ? "" : fee.granter;
|
||||
const feePayer = fee.payer == undefined ? "" : fee.payer;
|
||||
const authInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence }],
|
||||
fee.amount,
|
||||
gasLimit,
|
||||
feeGranter,
|
||||
feePayer,
|
||||
fee.granter,
|
||||
fee.payer,
|
||||
);
|
||||
const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
||||
const { signature, signed } = await this.signer.signDirect(signerAddress, signDoc);
|
||||
|
||||
@ -74,8 +74,8 @@ async function sendTokens(
|
||||
},
|
||||
];
|
||||
const gasLimit = 200000;
|
||||
const feeGranter = "";
|
||||
const feePayer = "";
|
||||
const feeGranter = undefined;
|
||||
const feePayer = undefined;
|
||||
const authInfoBytes = makeAuthInfoBytes([{ pubkey, sequence }], feeAmount, gasLimit, feeGranter, feePayer);
|
||||
|
||||
const chainId = await client.getChainId();
|
||||
|
||||
@ -364,8 +364,8 @@ describe("StargateClient", () => {
|
||||
const { accountNumber, sequence } = (await client.getSequence(address))!;
|
||||
const feeAmount = coins(2000, "ucosm");
|
||||
const gasLimit = 200000;
|
||||
const feeGranter = "";
|
||||
const feePayer = "";
|
||||
const feeGranter = undefined;
|
||||
const feePayer = undefined;
|
||||
const authInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence }],
|
||||
feeAmount,
|
||||
@ -429,8 +429,8 @@ describe("StargateClient", () => {
|
||||
const { accountNumber, sequence } = (await client.getSequence(address))!;
|
||||
const feeAmount = coins(2000, "ucosm");
|
||||
const gasLimit = 200000;
|
||||
const feeGranter = "";
|
||||
const feePayer = "";
|
||||
const feeGranter = undefined;
|
||||
const feePayer = undefined;
|
||||
const authInfoBytes = makeAuthInfoBytes(
|
||||
[{ pubkey, sequence }],
|
||||
feeAmount,
|
||||
|
||||
@ -234,8 +234,8 @@ export class ModifyingDirectSecp256k1HdWallet extends DirectSecp256k1HdWallet {
|
||||
}));
|
||||
const modifiedFeeAmount = coins(3000, "ucosm");
|
||||
const modifiedGasLimit = 333333;
|
||||
const modifiedFeeGranter = "";
|
||||
const modifiedFeePayer = "";
|
||||
const modifiedFeeGranter = undefined;
|
||||
const modifiedFeePayer = undefined;
|
||||
const modifiedSignDoc = {
|
||||
...signDoc,
|
||||
bodyBytes: Uint8Array.from(TxBody.encode(modifiedTxBody).finish()),
|
||||
|
||||
Loading…
Reference in New Issue
Block a user