diff --git a/package-lock.json b/package-lock.json index 6f0bfbb..5d75270 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9424,7 +9424,7 @@ }, "packages/networks/cardano-koios": { "name": "@rosen-chains/cardano-koios-network", - "version": "3.1.1", + "version": "3.1.2", "license": "GPL-3.0", "dependencies": { "@emurgo/cardano-serialization-lib-nodejs": "^11.3.1", diff --git a/packages/networks/cardano-koios/lib/CardanoKoiosNetwork.ts b/packages/networks/cardano-koios/lib/CardanoKoiosNetwork.ts index 835b53c..9c72751 100644 --- a/packages/networks/cardano-koios/lib/CardanoKoiosNetwork.ts +++ b/packages/networks/cardano-koios/lib/CardanoKoiosNetwork.ts @@ -86,7 +86,8 @@ class CardanoKoiosNetwork extends AbstractCardanoNetwork { )}` ); const confirmation = res[0].num_confirmations; - if (confirmation) return Number(confirmation); + if (confirmation !== undefined && confirmation !== null) + return Number(confirmation); return -1; }) .catch((e) => { diff --git a/packages/networks/cardano-koios/package.json b/packages/networks/cardano-koios/package.json index cee5b5b..681e38a 100644 --- a/packages/networks/cardano-koios/package.json +++ b/packages/networks/cardano-koios/package.json @@ -1,6 +1,6 @@ { "name": "@rosen-chains/cardano-koios-network", - "version": "3.1.1", + "version": "3.1.2", "description": "cardano koios network package for rosen cardano chain", "main": "dist/lib/index.js", "types": "dist/lib/index.d.ts",