Skip to content

[Wallet SDK] Make awaitCompletion agnostic on command or submission ID #711

@PHOL-DA

Description

@PHOL-DA

the current mehod of awaitCompletion has the following signature:

export async function awaitCompletion(
    ledgerClient: LedgerClient,
    ledgerEnd: number,
    partyId: PartyId,
    userId: string,
    commandId?: string,
    submissionId?: string
)

however the identification of command & submission id is done like:

    const wantedCompletion = completions.find((response) => {
        const completion = response.completionResponse.Completion
        if (!completion) return false
        if (completion.value.userId !== userId) return false
        if (commandId && completion.value.commandId !== commandId) return false
        if (submissionId && completion.value.submissionId !== submissionId)
            return false
        return true
    })

this should be changed so that you just provide one id and it checks if either th commandId or submissionId matches it.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions