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

Commit cb96364

Browse files
Wim van der Hambucko13
Wim van der Ham
authored andcommitted
fix(scriptexplorer): when no error is trown check for 0 balance
Return the fethUTXOsError from the fetchUTXO function. If the length of the utxo is 0 show the no balance error.
1 parent 158fb61 commit cb96364

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/components/ScriptExplorer/ScriptEntry.jsx

+1-5
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,7 @@ class ScriptEntry extends React.Component {
202202
} = this.props;
203203
const multisig = this.generateMultisig();
204204
const fetchUTXOsResult = await this.fetchUTXOs(multisig);
205-
if (
206-
fetchUTXOsResult &&
207-
fetchUTXOsResult.utxos &&
208-
fetchUTXOsResult.utxos.length
209-
) {
205+
if (fetchUTXOsResult && fetchUTXOsResult.utxos) {
210206
const { utxos, balanceSats } = fetchUTXOsResult;
211207
let fetchUTXOsError = "";
212208
if (balanceSats.isLessThanOrEqualTo(0)) {

0 commit comments

Comments
 (0)