Defender Relay Client Ethers Issue

:computer: Environment

Node: 16.15.1
defender-relay-client: 1.27.0
ethers: 5.6.9

:memo:Details

Hi,

I'm currently experiencing an issue with defender-relay-client ethers signer that prevents any evm calls. It works fine with the standard Relayer class, but the ethers signer just returns undefined on any method.

:1234: Code to reproduce

const {
  DefenderRelayProvider,
  DefenderRelaySigner,
} = require("defender-relay-client/lib/ethers");
const { Relayer } = require("defender-relay-client");
const { Contract } = require("ethers");

const credentials = {
  apiKey: "xxx",
  apiSecret: "xxx",
};

function getOzRelayerSigner() {
  const provider = new DefenderRelayProvider(credentials);
  const signer = new DefenderRelaySigner(credentials, provider, {
    speed: "fast",
  });
  return signer;
}

async function main() {
  const re = new Relayer(credentials);
  console.log(await re.getRelayer()); // works fine

  const relayer = getOzRelayerSigner();
  console.log(await relayer.getAddress()); // returns undefined
  console.log(await relayer.getTransactionCount()); // invalid bignumber value
}

main();

Hey @farreldarian, thanks for reporting this!

I've tested it myself and I can confirm the behavior is what you mention. It seems like it's a client upgrade we recently did from version >1.26.0

I'll see what happened and send a fix for this. In the midtime, you can downgrade to version 1.25.0 and everything should work as expected.

Best!

Hi,

I've downgraded to 1.25.0 and it works.

Thanks for the help!

Always a pleasure.

We've just released a new Defender Client version with a fix, so you should be able to upgrade to >=1.27.1 without issues.

Best!