diff --git a/src/Transaction.tsx b/src/Transaction.tsx index b6c7f0f..2d95833 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), }); } @@ -216,8 +217,8 @@ const Transaction: React.FC = () => { const _transfers: Transfer[] = []; for (const t of r) { _transfers.push({ - from: t.from, - to: t.to, + from: ethers.utils.getAddress(t.from), + to: ethers.utils.getAddress(t.to), value: t.value, }); }