Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update an activities state #419

Merged
merged 17 commits into from
May 28, 2024
Merged

Update an activities state #419

merged 17 commits into from
May 28, 2024

Conversation

kkosiorowska
Copy link
Contributor

@kkosiorowska kkosiorowska commented May 13, 2024

Closes #424

This PR updates the redux structure for activities. The previous state of activities was split into:

  • activities - All fetched activities.
  • latestActivities - Activities used to display notifications to the user.

The data needs to be updated, so the function that fetches the activities is called every 30 minutes. Additionally, activities will be fetched again after the deposit action.

Unit tests

This PR adds basic unit tests for walletSlice reducer. To set up the test environment, the Vitest library was used. It is a new and fast testing framework recommended for the Vite project.

@kkosiorowska kkosiorowska self-assigned this May 13, 2024
Copy link

netlify bot commented May 13, 2024

Deploy Preview for acre-dapp-testnet ready!

Name Link
🔨 Latest commit a9d850d
🔍 Latest deploy log https://app.netlify.com/sites/acre-dapp-testnet/deploys/665492aafd2b130008f6e534
😎 Deploy Preview https://deploy-preview-419--acre-dapp-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@kkosiorowska kkosiorowska force-pushed the update-activities-state branch from 795ea11 to 64f2481 Compare May 15, 2024 11:07
@kkosiorowska kkosiorowska marked this pull request as ready for review May 15, 2024 11:10
@kkosiorowska kkosiorowska force-pushed the update-activities-state branch from 0f954ff to b3e00ed Compare May 17, 2024 08:40
The previous solution was hard to understand what's the difference between transactions and activities. Instead of using the term transaction, we will keep all activities and use selectors to check which ones are completed. While `latestActivities` will be used to display notifications to the user.
@kkosiorowska kkosiorowska force-pushed the update-activities-state branch from 6f45140 to 856bf19 Compare May 27, 2024 07:18
@kkosiorowska kkosiorowska requested a review from r-czajkowski May 27, 2024 14:11
@r-czajkowski r-czajkowski merged commit 7989001 into main May 28, 2024
24 checks passed
@r-czajkowski r-czajkowski deleted the update-activities-state branch May 28, 2024 08:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dApp: Data handling for activities
2 participants