diff --git a/packages/api-kit/src/types/safeTransactionServiceTypes.ts b/packages/api-kit/src/types/safeTransactionServiceTypes.ts index 755e4995c..d96bf883e 100644 --- a/packages/api-kit/src/types/safeTransactionServiceTypes.ts +++ b/packages/api-kit/src/types/safeTransactionServiceTypes.ts @@ -297,13 +297,10 @@ export type SafeOperationConfirmation = { readonly signatureType: string } -export type SafeOperationResponse = { - readonly created: string - readonly modified: string +export type UserOperationResponse = { readonly ethereumTxHash: string readonly sender: string readonly userOperationHash: string - readonly safeOperationHash: string readonly nonce: number readonly initCode: null | string readonly callData: null | string @@ -316,11 +313,18 @@ export type SafeOperationResponse = { readonly paymasterData: null | string readonly signature: string readonly entryPoint: string +} + +export type SafeOperationResponse = { + readonly created: string + readonly modified: string + readonly safeOperationHash: string readonly validAfter: string readonly validUntil: string readonly moduleAddress: string readonly confirmations?: Array readonly preparedSignature?: string + readonly userOperation?: UserOperationResponse } export type GetSafeOperationListProps = { diff --git a/packages/api-kit/tests/e2e/getSafeOperationsByAddress.test.ts b/packages/api-kit/tests/e2e/getSafeOperationsByAddress.test.ts index 3120ba181..0cf2e02b4 100644 --- a/packages/api-kit/tests/e2e/getSafeOperationsByAddress.test.ts +++ b/packages/api-kit/tests/e2e/getSafeOperationsByAddress.test.ts @@ -41,27 +41,29 @@ describe('getSafeOperationsByAddress', () => { safeOperations.results.every((safeOperation) => { chai.expect(safeOperation).to.have.property('created') chai.expect(safeOperation).to.have.property('modified') - chai.expect(safeOperation).to.have.property('ethereumTxHash') - chai.expect(safeOperation).to.have.property('sender').to.eq(SAFE_ADDRESS) - chai.expect(safeOperation).to.have.property('userOperationHash') chai.expect(safeOperation).to.have.property('safeOperationHash') - chai.expect(safeOperation).to.have.property('nonce') - chai.expect(safeOperation).to.have.property('initCode') - chai.expect(safeOperation).to.have.property('callData') - chai.expect(safeOperation).to.have.property('callDataGasLimit') - chai.expect(safeOperation).to.have.property('verificationGasLimit') - chai.expect(safeOperation).to.have.property('preVerificationGas') - chai.expect(safeOperation).to.have.property('maxFeePerGas') - chai.expect(safeOperation).to.have.property('maxPriorityFeePerGas') - chai.expect(safeOperation).to.have.property('paymaster') - chai.expect(safeOperation).to.have.property('paymasterData') - chai.expect(safeOperation).to.have.property('signature') - chai.expect(safeOperation).to.have.property('entryPoint') chai.expect(safeOperation).to.have.property('validAfter') chai.expect(safeOperation).to.have.property('validUntil') chai.expect(safeOperation).to.have.property('moduleAddress') chai.expect(safeOperation).to.have.property('confirmations').to.be.an('array') chai.expect(safeOperation).to.have.property('preparedSignature') + chai.expect(safeOperation).to.have.property('userOperation') + + chai.expect(safeOperation.userOperation).to.have.property('ethereumTxHash') + chai.expect(safeOperation.userOperation).to.have.property('sender').to.eq(SAFE_ADDRESS) + chai.expect(safeOperation.userOperation).to.have.property('userOperationHash') + chai.expect(safeOperation.userOperation).to.have.property('nonce') + chai.expect(safeOperation.userOperation).to.have.property('initCode') + chai.expect(safeOperation.userOperation).to.have.property('callData') + chai.expect(safeOperation.userOperation).to.have.property('callDataGasLimit') + chai.expect(safeOperation.userOperation).to.have.property('verificationGasLimit') + chai.expect(safeOperation.userOperation).to.have.property('preVerificationGas') + chai.expect(safeOperation.userOperation).to.have.property('maxFeePerGas') + chai.expect(safeOperation.userOperation).to.have.property('maxPriorityFeePerGas') + chai.expect(safeOperation.userOperation).to.have.property('paymaster') + chai.expect(safeOperation.userOperation).to.have.property('paymasterData') + chai.expect(safeOperation.userOperation).to.have.property('signature') + chai.expect(safeOperation.userOperation).to.have.property('entryPoint') }) }) })