Commit Graph

1811 Commits

Author SHA1 Message Date
frank f04a9a8726
feat(sync)!: leftovers work for sync fallback (#5794)
* feat(sync)!: remove compatibility with v2.29

* feat(sync)_: add AC notifications when initiating the sync fallback

Needed for https://github.com/status-im/status-desktop/issues/15750

Adds an AC notification when the syncing fails and the user is prompted to use a seed phrase instead.
There is one notification for the initiator (created) and one for the old account (received).
Once the flow is completed, ie the receiver presses Enable and sync,  the notifications are deleted

* test_: update test

* fix_: lint issue

* chore_: ignore tmp file generated by make lint-fix

* chore_: rename EnableAndSyncInstallation to EnableInstallationAndSync

* chore_: address review feedback

* chore_: revert changes to .gitignore

* fix_: simplify code

* fix_: keep old API

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2024-09-19 16:17:46 +08:00
frank 6e5a32c022
fix(mentions)_: add callID for `OnChangeText` (#3806) 2024-09-19 13:03:56 +08:00
Igor Sirotin fb150f3d16
fix!: move `MuteFor24Hr` to the end of the enum (#5813) 2024-09-10 11:25:40 +01:00
Mohamed Javid 17c30ac532
fix_: Flaky TestBackupKeypairs test (#5811)
This commit fixes the flaky TestBackupKeypairs test.

The flakiness is due to the order in which the backup is processed. The test expects the profile keypair addresses first but sometimes, the non-profile keypair is processed before the profile keypair. This commit updates the test to ensure the received addresses exist in the expected.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-09-09 20:30:05 +05:30
Igor Sirotin bbdf5d5ae0
chore: remove urls package (#5810)
* chore!: remove urls package

* fix_: move encodeDataURL and decodeDataURL to messenger_share_urls
2024-09-09 14:45:21 +01:00
richΛrd c24eba8af2
fix_: make mailserver availability subscriptions concurrency safe (#5804) 2024-09-05 15:18:23 -04:00
richΛrd 771a0c3562
refactor: remove wakuv1 code from mailserver cycle and add ENR to list of storenodes (#5753)
* test_: remove eth.prod mailservers from cycle
* test_: disable store request for wakuv1
* chore_: add ENR and remove V1 code
* refactor_: storenode cycle and allow ENRs and multiaddresses
2024-09-05 10:25:26 -04:00
kaichao 1b53d04ccf
feat_: accept community join request with mvds (#5787)
* feat_: accept community join request with mvds

* chore_: no sender when use mvds in comm join response

* fix_: only use mvds for tokenized communities

* chore_: add comment for this.
2024-09-05 18:53:09 +08:00
Alexandra Betouni 060918bcd4
feat_: adding 24hours duration for chats mute (#5020)
Needed for https://github.com/status-im/status-desktop/issues/13393
2024-09-04 15:41:45 +01:00
Azanul Haque 3ca2d6eb23
fix_: Orphaned generated code (#4086)
Signed-off-by: Azanul <azanulhaque@gmail.com>
2024-09-03 21:32:23 +01:00
Igor Sirotin beaca5faf7
chore_: uncomment tests (#5792)
* chore_: uncomment tests

* chore_: better comment

Co-authored-by: osmaczko <33099791+osmaczko@users.noreply.github.com>
2024-09-03 12:40:50 +01:00
Igor Sirotin 4083aae162
chore_: refactor `TestMessengerCollapsedComunityCategoriesSuite` (#5790)
* chore_: improve readability of `TestE2eSendingReceivingProfilePicture`

* chore_: cleanup logs

* chore_: remove generateKeyUID

* chore_: cleanup logs

* chore_: move chat message sending to switch case

* chore_: remove redundant args

* chore_: simplify images check

* chore(testMesengerConfig)_: add createSettings option

* chore_: move TestMessengerCollapsedCommunityCategoriesSuite

* chore(MessengerProfilePictureHandlerSuite)_: simpler messenger creation

* chore_: MessengerProfilePictureHandlerSuite test cases

* chore_: lint fix

* chore_: address pr comments
2024-09-03 12:39:49 +01:00
Sean Hagstrom 717814e83f
fix!: ensure deleting message does not accidentally delete unrelated notifications (#5789)
This change attempts to resolve an issue with notifications being deleted for users after another user deletes the last message inside a community.

The cause of the issue seemed to be related to how notifications could reference a message with the `LastMessage` field. And if the last message was deleted from a community, then the notifications that reference the last message via `LastMessage` field would also removed/deleted.

Moving forward, we will no longer use the `LastMessage` field as a way to detect notifications that need to be deleted, and we now only use the `Message` field of a notification, and we have adapted the creation of notifications to avoid using the `LastMessage` field.
2024-09-03 10:12:44 +01:00
frank e6a2f0afd6
chore_: fix flaky test TestEnableInstallationAndPair (#5775) 2024-09-02 16:24:38 +08:00
Mohamed Javid bd0464d192
fix_: send accounts event on handling backed up accounts (#5739)
This commit moves the "accountsFeed" from "initServices" to the status node config, and adds a reference to messenger config for sending events on handling backed-up data.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-08-31 00:58:03 +05:30
Arseniy Klempner 27d02d5fc8
feat(telemetry)_: include device type in metrics (#5669)
* feat(telemetry)_: include device type in metrics

* chore(telemetry)_: refactor common fields used across metrics
2024-08-30 08:59:03 -07:00
Parvesh Monu 0531535ef5
fix_: fix unmute logic (#5720) 2024-08-30 17:47:43 +05:30
frank 82ba10ede7
chore(mentions)_: Add suggestion limit for mention recommendations (#5774)
- Introduce a constant `suggestionsLimit` set to 15
- Apply the suggestion limit when calculating mention suggestions
- Replace unlimited suggestions (-1) with the new limit in relevant function calls
- This change aims to improve performance and user experience by limiting the number of mention suggestions displayed
2024-08-30 09:37:08 +08:00
Igor Sirotin 28e7a364c7
chore(test_stats)_: better stats, print skipped tests (#5781)
* chore(test_stats)_: better stats, list skipped tests

* chore_: add skip reasons to some tests
2024-08-29 21:09:26 +01:00
kaichao 84928e218f
feat_: request to join community message use mvds (#5723)
* feat_: request to join community message use mvds

* chore_: set skip encryption layer to false when request to join community

* chore_: fix tests.

* chore_: fix test.

* chore_: fix more tests

* chore_: fix resend raw message test.

* chore_: add comments for skip encryption layer
2024-08-28 22:11:34 +08:00
Pablo Lopez 0c0888927c
fix_: store query lastrequest (#5767) 2024-08-27 08:58:52 +03:00
Igor Sirotin e0eb737c51
fix_: enable tests to run with `-count` more than 1 (#5757)
* fix(TestProfilingCPU)_: enable run with -count=2

* fix(TestProfilingMem)_: enable run with -count=2

* fix(zaputil)_: register encoder only once

* fix(timesource)_: global variables override in tests

* fix(TestClosingsqlDB)_: delete database from cache

* fix(postgres/helpers)_: drop connections before dropping database

* fix_: linter

* chore_: remove redundant condition
2024-08-23 19:30:58 +00:00
richΛrd 36c893d3d2
fix_: proper content topic conversion between transport and waku layer for setting criteria interest (#5758) 2024-08-21 13:45:32 -04:00
richΛrd 4aa51f9882
fix_: wait for mailserver available signal to change missing messages criteria (#5686) 2024-08-16 14:26:10 -04:00
richΛrd c02ebf957c
refactor_: use concrete datatypes instead of `string` (#5701) 2024-08-16 19:24:21 +01:00
Igor Sirotin a00bf6977b
fix_: publish community periodically (#5709) (#5715)
* fix_: publish community at app start

* fix_: allow publishing community with same clock

* chore_: increase community publish interval to 24 hours
2024-08-15 16:49:08 +01:00
Igor Sirotin f660be0daa
chore!: simplify local pairing API (#5643)
* chore!: switch to use CreateAccount, fix tests

* chore_: move GenerateInstallationID to multidevice

* chore!: clean up ReceiverConfig

* chore_: use DefaultKeystoreRelativePath

* chore_: cleanup

* fix_: import api

* chore_: lint fix

* chore_: remove unused import
2024-08-14 21:10:19 +01:00
Andrea Maria Piana 0954a4ad13 feat!: drive proxy stage name from the client 2024-08-14 18:50:01 +00:00
Igor Sirotin 130c995b92
chore_: remove logging identity images (#5708) 2024-08-14 10:32:17 +01:00
Igor Sirotin 9175e45e61
fix_: block on logout (#5696)
* fix_: check context on processAndPushTelemetry

* fix_: fix waitgroup add/done in Waku

* fix(pendingTracker)_: stop the pending transacitonTracker on logout

* chore_: lint fix

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2024-08-12 22:30:13 +01:00
richΛrd 48ebe24f8e
fix_: tmp remove subscription to mailserver available signal to avoid leak (#5684) 2024-08-09 10:04:45 -04:00
Jonathan Rainville 772b5b6d35
fix(contact_request)_: potential fix to contact request with no saved message (#5665) (#5673)
Fixes https://github.com/status-im/status-desktop/issues/15930

The issue happened because I received a notification about a contact request, but the request was not associated with a message in the DB. The DB didn't have a message with the required ID in it.

This potential fix moves the creation of the contact request later in the handling code, because the only way this bug can happen as far as I see it is if there is an error later in the handler function and the message is never added to the response, and therefore never saved.
2024-08-08 15:36:51 +01:00
Igor Sirotin 01288227d3
fix_: log utc timestamp (#5672)
* fix_: log zone-agnostic time

* chore_: use time.Truncate
2024-08-07 18:54:42 +01:00
Mykhailo Prakhov 58a9557c58
fix: reject handling requests to join without revealed accounts (#5549)
* fix(requestToJoin)_: request to join must have revealed addresses with signature

* fix(tests)_: fix tests

* chore(tests)_: increase tests timeout
2024-08-07 17:57:02 +02:00
Igor Sirotin eeb34f780f
chore_: remove deprecated `CreateAccount.BackupDisabledDataDir` (#5664)
* chore_: remove deprecated CreateAccount.BackupDisabledDataDir

* test_: cover ErrCreateAccountInvalidRootDataDir
2024-08-07 13:59:43 +01:00
Igor Sirotin 2f5437130e
feat_: auto set random wallet emoji when creating account (#5667)
* feat_: auto set random wallet emoji when creating account

* fix_: remove emoji on error

* fix_: lint
2024-08-07 13:34:04 +01:00
richΛrd 20d6d4eb9a
refactor: extract missing messages logic to go-waku (#5638) 2024-08-06 14:49:26 -04:00
Sale Djenic 2129a3f95c feat_: accounts/saved addresses capacity related api endpoints added
Added endpoints:
- `RemainingAccountCapacity`
- `RemainingKeypairCapacity`
- `RemainingWatchOnlyAccountCapacity`
- `RmaininngCapacityForSavedAddresses`
2024-08-06 08:19:33 +02:00
richΛrd 5212f337d7
feat_: rate limit message publishing (#5523) 2024-08-01 14:36:25 -04:00
Ivan Belyakov b74d9e6b4e feat(wallet)_: add status proxy RPC urls for blockchain providers
Replace the status proxy URL for cryptocompare.
2024-08-01 08:19:20 +02:00
Vaclav Pavlin 780e3e55f4
feat(telemetry)_: publish peerId (#5534)
* feat(telemetry)_: publish peerId

* fix_: fix goimports lint error in waku

* fix_: trim extra slash, use the right Waku service

* fix_: update protocol/messenger.go

Co-authored-by: richΛrd <info@richardramos.me>

* fix_: panic when PeerID is called on wakuv1

* fix_: use option instead of additional param for PeerID

---------

Co-authored-by: Arseniy Klempner <arseniyk@status.im>
Co-authored-by: richΛrd <info@richardramos.me>
2024-07-31 20:27:43 -07:00
richΛrd 5d309e2c64
feat_: use storev3 instead of v2 for history queries (#5123) 2024-07-30 14:28:27 -04:00
IvanBelyakoff 5b34cd9e9f
feat(wallet)_: add basic auth for cryptocompare proxy (#5536)
* feat(wallet)_: add basic auth for cryptocompare proxy

* test(wallet)_: add a test for httpclient used in market clients
2024-07-30 14:48:22 +01:00
frank f123e98179
feat: fallback pairing seed (#5614)
* feat(pairing)!: Add extra parameters and remove v2 compatibility

This commit includes the following changes:

I have added a flag to maintain 2.29 compatibility.

Breaking change in connection string

The local pairing code that was parsing the connection string had a few non-upgradable features:

It was strictly checking the number of parameters, throwing an error if the number was different. This made it impossible to add parameters to it without breaking.
It was strictly checking the version number. This made increasing the version number impossible as older client would just refuse to connect.
The code has been changed so that:

Two parameters have been added, installation-id and key-uid. Those are needed for the fallback flow.
I have also removed version from the payload, since it wasn't used.

This means that we don't support v1 anymore. V2 parsing is supported . Going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one).

https://www.youtube.com/watch?v=oyLBGkS5ICk Is a must watch video for understanding the strategy

Changed MessengerResponse to use internally a map of installations rather than an array (minor)
Just moving towards maps as arrays tend to lead to subtle bugs.

Moved pairing methods to messenger_pairing.go
Just moved some methods

Added 2 new methods for the fallback flow
FinishPairingThroughSeedPhraseProcess
https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R29

EnableAndSyncInstallation

https://github.com/status-im/status-go/pull/5567/files#diff-1ad620b07fa3bd5fbc96c9f459d88829938a162bf1aaf41c61dea6e38b488d54R18

Flow for clients
Client A1 is logged in
Client A2 is logged out

Client A1 shows a QR code
Client A2 scans a QR code
If connection fails on A2, the user will be prompted to enter a seed phrase.
If the generated account matches the key-uid from the QR code, A2 should call FinishPairingThroughSeedPhraseProcess with the installation id passed in the QR code. This will send installation information over waku. The user should be shown its own installation id and prompted to check the other device.
Client A1 will receive new installation data through waku, if they are still on the qr code page, they should show a popup to the user showing the received installation id, and a way to Enable and Sync, which should call the EnableAndSyncInstallation endpoint. This should finish the fallback syncing flow.
Current issues
Currently I haven't tested that all the data is synced after finishing the flow. I see that the two devices are paired correctly, but for example the DisplayName is not changed on the receiving device. I haven't had time to look into it further.

* test_: add more test for connection string parser

* fix_: fix panic when parse old connection string

* test_: add comments for TestMessengerPairAfterSeedPhrase

* fix_: correct error description

* feat_:rename FinishPairingThroughSeedPhraseProcess to EnableInstallationAndPair

* fix_: delete leftover

* fix_: add UniqueKey method

* fix_: unify the response for InputConnectionStringForBootstrapping

* fix_: remove fields installationID and keyUID in GethStatusBackend

* fix_: rename messenger_pairing to messenger_pairing_and_syncing

---------

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2024-07-30 17:14:05 +08:00
richΛrd 0e982f1a3d
chore_: rename shards.test to status.prod (#5571) 2024-07-29 17:19:48 -04:00
Igor Sirotin 65334d42ed
fix_: remove personal information from logs (#5608) (#5612) 2024-07-29 10:29:24 -04:00
Igor Sirotin e76d93d340
chore: skip flaky tests (#5606)
* chore_: skip TestPeerCount

* chore_: skip flaky wallet tests

* chore_: skip flaky TestMemberReceivesPendingRequestToJoinAfterAfterGettingTokenMasterRole
2024-07-27 10:27:26 +01:00
Andrea Maria Piana 3cc4767638
Check for mobile data connection if setting is on (#5511)
* feat_: Check for mobile data connection if setting is on

* fix_: check code control flag inside  asyncRequestAllHistoricMessages

---------

Co-authored-by: Igor Sirotin <sirotin@status.im>
2024-07-26 22:34:57 +01:00
richΛrd 3792d37df4
fix_: add missing message verification flag when creating an account (#5570) 2024-07-26 15:19:19 -04:00
Andrey Bocharnikov 5d113071db fix(NodeConfig)_: Do not add backoff if user action triggered store node disconnection
fixes status-im/status-desktop#14929
2024-07-26 22:24:55 +07:00