Commit Graph

4211 Commits

Author SHA1 Message Date
Stefan 812910f087 feat(wallet): Add session-based activity API for dynamic updates
This commit introduces the first steps towards implementing a session-based activity API to support dynamic updates of the current visualized filter in the wallet activity service. This change is necessary to move away from static paginated filtering, which was previously done in SQL, to a more dynamic approach that can handle updates in real-time.

The main changes include:
- Add basic `EventActivitySessionUpdated` support for pending transactions.
- Added a `TODO.md` file outlining the plan and requirements for dynamic activity updates.
- New session-related API to the `activity.Service`
- `session.go` contains the logic for session management and event processing related to activity updates.
- Add test case for incremental filter updates.

The commit also includes:

- various other minor changes and refactoring to support the new session-based approach.
- Deprecation notices added to the `api.go` file for methods that are no longer used by the status-desktop application.
- Clarification comments added to the `scheduler.go` file regarding replacement policies.

Updates: #12120

ghstack-source-id: a61ef74184
Pull Request resolved: https://github.com/status-im/status-go/pull/4480
2024-02-01 19:55:06 +01:00
Stefan 21e6914a3c fix(wallet) fix reading amount for pending transactions
The reading of the amount for pending transactions was done in the same
way as for transfers table. However, the transfers table has a string
hex representation of the amount, while the pending transactions table
has a binary representation of the amount (*big.Int). This was
triggering the not int warning and value was missing.

