#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> { class SafeView extends React.PureComponent<Props> {
componentDidMount() { componentDidMount() {
this.props.fetchSafe(this.props.safeUrl)
this.intervalId = setInterval(() => { this.intervalId = setInterval(() => {
const { const { safeUrl, fetchTokens, fetchSafe } = this.props
safe, fetchTokens, fetchSafe, fetchTokens(safeUrl)
} = this.props fetchSafe(safeUrl)
if (!safe) {
return
}
const safeAddress = safe.get('address')
fetchTokens(safeAddress)
fetchSafe(safe)
}, TIMEOUT) }, TIMEOUT)
} }