Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix TransactionResponse type #38

Merged
merged 1 commit into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions src/__tests__/use-cases/transfers/ether-between-safes.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { faker } from '@faker-js/faker';
import SafeApiKit from '@safe-global/api-kit';
import Safe from '@safe-global/protocol-kit';
import { MetaTransactionData } from '@safe-global/safe-core-sdk-types';
import { Wallet, ethers } from 'ethers';
import { TransactionResponse, Wallet, ethers } from 'ethers';

let eoaSigner: Wallet;
let primarySafeSdkInstance: Safe;
Expand Down Expand Up @@ -98,7 +98,11 @@ describe('Transfers: receive/send native coins between Safes', () => {
const safeTransaction = await apiKit.getTransaction(safeTxHash);
const executeTxResponse =
await primarySafeSdkInstance.executeTransaction(safeTransaction);
await executeTxResponse.transactionResponse?.wait();
if (executeTxResponse.transactionResponse) {
await (
executeTxResponse.transactionResponse as TransactionResponse
).wait();
}

// Check the CGW history contains the transaction
await retry(async () => {
Expand Down
12 changes: 10 additions & 2 deletions src/__tests__/use-cases/transfers/manage-native-coins.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ describe('Transactions cleanup', () => {
const safeTransaction = await apiKit.getTransaction(tx.safeTxHash);
const executeTxResponse =
await sdkInstance.executeTransaction(safeTransaction);
await executeTxResponse.transactionResponse?.wait();
if (executeTxResponse.transactionResponse) {
await (
executeTxResponse.transactionResponse as TransactionResponse
).wait();
}

// Check the CGW history contains the transaction
await retry(async () => {
Expand Down Expand Up @@ -196,7 +200,11 @@ describe('Transfers: receive/send native coins from/to EOA', () => {
const safeTransaction = await apiKit.getTransaction(safeTxHash);
const executeTxResponse =
await sdkInstance.executeTransaction(safeTransaction);
await executeTxResponse.transactionResponse?.wait();
if (executeTxResponse.transactionResponse) {
await (
executeTxResponse.transactionResponse as TransactionResponse
).wait();
}

// Check the CGW history contains the transaction
await retry(async () => {
Expand Down