@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.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -799,9 +799,9 @@ async function fetchGuestTransferBalances(apiBaseUrl, transferId, guestSessionTo
|
|
|
799
799
|
async function fetchGuestAccount(apiBaseUrl, guestToken) {
|
|
800
800
|
const params = new URLSearchParams({ guestToken });
|
|
801
801
|
const res = await fetch(`${apiBaseUrl}/v1/accounts?${params.toString()}`);
|
|
802
|
-
if (res.status === 404) return null;
|
|
803
802
|
if (!res.ok) await throwApiError(res);
|
|
804
|
-
|
|
803
|
+
const data = await res.json();
|
|
804
|
+
return data.items[0] ?? null;
|
|
805
805
|
}
|
|
806
806
|
async function createGuestAccount(apiBaseUrl, guestSessionToken, providerId, name) {
|
|
807
807
|
const res = await fetch(`${apiBaseUrl}/v1/accounts`, {
|