signer._signTypedData no working in autotask for injected Relayer

Hey @Jason_Maier,

We just released a new Defender version that includes the ability to execute the signTypedData inside the Defender Autotask. I apologize for the delay with this as we didn't notice it wasn't included in the Autotask environment.

Here's a minimal script using the feature within an Autotask:

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

// All properties on a domain are optional
const domain = {
  name: "Ether Mail",
  version: "1",
  chainId: 1,
  verifyingContract: "0xCcCCccccCCCCcCCCCCCcCcCccCcCCCcCcccccccC",
};

// The named list of all type definitions
const types = {
  Person: [
    { name: "name", type: "string" },
    { name: "wallet", type: "address" },
  ],
  Mail: [
    { name: "from", type: "Person" },
    { name: "to", type: "Person" },
    { name: "contents", type: "string" },
  ],
};

// The data to sign
const value = {
  from: {
    name: "Cow",
    wallet: "0xCD2a3d9F938E13CD947Ec05AbC7FE734Df8DD826",
  },
  to: {
    name: "Bob",
    wallet: "0xbBbBBBBbbBBBbbbBbbBbbbbBBbBbbbbBbBbbBBbB",
  },
  contents: "Hello, Bob!",
};

exports.handler = async function(event) {
  const provider = new DefenderRelayProvider(event);
  const signer = new DefenderRelaySigner(event, provider, { speed: 'fast' });

  const signerAddress = await signer.getAddress();

  const signature = await signer._signTypedData(domain, types, value);

  const verifiedAddress = ethers.utils.verifyTypedData(
    domain,
    types,
    value,
    signature
  );

  return ethers.utils.getAddress(signerAddress) ===
      ethers.utils.getAddress(verifiedAddress)
}

Hope this helps,
Best