Repay ERC20 Loan
SmartCredit.io Borrowing SDK - doERC20Repayment() repays an active ERC20-denominated loan using the outstanding balance from the loan record.
Last updated:
async doERC20Repayment()
Repaying ERC20 loan you should use:
The outstandingBalance and contractAddress information you will get after getting a successful response from Single Loan.
loan:interface– is the loanData interface explained at Loan RequestwalletAddress:string- is the address of the user.
const response = await this.newBorrowingService. doERC20Repayment(
loan.outstandingBalance, loan.creditLine.contractAddress,
loan, walletAddress
)