Updates status-desktop #12120
2024-02-01 18:28:55 +01:00
Roman Volosovskyi 241595a871
[#4649] Do not restart reactor when it is already running (#4663) 2024-02-01 17:26:40 +01:00
Stefan 31a2d403ef fix(wallet) prioritize type SendAT for pending entries in activity
In case both to/from addresses are present in the list we were using
the same logic as for transfers. However, this doesn't make sense given
that we can have only one entry in pending activity.

The following cases are still covered

- When the receiver is in addresses we get received
- When both receiver and sender are in the list will get sent
- When the sender is on the list we will get sent

Updates status-desktop #12120
2024-02-01 16:59:09 +01:00
Mohsen 9879b1ea77
fix: set display name issue (#4642) 2024-02-01 19:13:41 +03:30
richΛrd f31808d938
fix: full nodes should run filter and lightpush (#4655) 2024-01-31 14:45:24 -04:00
Ivan Belyakov c84bb077fa fix(wallet): add a forgotten migration file to remove ETH transfers that
are gas-fee-only from transfers table.

Updates #4618
2024-01-31 14:37:48 +01:00
Ivan Belyakov e4745d01b4 fix(wallet): handle BlobTxType transaction.
Update go-ethereum version

Closes #4636
2024-01-31 10:06:14 +01:00
Igor Sirotin 0c2a935578
fix: fetch history when back online (#4651) 2024-01-30 18:13:18 +00:00
richΛrd 98c1ebec05
fix: handle community shard unassignment and update (#4627) 2024-01-30 13:56:59 -04:00
richΛrd e2341248b3
feat: add peer count to logs (#4648) 2024-01-30 12:42:26 -04:00
Igor Sirotin 1f0fc2935c
fix: clear waku envelopes cache when deleting a chat (#4621)
* chore: extract `ErrPermissionToJoinNotSatisfied`
* chore: disable resending messages in communities tests
* chore: move newTestMessenger extraOptions to testMessengerConfig
* chore: `WithTestStoreNode` messenger option
* feat: waku `ClearEnvelopesCache` method
* fix: call `ClearEnvelopesCache` when deleting chat
* chore: `TestBecomeMemberPermissions` checks messages after rejoin
2024-01-30 13:43:34 +00:00
frank 69948a7024
fix: endless logout (#4563) 2024-01-30 19:45:08 +08:00
Michal Iskierko 73a5189398 feat(BridgeMessage): Add new type of chat message content: BridgeMessage
BridgeMessage is a type of chat message content which will be sent from  Matterbridge.
It contains fields:
- bridge name - depends on the used bridge, eg. "discord", "slack", etc...
- user name - username the message was received from
- content - message content
- user avatar
- message id
- parent message id - used in case of replies

Message is saved to a separated table: bridge_messages, similarly to discord messages.
The user_messages table is untouched.
bridge_messages table contains user_messages_id in order to join with user_messages table.

Issue #13098
2024-01-30 12:14:54 +01:00
Ivan Belyakov 7d1927396a fix(wallet): do not return gas-only ETH entries of transfers table for
activities request

Closes #4618
2024-01-30 11:37:53 +01:00
Roman Volosovskyi dad2ec3f66
[#4640] Temporary fetch l2 block number for Arbitrum networks separately from BalanceChecker (#4644) 2024-01-30 10:09:44 +01:00
Anthony Laibe 0808b780f7 feat: add sepolia optimism 2024-01-30 08:57:06 +01:00
Patryk Osmaczko 4a7d15b36d fix: use CommunityShardKey's clock rather than community's clock 2024-01-29 21:31:11 +01:00
Patryk Osmaczko ac81c15805 fix: ignore outdated COMMUNITY_SHARD_KEY messages
This mitigates issue where community shard on client's side was not in
sync with owner's.

relates to: status-im/status-desktop#13217
2024-01-29 18:21:51 +01:00
Patryk Osmaczko 67e18a8ff0 chore: introduce `unhandledMessagesTracker` 2024-01-29 18:21:51 +01:00
Roman Volosovskyi 9b97ecbd90
Temporary disbale deactivation of tx detection routine for newly created profile (#4639) 2024-01-29 14:39:58 +01:00
Sale Djenic 6403a7413b feat: new endpoint added which returns accounts of all contacts that match the passed address 2024-01-29 13:15:24 +01:00
Igor Sirotin ab641c0c78
fix: remove store node envelopes ordering hotfix (#4622) 2024-01-27 13:02:12 +00:00
Ivan Belyakov f6c219c839 fix(wallet): Made loadBlocksAndTransfers command FiniteCommand to
keep restarting on error non-stop, removed some tests accordingly.
Fixed a flaky test for loadBlocksAndTransfers command.
Added tests for async.AtomicGroup.
Made tranfersCommand FiniteCommandWithErrorCounter to prevent infinite
restart.
2024-01-26 17:50:31 +01:00
Ivan Belyakov 95b148a247 fix(wallet): handle errors in findBlocksCommand and
findNewBlocksCommand gracefully.
Add ErrorCounter type for async package.
Add tests

Closes https://github.com/status-im/status-desktop/issues/11074
2024-01-26 17:50:31 +01:00
Roman Volosovskyi 71ae7ca1a0
[#4604] Skip balance requests on checking nonce (#4629) 2024-01-26 13:57:16 +01:00
Patryk Osmaczko e29332a374 chore: set extended timeout only for `protocol` package
It mitigates #4585 until the root cause is fixed.
2024-01-26 12:27:57 +01:00
Roman Volosovskyi 7c9977b780
Add BalanceChecker addresses for test networks (#4625) 2024-01-25 18:23:06 +01:00
Mikhail Rogachev fb98ee93ce
Correct profile showcase tokens and collectibles (#4511)
* feat: add profile showcase collectibles & assets missing fileds

* feat: resolve collectible identification issue

* feat: add validation for collectible visibility relative account

* feat: separate profile showcase assets on verified and unverified tokens

* fix: make chainId uint64, comment collectible account check

* chore: re-generate protobuf binaries with right protoc version

* Update protocol/messenger_profile_showcase.go

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-01-25 20:48:27 +04:00
Roman Volosovskyi 9b7eec0edb
[#4603] Get rid of fetchLatestBlockNumberCommand (#4614) 2024-01-25 13:05:59 +01:00
Roman Volosovskyi 73afe62782
Skip checking ethscan contract existence 2024-01-25 12:00:44 +01:00
frank bea0b5a63d
fix TestMarkAllActivityCenterNotificationsReadMarksMessagesAsSeen (#4615) 2024-01-25 13:56:56 +08:00
Godfrain Jacques 5f6f7e502d
(fix/status-go) fix profile picture update/removal (#4570)
This PR fixes [9947](status-im/status-desktop#9947) and contains :

    - Commit to fix the changing of custom picture and having the change
      reflected on contact's side
    - Commit to fix the deleting of picture and having the change reflected
      on contact's side
    - Rename confusing `ImageType` to `ImageFormat`
2024-01-24 12:09:28 -08:00
Anthony Laibe 026194d97a fix: add new migration to fix missing migration that didn't ran 2024-01-24 17:42:31 +01:00
Patryk Osmaczko 1a85a29b1b chore: cover community sharding with tests
closes: #4262
2024-01-24 14:24:57 +01:00
Patryk Osmaczko 5162c285a8 refactor: introduce `newTestCommunitiesMessenger` 2024-01-24 14:24:57 +01:00
Patryk Osmaczko 92f43bac78 chore: extend `CreateWakuV2Network` with `useShardAsDefaultTopic` 2024-01-24 14:24:57 +01:00
Roman Volosovskyi 647c3b0fd8
[#4605] Skip nonce check when possible during tx detection 2024-01-24 11:31:14 +01:00
frank 9050ed7aaf
fix: waku udp port conflict (#4610) 2024-01-24 09:09:43 +08:00
Igor Sirotin 2a91fba1fa
chore: added and fixed some logs (#4577)
* chore: logs for successful storenode request
2024-01-23 18:20:01 +00:00
Anthony Laibe 1017d2bc16 fix: query only header for fees 2024-01-23 15:24:39 +01:00
Andrea Maria Piana e65760ca85 Add basic peersyncing
This commit adds basic syncing capabilities with peers if they are both
online.

It updates the work done on MVDS, but I decided to create the code in
status-go instead, since it's very tight to the application (similarly
the code that was the inspiration for mvds, bramble, is all tight
together at the database level).

I reused parts of the protobufs.

The flow is:

1) An OFFER message is sent periodically with a bunch of message-ids and
   group-ids.
2) Anyone can REQUEST some of those messages if not present in their
   database.

3) The peer will then send over those messages.

It's disabled by default, but I am planning to add a way to set up the
flags.
2024-01-23 12:46:17 +00:00
Anton Iakimov cd9617cad7
nix: go-junit-report 2.0.0 -> 2.1.0
Should fix illegal XML char parsing, see
https://github.com/status-im/status-go/issues/4587
2024-01-22 13:39:38 +01:00
Patryk Osmaczko bf5dcacdeb refactor: introduce `newTestMessenger`
This avoids duplication and enables better configuration possibilities
for clients.

Next step is to cleanup all `newMessenger` derivatives in tests.
2024-01-22 13:08:58 +01:00
Ibrahem Khalil 436d229856
Add last opened at key for community (#4514) 2024-01-21 12:55:14 +02:00
John Ngei 6e30fbb211
chore: update default wallet account name 2024-01-19 23:48:37 +01:00
Sale Djenic db2f0e6f31 fix: closing tmp db file after creation
Changes done in this commit solve the " The process cannot access the file because it is being used by another process." error
which was noticeable on Windows while migrating a profile keypair to a Keycard.
2024-01-19 21:24:51 +01:00
Roman Volosovskyi 9c0526f7d9
[#4202] Detect balance and erc20 transfers by a single contract call (#4508) 2024-01-19 16:57:04 +01:00
frank 81f4c86086
fix: return CustomizationColor only on db rows affected (#4593) 2024-01-19 18:26:39 +08:00
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00