|
@ -26,7 +26,7 @@ class Activity extends Component { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
componentWillMount() { |
|
|
componentDidMount() { |
|
|
const { |
|
|
const { |
|
|
fetchPayments, |
|
|
fetchPayments, |
|
|
fetchInvoices, |
|
|
fetchInvoices, |
|
@ -42,12 +42,22 @@ class Activity extends Component { |
|
|
fetchChannels() |
|
|
fetchChannels() |
|
|
|
|
|
|
|
|
// HACK: wait 10 seconds and fetch channels again, allowing the node to establish connections with the remote party
|
|
|
// HACK: wait 10 seconds and fetch channels again, allowing the node to establish connections with the remote party
|
|
|
setTimeout(() => fetchChannels(), 10000) |
|
|
const timer = setTimeout(() => fetchChannels(), 10000) |
|
|
|
|
|
this.setState({ timer }) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
componentWillUnmount() { |
|
|
|
|
|
const { timer } = this.state |
|
|
|
|
|
clearInterval(timer) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
renderActivity(activity) { |
|
|
renderActivity(activity) { |
|
|
const { ticker, currentTicker, showActivityModal, network, currencyName } = this.props |
|
|
const { ticker, currentTicker, showActivityModal, network, currencyName } = this.props |
|
|
|
|
|
|
|
|
|
|
|
if (!currencyName) { |
|
|
|
|
|
return null |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (Object.prototype.hasOwnProperty.call(activity, 'block_hash')) { |
|
|
if (Object.prototype.hasOwnProperty.call(activity, 'block_hash')) { |
|
|
// activity is an on-chain tx
|
|
|
// activity is an on-chain tx
|
|
|
return ( |
|
|
return ( |
|
@ -265,7 +275,7 @@ Activity.propTypes = { |
|
|
balance: PropTypes.object.isRequired, |
|
|
balance: PropTypes.object.isRequired, |
|
|
walletProps: PropTypes.object.isRequired, |
|
|
walletProps: PropTypes.object.isRequired, |
|
|
|
|
|
|
|
|
currencyName: PropTypes.string.isRequired |
|
|
currencyName: PropTypes.string |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
export default injectIntl(Activity) |
|
|
export default injectIntl(Activity) |
|
|