Adjust withdraw function and listing valid deposits by wallet address, also remove cancel deposit option and use a fixed amount to withdraw while there isn't a input to inform it

This commit is contained in:
RcleydsonR
2023-02-01 23:49:13 -03:00
parent 11499661ea
commit 3340155a3d
5 changed files with 23 additions and 33 deletions

View File

@@ -84,10 +84,13 @@ const cancelDeposit = async (depositId: BigNumber): Promise<any> => {
return cancel;
};
const withdrawDeposit = async (depositId: BigNumber): Promise<any> => {
const withdrawDeposit = async (
depositId: BigNumber,
amount: string
): Promise<any> => {
const contract = getContract();
const withdraw = await contract.withdraw(depositId, []);
const withdraw = await contract.withdraw(depositId, amount, []);
await withdraw.wait();
return withdraw;