Skip to content

Commit

Permalink
handle assert nicely
Browse files Browse the repository at this point in the history
  • Loading branch information
julian-CStack committed Aug 28, 2024
1 parent 99e802b commit 4dc9207
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,12 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
final utxoSigningData = await fetchBuildTxData(utxoObjectsToUse);

if (isSendAll || isSendAllCoinControlUtxos) {
assert(satoshiAmountToSend == satoshisBeingUsed);
if (satoshiAmountToSend != satoshisBeingUsed) {
throw Exception(
"Something happened that should never actually happen. "
"Please report this error to the developers.",
);
}
return await _sendAllBuilder(
txData: txData,
recipientAddress: recipientAddress,
Expand Down

0 comments on commit 4dc9207

Please sign in to comment.