check_allowance
Verify TRC20 token approval for a JustLend jToken market. Returns human-readable allowance to compare with supply or repay amount, indicating if sufficient.
Instructions
Check if the underlying TRC20 token has been approved for a jToken market. Must be approved before supply() or repay() for TRC20 markets. Not needed for jTRX. The returned 'allowance' is in human-readable token units (e.g. '1' means 1 USDT, not 1 raw unit). Compare it directly with the amount the user wants to supply/repay. 'allowanceUnit' indicates the token symbol.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| amount | No | Amount to check sufficiency against (human-readable, e.g. '0.5'). If provided, returns whether allowance is sufficient. | |
| market | Yes | jToken symbol (e.g. 'jUSDT') | |
| address | No | Address to check. Default: configured wallet | |
| network | No | Network. Default: mainnet |