diff --git a/dist/esm/index.js b/dist/esm/index.js index 8b7e982..cda756e 100644 --- a/dist/esm/index.js +++ b/dist/esm/index.js @@ -56,7 +56,7 @@ var getAssets = async (options) => { fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal }) .catch((error) => { console.log(error); resolve([]); }) .then((response) => { - if(response && response.success) { + if(response && response.ok) { return response.json() } else { resolve([]); diff --git a/dist/umd/index.js b/dist/umd/index.js index 005ffaf..7864b58 100644 --- a/dist/umd/index.js +++ b/dist/umd/index.js @@ -57,7 +57,7 @@ fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal }) .catch((error) => { console.log(error); resolve([]); }) .then((response) => { - if(response && response.success) { + if(response && response.ok) { return response.json() } else { resolve([]); diff --git a/src/getAssets.js b/src/getAssets.js index c62a036..b4ab545 100644 --- a/src/getAssets.js +++ b/src/getAssets.js @@ -54,7 +54,7 @@ export default async (options) => { fetch(`https://public.depay.fi/accounts/${blockchain}/${address}/assets`, { signal: controller.signal }) .catch((error) => { console.log(error); resolve([]) }) .then((response) => { - if(response && response.success) { + if(response && response.ok) { return response.json() } else { resolve([])