#73 Update Safe container. Using fetchTransactions by safe address

This commit is contained in:
apanizo 2018-10-26 15:14:03 +02:00
parent b43aa2feaa
commit 4cc5f390c4
1 changed files with 4 additions and 9 deletions

View File

@ -14,16 +14,11 @@ const TIMEOUT = process.env.NODE_ENV === 'test' ? 1500 : 15000
class SafeView extends React.PureComponent<Props> {
componentDidMount() {
this.props.fetchSafe(this.props.safeUrl)
this.intervalId = setInterval(() => {
const {
safe, fetchTokens, fetchSafe,
} = this.props
if (!safe) {
return
}
const safeAddress = safe.get('address')
fetchTokens(safeAddress)
fetchSafe(safe)
const { safeUrl, fetchTokens, fetchSafe } = this.props
fetchTokens(safeUrl)
fetchSafe(safeUrl)
}, TIMEOUT)
}