refactor: fetch safe and tokens simultaneously
This commit is contained in:
parent
823fc40f7d
commit
e08083743d
|
@ -15,8 +15,10 @@ export const useLoadSafe = (safeAddress) => {
|
||||||
const fetchData = () => {
|
const fetchData = () => {
|
||||||
if (safeAddress) {
|
if (safeAddress) {
|
||||||
dispatch(fetchLatestMasterContractVersion())
|
dispatch(fetchLatestMasterContractVersion())
|
||||||
.then(() => dispatch(fetchSafe(safeAddress)))
|
.then(() => {
|
||||||
.then(() => dispatch(fetchSafeTokens(safeAddress)))
|
dispatch(fetchSafe(safeAddress))
|
||||||
|
return dispatch(fetchSafeTokens(safeAddress))
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
dispatch(loadAddressBookFromStorage())
|
dispatch(loadAddressBookFromStorage())
|
||||||
dispatch(fetchTransactions(safeAddress))
|
dispatch(fetchTransactions(safeAddress))
|
||||||
|
|
Loading…
Reference in New Issue