withdraw integration

This commit is contained in:
brunoedcf
2023-02-11 19:47:39 -03:00
parent 0f42733c08
commit c27dde4dfe
8 changed files with 116 additions and 122 deletions

View File

@@ -64,11 +64,21 @@ const listAllTransactionByWalletAddress = async (
filterReleasedLocks
);
return [...eventsDeposits, ...eventsAddedLocks, ...eventsReleasedLocks].sort(
(a, b) => {
return b.blockNumber - a.blockNumber;
}
const filterWithdrawnDeposits = p2pContract.filters.DepositWithdrawn([
walletAddress,
]);
const eventsWithdrawnDeposits = await p2pContract.queryFilter(
filterWithdrawnDeposits
);
return [
...eventsDeposits,
...eventsAddedLocks,
...eventsReleasedLocks,
...eventsWithdrawnDeposits,
].sort((a, b) => {
return b.blockNumber - a.blockNumber;
});
};
// get wallet's release transactions