Skip to content

Commit

Permalink
Fix manifest path, turn non grave errors into logs to avoid showing a…
Browse files Browse the repository at this point in the history
…n alert
  • Loading branch information
riccardobl committed Dec 30, 2023
1 parent 7ad21df commit bad188c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/assets/app/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!doctype html>
<html lang="en">
<head>
<link rel="manifest" href="/manifest.json" />
<link rel="manifest" href="manifest.json" />
<link rel="icon" href="static/favicon.png" type="image/png" />
<meta
name="viewport"
Expand Down
14 changes: 7 additions & 7 deletions src/js/LiquidWallet.js
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ export default class LiquidWallet {
true,
);
if (!hex) {
console.error("Block not found!", height);
console.log("Block not found!", height);
return undefined;
} else {
const buffer = Buffer.from(hex, "hex");
Expand Down Expand Up @@ -976,7 +976,7 @@ export default class LiquidWallet {
// Now lets collect the input amount
for (const inp of txData.ins) {
if (!inp.ldata) {
console.error("Blinded input of outgoing tx ?? UNEXPECTED");
console.log("Blinded input of outgoing tx ?? UNEXPECTED");
continue; // somehow this input can't be unblinded, so we skip it.
}
if (inp.owner.equals(addr.outputScript)) {
Expand Down Expand Up @@ -1004,7 +1004,7 @@ export default class LiquidWallet {

// We don't support multiasset transactions
if (Object.keys(outXasset).length > 1) {
console.error("Multiasset transaction ?? UNEXPECTED", outXasset);
console.log("Multiasset transaction ?? UNEXPECTED", outXasset);
throw new Error("Multiasset transaction not supported");
}

Expand All @@ -1013,7 +1013,7 @@ export default class LiquidWallet {

// We didn't manage to parse the tx or it was invalid
if (!out) {
console.error("Invalid transaction ?? UNEXPECTED", outXasset);
console.log("Invalid transaction ?? UNEXPECTED", outXasset);
throw new Error("Invalid transaction");
}

Expand Down Expand Up @@ -1049,7 +1049,7 @@ export default class LiquidWallet {
// We don't support multiasset transactions
// TODO: maybe we need to handle self transactions here?
if (Object.keys(inXAsset).length > 1) {
console.error("Multiasset transaction ?? UNEXPECTED", inXAsset);
console.log("Multiasset transaction ?? UNEXPECTED", inXAsset);
throw new Error("Multiasset transaction not supported");
}

Expand All @@ -1066,7 +1066,7 @@ export default class LiquidWallet {
else info.valid = false;
// info.valid = !!(info.inAsset || info.outAsset);
} catch (e) {
console.error("Error while parsing transaction", txData, e);
console.log("Error while parsing transaction", txData, e);
// we won't throw, but we will mark the tx as invalid
info.valid = false;
if (!info.debug) {
Expand Down Expand Up @@ -1324,7 +1324,7 @@ export default class LiquidWallet {

outputs.push(out);
} catch (err) {
console.error("Failed to resolve", utxo, err);
console.log("Failed to resolve", utxo, err);
}
}
return outputs;
Expand Down
2 changes: 1 addition & 1 deletion src/js/ui/stages/SendStage.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ export default class SendStage extends UIStage {
} catch (e) {
loading(false);

console.error(e);
console.log(e);
errorRowEl.show();
errorRowEl.setValue(e.message);
}
Expand Down
4 changes: 2 additions & 2 deletions src/js/ui/stages/WalletStage.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export default class WalletPage extends UIStage {
tickerEl.setValue(info.ticker);
nameEl.setValue(info.name);
} catch (e) {
console.error(e);
console.log(e);
}
});

Expand All @@ -108,7 +108,7 @@ export default class WalletPage extends UIStage {
iconEl.setSrc(icon);
assetEl.setCover(icon);
} catch (e) {
console.error(e);
console.log(e);
}
});
return Promise.all([loadInfoPromise, loadIconPromise]);
Expand Down

0 comments on commit bad188c

Please sign in to comment.