|
|
@ -29,6 +29,7 @@ class ClaimInterestModal extends React.Component { |
|
|
|
open: false, |
|
|
|
isLoading: true, |
|
|
|
transactionsList: [], |
|
|
|
displayShowZeroInterestToggle: false, |
|
|
|
showZeroInterest: true, |
|
|
|
totalInterest: 0, |
|
|
|
spvPreflightSendInProgress: false, |
|
|
@ -91,6 +92,7 @@ class ClaimInterestModal extends React.Component { |
|
|
|
loadListUnspent() { |
|
|
|
let _transactionsList = []; |
|
|
|
let _totalInterest = 0; |
|
|
|
let _zeroInterestUtxo = false; |
|
|
|
|
|
|
|
if (this.props.ActiveCoin.mode === 'spv') { |
|
|
|
shepherdElectrumListunspent( |
|
|
@ -103,6 +105,10 @@ class ClaimInterestModal extends React.Component { |
|
|
|
json = json.result; |
|
|
|
|
|
|
|
for (let i = 0; i < json.length; i++) { |
|
|
|
if (json[i].interest === 0) { |
|
|
|
_zeroInterestUtxo = true; |
|
|
|
} |
|
|
|
|
|
|
|
_transactionsList.push({ |
|
|
|
address: json[i].address, |
|
|
|
locktime: json[i].locktime, |
|
|
@ -117,6 +123,7 @@ class ClaimInterestModal extends React.Component { |
|
|
|
transactionsList: _transactionsList, |
|
|
|
isLoading: false, |
|
|
|
totalInterest: _totalInterest, |
|
|
|
displayShowZeroInterestToggle: _zeroInterestUtxo, |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -138,6 +145,9 @@ class ClaimInterestModal extends React.Component { |
|
|
|
for (let i = 0; i < json.length; i++) { |
|
|
|
getRawTransaction(this.props.ActiveCoin.coin, json[i].txid) |
|
|
|
.then((_json) => { |
|
|
|
if (json[i].interest === 0) { |
|
|
|
_zeroInterestUtxo = true; |
|
|
|
} |
|
|
|
_addresses[json[i].address] = json[i].address; |
|
|
|
_transactionsList.push({ |
|
|
|
address: json[i].address, |
|
|
@ -155,6 +165,7 @@ class ClaimInterestModal extends React.Component { |
|
|
|
totalInterest: _totalInterest, |
|
|
|
addressses: _addresses, |
|
|
|
selectedAddress: this.state.selectedAddress ? this.state.selectedAddress : _addresses[Object.keys(_addresses)[0]], |
|
|
|
displayShowZeroInterestToggle: _zeroInterestUtxo, |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|