Skip to content
This repository has been archived by the owner on Apr 25, 2024. It is now read-only.

Commit

Permalink
fix(scriptexplorer): when no error is trown check for 0 balance
Browse files Browse the repository at this point in the history
Return the fethUTXOsError from the fetchUTXO function. If the length of the utxo is 0 show the no
balance error.
  • Loading branch information
Wim van der Ham authored and bucko13 committed Jun 12, 2023
1 parent 158fb61 commit cb96364
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/components/ScriptExplorer/ScriptEntry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,7 @@ class ScriptEntry extends React.Component {
} = this.props;
const multisig = this.generateMultisig();
const fetchUTXOsResult = await this.fetchUTXOs(multisig);
if (
fetchUTXOsResult &&
fetchUTXOsResult.utxos &&
fetchUTXOsResult.utxos.length
) {
if (fetchUTXOsResult && fetchUTXOsResult.utxos) {
const { utxos, balanceSats } = fetchUTXOsResult;
let fetchUTXOsError = "";
if (balanceSats.isLessThanOrEqualTo(0)) {
Expand Down

0 comments on commit cb96364

Please sign in to comment.