Merge branch 'feature/fix-token-transfer-addr-checksums' into develop

This commit is contained in:
Willian Mitsuda 2021-07-03 17:20:39 -03:00
commit fde14e878a
1 changed files with 7 additions and 6 deletions

View File

@ -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,
});
}