Documentation Link: Here -> Approvals / Transferability
You can use the following functions to get the approval combinations that have unhandled. If unhandled, they are disapproved.
export function getUnhandledCollectionApprovals(
collectionApprovals: CollectionApprovalWithDetails<bigint>[],
ignoreTrackerIds?: boolean
doNotMerge?: boolean
)
export function getUnhandledUserOutgoingApprovals(
approvals: UserOutgoingApprovalWithDetails<bigint>[],
userAddress: string,
doNotMerge?: boolean
)
export function getUnhandledUserIncomingApprovals(
approvals: UserIncomingApprovalWithDetails<bigint>[],
userAddress: string,
doNotMerge?: boolean
)
Use the following functions to add the default user approvals to an existing set of approvals. For incoming, this will be: if unhandled, approve only if to == initiatedBy. For outgoing, vice versa.
export function appendSelfInitiatedOutgoingApproval(currApprovals: UserOutgoingApprovalWithDetails<bigint>[], userAddress: string): UserOutgoingApprovalWithDetails<bigint>[]
export function appendSelfInitiatedIncomingApproval(currApprovals: UserIncomingApprovalWithDetails<bigint>[], userAddress: string): UserIncomingApprovalWithDetails<bigint>[]