@hyperionbt/helios
Advanced tools
Comparing version 0.15.8 to 0.15.9
{ | ||
"name": "@hyperionbt/helios", | ||
"type": "module", | ||
"version": "0.15.8", | ||
"version": "0.15.9", | ||
"description": "Helios is a Domain Specific Language that compiles to Plutus-Core (i.e. Cardano on-chain validator scripts). Helios is a non-Haskell alternative to Plutus. With this library you can compile Helios scripts and build Cardano transactions, all you need to build 100% client-side dApps for Cardano.", | ||
@@ -6,0 +6,0 @@ "main": "helios.js", |
@@ -252,8 +252,9 @@ //@ts-check | ||
try { | ||
return await this.#wallet.utxos; | ||
const utxos = await this.#wallet.utxos; | ||
if (utxos.length > 0) { | ||
return utxos; | ||
} | ||
} catch (e) { | ||
if (this.#getUtxosFallback) { | ||
console.error(e, "falling back to regular network"); | ||
return this.#getUtxosFallback(await this.#wallet.usedAddresses); | ||
} else { | ||
if (!this.#getUtxosFallback) { | ||
console.error("fallback not set"); | ||
@@ -263,2 +264,9 @@ throw e; | ||
} | ||
if (this.#getUtxosFallback) { | ||
console.error("falling back to retrieving UTxOs through query layer"); | ||
return this.#getUtxosFallback(await this.#wallet.usedAddresses); | ||
} else { | ||
throw new Error("wallet returned 0 utxos, set the helper getUtxosFallback callback to use an Api query layer instead"); | ||
} | ||
} | ||
@@ -265,0 +273,0 @@ /** |
@@ -14,3 +14,3 @@ { | ||
"name": "@hyperionbt/helios", | ||
"version": "0.15.8", | ||
"version": "0.15.9", | ||
"license": "BSD-3-Clause", | ||
@@ -17,0 +17,0 @@ "devDependencies": { |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
6023304
132259