From 2723a15cb8a1eafa13615674888bd77b7454a307 Mon Sep 17 00:00:00 2001 From: tornadocontrib Date: Wed, 20 Nov 2024 11:00:07 +0000 Subject: [PATCH] Fixed compatibility with CLI --- lib/services/schema.js | 2 +- src/services/schema.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/schema.js b/lib/services/schema.js index 7d8686a..daffc2f 100644 --- a/lib/services/schema.js +++ b/lib/services/schema.js @@ -106,7 +106,7 @@ function getWithdrawKeyword(netId, rewardAccount) { return false; } // Fee recipient should be a reward account - if (args[3] !== rewardAccount) { + if ((0, ethers_1.getAddress)(args[3]) !== rewardAccount) { return false; } const { amount, currency } = instance; diff --git a/src/services/schema.ts b/src/services/schema.ts index 1c98ff1..bf7df72 100644 --- a/src/services/schema.ts +++ b/src/services/schema.ts @@ -1,4 +1,4 @@ -import { parseUnits } from 'ethers'; +import { getAddress, parseUnits } from 'ethers'; import { NetIdType, @@ -131,7 +131,7 @@ export function getWithdrawKeyword(netId: NetIdType, rewardAccount: string) { } // Fee recipient should be a reward account - if (args[3] !== rewardAccount) { + if (getAddress(args[3]) !== rewardAccount) { return false; }