From 8be498b97d5355b3ec7a2c139a3f38d25e63a6c0 Mon Sep 17 00:00:00 2001 From: Pablo Maldonado Date: Wed, 11 Dec 2024 17:38:46 -0600 Subject: [PATCH] feat(api): fix tests types Signed-off-by: Pablo Maldonado --- test/api/relayer-config.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/api/relayer-config.test.ts b/test/api/relayer-config.test.ts index a8d6200da..9faa9602a 100644 --- a/test/api/relayer-config.test.ts +++ b/test/api/relayer-config.test.ts @@ -1,7 +1,10 @@ import { VercelResponse } from "@vercel/node"; import { ethers } from "ethers"; import * as utils from "../../api/_exclusivity/utils"; -import { TypedRelayerConfigUpdateRequest } from "../../api/_types"; +import { + RelayerConfigUpdate, + TypedRelayerConfigUpdateRequest, +} from "../../api/_types"; import handler from "../../api/relayer-config"; const { MAX_MESSAGE_AGE_SECONDS } = utils; @@ -26,8 +29,9 @@ describe("Relayer Config API", () => { }); test("POST request with valid timestamp", async () => { - const message = { + const message: RelayerConfigUpdate = { timestamp: Date.now() / 1000, + relayerFillLimits: [], }; const messageString = JSON.stringify(message); const signature = await whitelistedRelayer.signMessage(messageString); @@ -46,8 +50,9 @@ describe("Relayer Config API", () => { }); test("POST request with invalid timestamp", async () => { - const message = { + const message: RelayerConfigUpdate = { timestamp: Date.now() / 1000 - MAX_MESSAGE_AGE_SECONDS - 1, + relayerFillLimits: [], }; const signature = await whitelistedRelayer.signMessage( JSON.stringify(message) @@ -68,8 +73,9 @@ describe("Relayer Config API", () => { }); test("POST request with invalid signature", async () => { - const message = { + const message: RelayerConfigUpdate = { timestamp: Date.now() / 1000, + relayerFillLimits: [], }; const signature = await unauthorizedRelayer.signMessage( JSON.stringify(message)