Skip to content

Commit

Permalink
fix: adjust suggested max fee response type
Browse files Browse the repository at this point in the history
  • Loading branch information
penovicp committed Mar 30, 2023
1 parent 2d7f16e commit 78b1f81
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/account/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
InvocationsSignerDetails,
InvokeFunctionResponse,
MultiDeployContractResponse,
Nonce,
Signature,
TransactionBulk,
TransactionStatus,
Expand Down Expand Up @@ -66,7 +67,7 @@ export class Account extends Provider implements AccountInterface {
: pkOrSigner;
}

public async getNonce(blockIdentifier?: BlockIdentifier): Promise<BigNumberish> {
public async getNonce(blockIdentifier?: BlockIdentifier): Promise<Nonce> {
return super.getNonceForAddress(this.address, blockIdentifier);
}

Expand Down Expand Up @@ -512,7 +513,7 @@ export class Account extends Provider implements AccountInterface {
break;
}

return feeEstimate.suggestedMaxFee.toString();
return feeEstimate.suggestedMaxFee;
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/account/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
InvocationsDetails,
InvokeFunctionResponse,
MultiDeployContractResponse,
Nonce,
Signature,
TransactionBulk,
TransactionSimulation,
Expand Down Expand Up @@ -299,7 +300,7 @@ export abstract class AccountInterface extends ProviderInterface {
* @param {BlockIdentifier} blockIdentifier - optional blockIdentifier. Defaults to 'pending'
* @returns nonce of the account
*/
public abstract getNonce(blockIdentifier?: BlockIdentifier): Promise<BigNumberish>;
public abstract getNonce(blockIdentifier?: BlockIdentifier): Promise<Nonce>;

/**
* Gets Suggested Max Fee based on the transaction type
Expand All @@ -311,7 +312,7 @@ export abstract class AccountInterface extends ProviderInterface {
public abstract getSuggestedMaxFee(
estimateFeeAction: EstimateFeeAction,
details: EstimateFeeDetails
): Promise<BigNumberish>;
): Promise<bigint>;

/**
* Simulates the transaction and returns the transaction trace and estimated fee.
Expand Down

0 comments on commit 78b1f81

Please sign in to comment.