Add verify network liquidity method

Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
RcleydsonR 2023-01-17 19:25:22 -03:00
parent 668acb5cfa
commit 2cbf475e09

View File

@ -0,0 +1,17 @@
const verifyNetworkLiquidity = (tokenValue: number, walletAddress: string, validDepositList: any[]) => {
const element = validDepositList.find((element) => {
const remaining = element.remaining;
if (
tokenValue!! <= remaining &&
tokenValue!! != 0 &&
element.seller !== walletAddress
) {
return true;
}
return false;
});
return element
}
export { verifyNetworkLiquidity }