Skip to main content

vault.ensureTransferFeeAllowance(EnsureTransferFeeAllowance)

Ensure an ERC20 allowance is set to pay the vault transfer fee for a given token transfer. If the allowance is insufficient, it submits an approval transaction.

EnsureTransferFeeAllowance Type Parameters

Returns

When it approves, the SDK approves twice the per-transfer fee (enough for two transfers) and requiredAllowance is that doubled amount. It returns already_sufficient when the current allowance already covers two transfers.

Usage

TypeScript

JavaScript

Example outputs