Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Fix: always load Transactions on initiial load
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Dec 1, 2021
1 parent 918d68e commit f2efbef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/logic/safe/hooks/useLoadSafe.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const useLoadSafe = (safeAddress?: string): void => {
if (!safeAddress) return

dispatch(fetchLatestMasterContractVersion())
dispatch(fetchSafe(safeAddress))
dispatch(fetchSafe(safeAddress, true))
dispatch(fetchSafeTokens(safeAddress))
dispatch(updateAvailableCurrencies())
dispatch(addViewedSafe(safeAddress))
Expand Down
6 changes: 3 additions & 3 deletions src/logic/safe/store/actions/fetchSafe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export const buildSafe = async (safeAddress: string): Promise<SafeRecordProps> =
* @param {string} safeAddress
*/
export const fetchSafe =
(safeAddress: string) =>
(safeAddress: string, isInitialLoad = false) =>
async (dispatch: Dispatch<any>): Promise<Action<Partial<SafeRecordProps>> | void> => {
let address = ''
try {
Expand Down Expand Up @@ -94,11 +94,11 @@ export const fetchSafe =
const shouldUpdateTxHistory = txHistoryTag !== safeInfo.txHistoryTag
const shouldUpdateTxQueued = txQueuedTag !== safeInfo.txQueuedTag

if (shouldUpdateCollectibles) {
if (shouldUpdateCollectibles || isInitialLoad) {
dispatch(fetchCollectibles(safeAddress))
}

if (shouldUpdateTxHistory || shouldUpdateTxQueued) {
if (shouldUpdateTxHistory || shouldUpdateTxQueued || isInitialLoad) {
dispatch(fetchTransactions(getNetworkId(), safeAddress))
}
}
Expand Down

0 comments on commit f2efbef

Please sign in to comment.