identity-samples icon indicating copy to clipboard operation
identity-samples copied to clipboard

Incorrect Parameter Order in credentialManager.createCredential()

Open sabiou opened this issue 2 years ago • 0 comments

In the code snippet provided, there is a discrepancy in the order of parameters passed to the credentialManager.createCredential function in createPassword(). The function is called as follows:

credentialManager.createCredential(request, requireActivity()) as CreatePasswordResponse

The issue is that the requireActivity() function should be the first parameter given the implementation of createCredential():

public open suspend fun createCredential(
    context: Context,
    request: CreateCredentialRequest
): CreateCredentialResponse

but it is currently the second parameter. This parameter order should be corrected to maintain code clarity and consistency, especially for the codelab.

sabiou avatar Oct 25 '23 23:10 sabiou