From 1b091ca3ac98661be4ce087c3eef37c87295f680 Mon Sep 17 00:00:00 2001 From: Ivan Vershigora Date: Thu, 18 Mar 2021 11:55:56 +0300 Subject: [PATCH] FIX: CoinControl handle 0 conf tx output correctly --- screen/send/coinControl.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/screen/send/coinControl.js b/screen/send/coinControl.js index 7b28f5df9..070bf5de7 100644 --- a/screen/send/coinControl.js +++ b/screen/send/coinControl.js @@ -59,7 +59,7 @@ const ChangeBadge = () => { }; const OutputList = ({ - item: { address, txid, value, vout, confirmations }, + item: { address, txid, value, vout, confirmations = 0 }, balanceUnit = BitcoinUnit.BTC, oMemo, frozen, @@ -119,7 +119,7 @@ OutputList.propTypes = { txid: PropTypes.string.isRequired, value: PropTypes.number.isRequired, vout: PropTypes.number.isRequired, - confirmations: PropTypes.number.isRequired, + confirmations: PropTypes.number, }), balanceUnit: PropTypes.string, oMemo: PropTypes.string, @@ -132,7 +132,7 @@ OutputList.propTypes = { onDeSelect: PropTypes.func, }; -const OutputModal = ({ item: { address, txid, value, vout, confirmations }, balanceUnit = BitcoinUnit.BTC, oMemo }) => { +const OutputModal = ({ item: { address, txid, value, vout, confirmations = 0 }, balanceUnit = BitcoinUnit.BTC, oMemo }) => { const { colors } = useTheme(); const { txMetadata } = useContext(BlueStorageContext); const memo = oMemo || txMetadata[txid]?.memo || ''; @@ -182,7 +182,7 @@ OutputModal.propTypes = { txid: PropTypes.string.isRequired, value: PropTypes.number.isRequired, vout: PropTypes.number.isRequired, - confirmations: PropTypes.number.isRequired, + confirmations: PropTypes.number, }), balanceUnit: PropTypes.string, oMemo: PropTypes.string,