getCollateralAllowance
Read the allowance the owner has granted the SYMMIO core to spend the collateral token.
import { getCollateralAllowance } from "@symmio/trading-core";
const allowance = await getCollateralAllowance(config, { owner });Parameters
ownerAddressrequiredToken owner whose allowance to the SYMMIO core is read (usually the connected EOA).
chainIdnumberoptionalOptional chain override.
Returns
bigintThe current allowance, in the collateral token’s units.
Query options
import { getCollateralAllowanceQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getCollateralAllowanceQueryOptions(config, { owner }));Last updated on