Skip to content

Commit

Permalink
Merge pull request #190 from jayden-sudo/develop
Browse files Browse the repository at this point in the history
Fixed some bugs
  • Loading branch information
jayden-sudo authored Sep 26, 2024
2 parents 54caf16 + 03f6c19 commit ebeecc5
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .changeset/modern-pumas-marry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@soulwallet/sdk": patch
---

Fixed some bugs
2 changes: 1 addition & 1 deletion packages/soulwallet-sdk/src/bundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export class Bundler implements IBundler {
}
}

async eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: StateOverride): Promise<Result<UserOpGas, UserOpErrors>> {
async eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: Record<string, StateOverride>): Promise<Result<UserOpGas, UserOpErrors>> {
try {
const params = [
JSON.parse(userOperationToJSON(userOp)),
Expand Down
2 changes: 1 addition & 1 deletion packages/soulwallet-sdk/src/interface/IBundler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export abstract class IBundler {
* @return {*} {Promise<Result<UserOpGas, UserOpErrors>>}
* @memberof IBundler
*/
abstract eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: StateOverride): Promise<Result<UserOpGas, UserOpErrors>>;
abstract eth_estimateUserOperationGas(entryPoint: string, userOp: UserOperation, stateOverride?: Record<string, StateOverride>): Promise<Result<UserOpGas, UserOpErrors>>;

/**
*
Expand Down
4 changes: 2 additions & 2 deletions packages/soulwallet-sdk/src/interface/ISoulWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ export abstract class ISoulWallet {
* @abstract
* @param {string} validatorAddress validator contract address
* @param {UserOperation} userOp UserOperation
* @param {StateOverride} [stateOverride]
* @param {Record<string, StateOverride>} [stateOverride] stateOverride
* @param {SignkeyType} [signkeyType] default: SignkeyType.EOA
* @param {GuardHookInputData} [semiValidGuardHookInputData] sender: wallet address, inputData: key: guardHookPlugin address, value: input data
* @return {*} {Promise<Result<UserOpGas, UserOpErrors>>}
* @memberof ISoulWallet
*/
abstract estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: StateOverride, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise<Result<UserOpGas, UserOpErrors>>;
abstract estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: Record<string, StateOverride>, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise<Result<UserOpGas, UserOpErrors>>;

/**
* broadcast the userOp.
Expand Down
2 changes: 1 addition & 1 deletion packages/soulwallet-sdk/src/soulWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ export class SoulWallet implements ISoulWallet {
return new Ok(signatureRet.OK);
}

async estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: StateOverride, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise<Result<UserOpGas, UserOpErrors>> {
async estimateUserOperationGas(validatorAddress: string, userOp: UserOperation, stateOverride?: Record<string, StateOverride>, signkeyType?: SignkeyType, semiValidGuardHookInputData?: GuardHookInputData): Promise<Result<UserOpGas, UserOpErrors>> {
const semiValidSignature = userOp.signature === "0x";
const _onChainConfig = await this.getOnChainConfig();
if (_onChainConfig.isErr() === true) {
Expand Down

0 comments on commit ebeecc5

Please sign in to comment.