@gala-chain/chaincode ∙ API
API > checkAllowances
Function: checkAllowances()
checkAllowances(
ctx,applicableAllowances,tokenInstanceKey,action,callingOnBehalf):Promise\<BigNumber>
Parameters
▪ ctx: GalaChainContext
▪ applicableAllowances: TokenAllowance[]
▪ tokenInstanceKey: TokenInstanceKey
▪ action: AllowanceType
▪ callingOnBehalf: string
Returns
Promise<BigNumber>
Description
Given an array of allowances,
- clean up and delete expired / fully used allowances
- Match the remaining allowances against the
TokenInstanceKeyandAllowanceType - Sum up and return the total useable allowance quantity available