Skip to content

Commit

Permalink
fix: rename txVersion to version
Browse files Browse the repository at this point in the history
  • Loading branch information
janek26 authored and MilGard91 committed Apr 7, 2022
1 parent 2f7cb3f commit 2ae36b2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ export class Account extends Provider implements AccountInterface {
walletAddress: this.address,
nonce: toBN(nonce),
maxFee: toBN('0'),
txVersion: version,
version,
};
const signature = await this.signer.signTransaction(transactions, signerDetails);

Expand Down Expand Up @@ -101,7 +101,7 @@ export class Account extends Provider implements AccountInterface {
walletAddress: this.address,
nonce,
maxFee,
txVersion: toBN(transactionVersion),
version: toBN(transactionVersion),
};

const signature = await this.signer.signTransaction(transactions, signerDetails, abis);
Expand Down
2 changes: 1 addition & 1 deletion src/signer/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class Signer implements SignerInterface {
transactions,
transactionsDetail.nonce.toString(),
transactionsDetail.maxFee.toString(),
transactionsDetail.txVersion.toString()
transactionsDetail.version.toString()
);

return sign(this.keyPair, msgHash);
Expand Down
2 changes: 1 addition & 1 deletion src/types/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export type Call = Omit<Invocation, 'signature'>;
export type InvocationsDetails = {
nonce?: BigNumberish;
maxFee?: BigNumberish;
txVersion?: BigNumberish;
version?: BigNumberish;
};

export type Status =
Expand Down
4 changes: 2 additions & 2 deletions src/utils/hash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function hashMulticall(
transactions: Call[],
nonce: string,
maxFee: string,
txVersion: string | number = transactionVersion
version: string | number = transactionVersion
) {
const hashArray = transactions
.map(({ contractAddress, entrypoint, calldata }) => [
Expand All @@ -87,6 +87,6 @@ export function hashMulticall(
computeHashOnElements(hashArray),
nonce,
maxFee,
txVersion,
version,
]);
}

0 comments on commit 2ae36b2

Please sign in to comment.