mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-09 12:19:24 +00:00
handle assert nicely
This commit is contained in:
parent
99e802b59e
commit
4dc920772a
1 changed files with 6 additions and 1 deletions
|
@ -224,7 +224,12 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
|
||||||
final utxoSigningData = await fetchBuildTxData(utxoObjectsToUse);
|
final utxoSigningData = await fetchBuildTxData(utxoObjectsToUse);
|
||||||
|
|
||||||
if (isSendAll || isSendAllCoinControlUtxos) {
|
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(
|
return await _sendAllBuilder(
|
||||||
txData: txData,
|
txData: txData,
|
||||||
recipientAddress: recipientAddress,
|
recipientAddress: recipientAddress,
|
||||||
|
|
Loading…
Reference in a new issue