How to get result from transaction submitted through defender-relay-client

How can I get the result of the transaction submitted to relay with ethers?

:computer: Environment

"defender-relay-client": "^1.39.0",
"ethers": "^6.0.5",
"next": "13.1.6",
"react": "18.2.0",
typescript

:memo:Details

I'm submitting ok the transaction to relay using defender-relay-client but
tx.wait() afterward returns an error about a time out.

:1234: Code to reproduce

As described in https://docs.openzeppelin.com/defender/relay#using-ethers.js :

const erc20 = new ethers.Contract(ERC20_ADDRESS, ERC20_ABI, signer);
const tx = await erc20.transfer(beneficiary, 1e18.toString());
const mined = await tx.wait();

Transaction submitted ok but tx.wait returns error:

error - unhandledRejection: TypeError: receipt.confirmations is not a function
    at DefenderRelayProvider.txListener (/.....ethers/lib.commonjs/providers/provider.js:743:36)
    at Timeout._onTimeout (/..........@ethersproject/providers/lib/base-provider.js:2510:32)
    at listOnTimeout (node:internal/timers:569:17)
    at process.processTimers (node:internal/timers:512:7)

Have you tried put the same ethers version indicated in the docs?

In the docs say there using version 5.5.3

Yes, I would try to align the version - that error you are seeing seems like potentially a breaking change that was introduced in version 6

I've had the same problem. The issue is ethers.js v6 changed confirmations from a number in v5 to a promise that resolves a number.

Ethers v5 TransactionResponse

Ethers v6 TransactionResponse

Are there plans for the defender SDK to support Ethers v6?
I'm using @openzeppelin/defender-sdk v1.9.0