From a852418cb6782909df9fb3a829417531c7010a8f Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Sat, 3 Jul 2021 17:17:47 -0300 Subject: [PATCH] Fix token transfer addresses checksum --- src/Transaction.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Transaction.tsx b/src/Transaction.tsx index b6c7f0f..cbf149d 100644 --- a/src/Transaction.tsx +++ b/src/Transaction.tsx @@ -106,11 +106,12 @@ const Transaction: React.FC = () => { } tokenTransfers.push({ token: l.address, - from: ethers.utils.hexDataSlice( - ethers.utils.arrayify(l.topics[1]), - 12 + from: ethers.utils.getAddress( + ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[1]), 12) + ), + to: ethers.utils.getAddress( + ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[2]), 12) ), - to: ethers.utils.hexDataSlice(ethers.utils.arrayify(l.topics[2]), 12), value: BigNumber.from(l.data), }); }