Skip to content

Commit

Permalink
Add comment: why activities are stored in redux
Browse files Browse the repository at this point in the history
  • Loading branch information
kkosiorowska committed Dec 4, 2024
1 parent fd4a67a commit 9ae9218
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dapp/src/store/wallet/walletSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ export type WalletState = {
estimatedBtcBalance: bigint
sharesBalance: bigint
isSignedMessage: boolean
// Activities are saved in redux because the Acre subgraph may or may not be
// up to date with the chain. As a result, if we fetch data from Acre SDK
// after the withdrawal is initiated, we may not yet see this activity.
// Storing activities in redux gives us the option to add activities manually
// by `activityInitialized`. However, fetching the activity from the Acre SDK
// again later should already return us the updated data.
activities: Activity[]
address: string | undefined
}
Expand Down

0 comments on commit 9ae9218

Please sign in to comment.