Skip to content

Returns all the approvals that are not handled by the inputted collectionApprovals. All returned approvals will have the ID "disapproved".

getUnhandledCollectionApprovals(collectionApprovals, ignoreTrackerIds?, doNotMerge?): CollectionApprovalWithDetails<bigint>[]

Defined in: packages/bitbadgesjs-sdk/src/core/approval-utils.ts:111

Returns all the approvals that are not handled by the inputted collectionApprovals. All returned approvals will have the ID "disapproved".

Parameters

collectionApprovals

CollectionApprovalWithDetails<bigint>[]

ignoreTrackerIds?

boolean = true

If true, any combination of (from, to, initiatedBy, tokenIds, transferTimes, ownershipTimes) will be considered handled if it has a single match (regardless of the IDs). For example, if we have a transfer ('Bob', 'Alice', 'Bob', 1, 1, 1) with IDs ('A', 'B', 'C'), we won't return that ('Bob', 'Alice', 'Bob', 1, 1, 1) with IDs ('D', 'E', 'F') is unhandled.

doNotMerge?

boolean = false

If true, we will not attempt to merge the returned approvals.

Returns

CollectionApprovalWithDetails<bigint>[]

Edit this page on GitHub