@swype-org/react-sdk 0.1.280 → 0.1.281

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -796,9 +796,9 @@ async function fetchGuestTransferBalances(apiBaseUrl, transferId, guestSessionTo
796
796
  async function fetchGuestAccount(apiBaseUrl, guestToken) {
797
797
  const params = new URLSearchParams({ guestToken });
798
798
  const res = await fetch(`${apiBaseUrl}/v1/accounts?${params.toString()}`);
799
- if (res.status === 404) return null;
800
799
  if (!res.ok) await throwApiError(res);
801
- return await res.json();
800
+ const data = await res.json();
801
+ return data.items[0] ?? null;
802
802
  }
803
803
  async function createGuestAccount(apiBaseUrl, guestSessionToken, providerId, name) {
804
804
  const res = await fetch(`${apiBaseUrl}/v1/accounts`, {