Commit Graph

4881 Commits

Author SHA1 Message Date
frank 25143155cf
test_:fix lint issue 2024-07-25 19:31:04 +08:00
frank f7691a6214
test_:add more asserts for the integration test 2024-07-25 19:31:03 +08:00
frank 171fbcbf8f
test_:add integration test to validate if sync display name works 2024-07-25 19:31:03 +08:00
Andrea Maria Piana 4b576a70ad
feat(pairing)!: Add fallback flow to pairing
feat(pairing)!: add fallback flow to pairing

This commit includes the following changes:

*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:
- Version is not used. Better not to use something than to use it wrongly, rarely version is needed if the protocol is correctly upgraded.
- 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 should be supported (a new might be able to parse a v2 client, but not the other way around). It is to be considered a complete breaking change. 2.30 -> 2.30 syncing only is supported, but going forward there's a clear strategy on how to update the protocol (append parameters, don't change existing one).

*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

1) Client A1 shows a QR code
2) Client A2 scans a QR code
3) If connection fails on A2, the user will be prompted to enter a seed phrase.
4) 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.
5) 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.
2024-07-25 19:31:03 +08:00
Michal Iskierko 8bb0bb0b3c fix_: fix ticker in metrics
Create ticker in Start() instead of one global in service

Fix #5548
2024-07-25 12:42:33 +02:00
dlipicar 0456dcef8b
fix(wallet)_: exclude paraswap providers not supporting partner fees (#5573) 2024-07-24 16:29:54 -04:00
richΛrd 5b36cf8267
feat_: add lightpush and filter bandwidth usage to telemetry (#5547) 2024-07-24 14:28:38 -04:00
Dario Gabriel Lipicar 7c4b43b4d9 feat(wallet)_: incorporate partner fees for L1 paraswap swaps 2024-07-23 15:27:43 -03:00
Mykhailo Prakhov 30fee0cfd3 fix(communities)_: validate if RawMessage from DB is valid before sending it 2024-07-23 19:54:39 +02:00
Sale Djenic 4d2d20cff4 fix_: allow sending 0 value transactions 2024-07-23 18:19:10 +02:00
Ivan Belyakov 625c11ced4 fix(wallet)_: migration caused failure due to duplicates were not
properly removed
2024-07-23 14:45:11 +02:00
Anton 40c3b1df33 fix(tests-rpc)_: Remove port bind 2024-07-23 11:03:31 +02:00
Dario Gabriel Lipicar 67890853bf feat_: add support for approve and swap activity entries 2024-07-22 18:29:13 -03:00
frank 79d9262430
fix_:increase timeout on unit test (#5553) 2024-07-22 19:08:47 +08:00
richΛrd 8de8818516
feat(waku)_: disconnect all peers if ping to randomly choosen peers fail 2 times (#5526) 2024-07-21 20:44:00 -04:00
Michal Iskierko a3e834c26e fix_: fix returned value in toggleCentralizeMetrics function
Issue #15628
2024-07-19 17:45:30 +02:00
Dario Gabriel Lipicar afc6e7bcb9 feat(router)_: return processor error when no routes are found 2024-07-19 17:44:08 +02:00
Mykhailo Prakhov 54555b47de fix(logs)_: remove community private key logging in publishCommunityPrivilegedMemberSyncMessage 2024-07-19 16:50:40 +02:00
Dario Gabriel Lipicar 6a155bc6dc feat_: add Mercuryio widget id 2024-07-19 09:03:15 -03:00
frank 4a43b2b2be
fix_:still return the image when handleAccountInitialsImpl is unable to get public key to generate color hash to generate ring (#5409)
* fix_:still return the image when handleAccountInitialsImpl unable to get public key

* test_:add unit test for handleAccountInitialsImpl

* test_:improve unit test

* fix_:still return the image when handleAccountImagesImpl unable to get public key
2024-07-19 16:41:45 +08:00
Stefan dc62171219 fix(dapps)_: don't require chain ID for signing typed data v4
The reused implementation from signing typed data V1 was used
in case of signing typed data V4. This implementation required
chain ID to be present in the typed data. This change fixes
the issue by making chainID optional for signing typed data V4.
2024-07-19 09:00:01 +02:00
Mikhail Rogachev 4c6ca00520
Feat: implement connector service for browser plugin (#5433)
* feat(connector)_: impl `eth_requestAccounts` for browser plugin

* feat(connector)_: add impl for `wallet_switchEthereumChain` and `eth_chainId`

* feat(connector)_: add impl for `eth_sendTransaction`

* feat(connector)_: add a signal and an endpoint for wallet ui side

* chore_: refactor connector tests

* feat(connector)_: impl `eth_requestAccounts` with signal

* chore(connector)_: Add test, covering full transaction flow

And polish impl & test for connector endpoints

* fix(connector)_: temporary allow all origins for ws connection

* chore_: review fixes

* fix(connector)_: make user select chain id for dApp

* fix(connector)_: add requestID and fine tune endpoints

* chore(connector)_: naming fixes and tests improvments
2024-07-18 17:30:10 +02:00
Ivan Belyakov d07f9b5b16 fix(wallet)_: no balance chart for tokens, due to wrong symbol (ETH) used
instead.

Fixed padding points being removed from final result, regression.
Edge points not added per address as it does not make sense.
Fixed padding points number with respect to edge points number.
Padding points now duplicate previous entry.
Fixed timestamp boundaries to ignore addresses, as we want the whole
range for all passed addresses.
Fixed missing indices in balance_history table and clean up of
duplicate rows.
Removed ERC1155 from balance history sql query
2024-07-18 13:11:02 +02:00
Vitaly Vlasov 3ef445dbcf fix_: share all future addresses storage 2024-07-18 12:08:40 +03:00
Ivan Belyakov 102b57098e test(communities)_: skip flaky communities test 2024-07-17 19:17:35 +02:00
Ivan Belyakov 94b2017226 test(wallet)_: fix flaky circuit breaker test on window timeout
fix racing condition on init of RPC stats
2024-07-17 18:06:48 +02:00
Emil Sawicki eac07af5d7 fix(activity)_: Remove duplicated ids for nft fetching 2024-07-17 12:20:35 +02:00
Emil Sawicki 89f1feade0 fix(activity)_: report other token types than ERC20
This fixes incremental updates for tokens and proper report of
token type for mobile (in desktop we didn't use it)

Closes: #15233
2024-07-17 12:20:35 +02:00
Lungu Cristian 7e4322b45a
Allow gas estimation for DynamicFeeTx in transactor (#5521)
* fix_: allow gas estimation for DynamicFeeTx

* test_: added tests for BuildAndValidateTransaction

* fix_: using IsDynamicTx for gasPrice suggestion

* fix_: hash transaction check

Co-authored-by: Stefan Dunca <47554641+stefandunca@users.noreply.github.com>

---------

Co-authored-by: Stefan Dunca <47554641+stefandunca@users.noreply.github.com>
2024-07-17 11:11:34 +03:00
Patryk Osmaczko 9403475572 chore(communities)_: request missing channels' encryption keys in a loop
closes: status-im/status-desktop#14683
2024-07-16 16:44:50 +02:00
Michal Iskierko 5059c19aae feat_: add CentralizedMetricsInfo function
Issue #15446
2024-07-16 11:51:09 +01:00
Vitaly Vlasov 67364dadc8 chore_: small mailserver async fetching refactor 2024-07-16 10:53:42 +03:00
Jonathan Rainville 621b31a279
fix(community)_: fix pure readonly channels not respecting the right roles (#5513)
Fixes https://github.com/status-im/status-desktop/issues/15547
2024-07-15 13:53:20 -04:00
Prem Chaitanya Prathi 9a703162c4
refactor: only use shards (#5474)
* refactor_: use shards by default

* fix_: metadata lightclient check

* chore_: update go-waku
2024-07-15 20:55:12 +05:30
Emil Sawicki 094d26dc66 fix_: Add pending tx for collectibles 2024-07-15 13:00:21 +01:00
Prem Chaitanya Prathi 58a3cc1127 feat(waku)_: allow client to set store confirmations 2024-07-15 09:37:57 +01:00
Prem Chaitanya Prathi 6c0c267c3c feat_: flag to enable/disable sent message store query confirmations 2024-07-15 09:19:01 +01:00
Dario Gabriel Lipicar 21101c9444 feat(wallet)!: return routerV2 suggested routes whenever available, on top of error if the best route doesn't pass all checks 2024-07-12 17:59:41 -03:00
Arseniy Klempner a006d80acf
feat(telemetry)_: send peer count metric (#5460) 2024-07-12 13:37:55 -07:00
Godfrain Jacques 194d9444a5
feat_: locally handled methods package base structure (#5418) 2024-07-12 11:12:14 -07:00
Vaclav Pavlin 33c2f231b0
feat(waku)_: add PeerExchange rate-limit (#5507)
* feat(waku)_: add PeerExchange rate-limit

* fix_: unintentional wg.Add change
2024-07-12 15:21:21 +02:00
Vaclav Pavlin ea35803eef
feat(waku)_: add lightpush rate-limiter (#5504)
* feat(waku)_: add lightpush rate-limiter

* chore_: update go-waku
2024-07-12 12:34:56 +02:00
Vaclav Pavlin 5f0d344b73
fix(telemetry)_: properly handle the size of the retryCache slice (#5510) 2024-07-11 18:07:23 -07:00
richΛrd c477a3845f
chore_: bump go-waku (#5509) 2024-07-11 15:34:20 -04:00
richΛrd 56cc5c96c5
feat_: bump go-waku to introduce new keep alive interval (#5484)
- Also renames the existing keepAliveInterval to randomPeerKeepAliveInterval, and uses time.Duration instead of int
2024-07-11 14:36:34 -04:00
richΛrd 6ace9f9be0
chore_: rename shards.staging to status.staging (#5500) 2024-07-11 10:37:16 -04:00
Andrey Bocharnikov 02b822802c chore(community)_: serialise community jsons with image URLs
Fix status-im/status-desktop#15340
2024-07-11 18:55:24 +07:00
kaichao 798877788c
fix_: delivered message should not send envelope sent signal (#5502)
* fix_: delivered message should not send envelope sent signal

* chore_: refactor
2024-07-11 19:41:49 +08:00
Richard Ramos 80fe18bef9 feat_: `wakuext_relayPeersByTopic` 2024-07-11 12:32:31 +01:00
Andrea Maria Piana 9a59d6a459 feat(metrics)_: add centralized metrics
This commit adds support for centralized metrics.
There are two providers as of now, and we haven't quite decided which
one to go for, so for the time being both are supported.
It also introduces a new endpoint InitializeApplication that replaces
OpenAccounts
2024-07-11 10:05:31 +01:00