Add linked account details when fetching in app wallet user details

Add linked account details when fetching in app wallet user details

Previously, when querying for user details via the in app wallet backend API, you would get something like:

[
  {
    "userId": "2c7af0c5-798d-446a-9a30-305110c57783",
    "walletAddress": "0x9020d2941ad941ABc1C2890301D8F889e263b0C4",
    "phone": "+1234567890",
    "createdAt": "2024-04-03T16:36:26.379156+00:00",
  }
]

Now it returns something like:

[
  {
    "userId": "2c7af0c5-798d-446a-9a30-305110c57783",
    "walletAddress": "0x9020d2941ad941ABc1C2890301D8F889e263b0C4",
    "phone": "+1234567890",
    "createdAt": "2024-04-03T16:36:26.379156+00:00",
    "linkedAccounts": [
      {
        "type": "cognito",
        "details": {
          "phone": "+12265055474"
        }
      }
    ]
  }
]

Note the addition of the linkedAccounts field.

This adds full support for linked accounts which we introduce a while back.

For more details, check out the updated docs here!