From 9a705c84cedf37f7220a5b7a9f0db49279f8670f Mon Sep 17 00:00:00 2001 From: Overtorment Date: Wed, 9 Jun 2021 14:51:53 +0100 Subject: [PATCH] FIX: rare alert that recipients list can't be empty --- screen/send/details.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/screen/send/details.js b/screen/send/details.js index ada3582cd..a8a8565f0 100644 --- a/screen/send/details.js +++ b/screen/send/details.js @@ -497,7 +497,13 @@ const SendDetails = () => { }; await saveToDisk(); - const recipients = outputs.filter(({ address }) => address !== changeAddress); + let recipients = outputs.filter(({ address }) => address !== changeAddress); + + if (recipients.length === 0) { + // special case. maybe the only destination in this transaction is our own change address..? + // (ez can be the case for single-address wallet when doing self-payment for consolidation) + recipients = outputs; + } navigation.navigate('Confirm', { fee: new BigNumber(fee).dividedBy(100000000).toNumber(),