Add verify network liquidity method
Co-authored-by: brunoedcf <brest.dallacosta@outlook.com>
This commit is contained in:
parent
668acb5cfa
commit
2cbf475e09
17
src/utils/networkLiquidity.ts
Normal file
17
src/utils/networkLiquidity.ts
Normal 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 }
|
Loading…
x
Reference in New Issue
Block a user