Skip to content

Commit

Permalink
🚨 server: remove any type & non-null assert usage
Browse files Browse the repository at this point in the history
  • Loading branch information
nfmelendez committed Sep 27, 2024
1 parent a85b4b4 commit 7fc8507
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions server/test/hooks/cryptomate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,17 +138,25 @@ describe("authorization", () => {

const [transferTopic] = encodeEventTopics({ abi: erc20Abi, eventName: "Transfer" });
const transferLog = {
address: usdcAddress.toLowerCase(),
topics: [
transferTopic,
padHex(parse(Hex, "0xe0b89008304552823335Dc2d99783B9Ed74b1107".toLowerCase())),
padHex(parse(Hex, process.env.COLLECTOR_ADDRESS!.toLowerCase())),
],
address: parse(Hex, usdcAddress.toLowerCase()),
topics: [],
data: padHex(toHex(4 * 1e6)),
position: "0x0",
position: parse(Hex, "0x0"),
};

traceCall.mockResolvedValueOnce({ ...baseCallFrame, logs: [transferLog as any] });
traceCall.mockResolvedValueOnce({
...baseCallFrame,
logs: [
{
...transferLog,
topics: [
parse(Hex, transferTopic),
padHex(parse(Hex, "0xe0b89008304552823335Dc2d99783B9Ed74b1107".toLowerCase())),
padHex(parse(Hex, process.env.COLLECTOR_ADDRESS?.toLowerCase())),
],
},
],
});

const response = await appClient.index.$post({
...authorization,
Expand Down

0 comments on commit 7fc8507

Please sign in to comment.