Commit Graph

5050 Commits

Author SHA1 Message Date
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
IvanBelyakoff bf6c0c4cc6
fix(wallet)_: fix provider down event happening too often (#5595)
* fix(wallet)_: fix provider down event happening too often

- handle context cancelled error
- do not count expected errors when calling tokenURI as providers
  errors
- use archival not for optimism (was silently added by Grove makeing the
  old URL non-archival)

Closes #5555

* test(wallet)_: add test for collectibles manager to verify that main
circuit is not tripped calling by tokenURI method
2024-07-29 18:07:43 +01:00
frank 179dea9907 fix(wallet)_: update default wallet account's color to blue for old mobile user 2024-07-29 20:27:37 +05:30
Sale Djenic 18885b3663 test_: flaky router tests fixed
Closes https://github.com/status-im/status-go/issues/5601
2024-07-29 16:53:56 +02:00
Igor Sirotin 65334d42ed
fix_: remove personal information from logs (#5608) (#5612) 2024-07-29 10:29:24 -04:00
Sale Djenic 20c1b83b7c chore_: when returning errors, give precedence to custom (network) errors 2024-07-29 10:05:56 +02:00
Sale Djenic 9472e18315 fix_: setting best route only when we have it 2024-07-29 10:05:56 +02: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
Godfrain Jacques 4ddf9f2727
fix_: fix switchEthereum api when processing chain input string (#5589)
fix #5587
2024-07-26 13:00:12 -07:00
richΛrd 3792d37df4
fix_: add missing message verification flag when creating an account (#5570) 2024-07-26 15:19:19 -04:00
Godfrain Jacques 72baaebe39
fix_: conversion from int to string causes code scanning error (#5600)
fixes #5599
2024-07-26 11:56:48 -07:00
Godfrain Jacques f6d7d1429c
fix_: return default chainID instead of throwing error for unregistered dApp (#5584)
fix #5583
2024-07-26 09:18:01 -07: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
Andrey Bocharnikov fe588c7a79 fix(mailservers)_: ToggleUseMailservers should connect/disconnect from active store node
fixes status-im/status-desktop#15032
2024-07-26 22:24:55 +07:00
flexsurfer 173bdb590c
feat_: migrate v1 keycard account (#5557) 2024-07-26 16:20:41 +02:00
belalshehab 03cb3ad0ab fix(Wallet)_: Add quotes around token symbol in insufficient balance error messages to ensure valid JSON parsing 2024-07-26 13:16:23 +03:00
Igor Sirotin 977a93b005
fix_: make StoreNodeRequestManager filters ephemeral (#5582) 2024-07-26 08:53:08 +01:00
Igor Sirotin 870ede0829
fix_: tests (#5585)
* fix_: router tests errors sprintf

* chore_: skip flaky tests
2024-07-25 23:27:12 +01:00
Godfrain Jacques 0ecc266b1e
feat_:implement connector requestPermissions api (#5566) 2024-07-25 09:02:26 -07:00
Godfrain Jacques 5e88d5b498
fix_: return array of account without accounts key (#5576) 2024-07-25 06:10:13 -07:00
saledjenic 2bbdb35f6c
Added improvements in resolving the best route (#5569)
* fix_: filtering out routes which do not match the amount in

* fix_: finding the best route logic updated

* fix_: "to" chains being used in sending bridge tx via hop are more explicit

Using `ChainIDTo` depicts better an intention which chain should be used.

* chore_: checking for required balance improved

An error contains now more details, for which token on which chain there is not enough balance for
executing a tx. Also check for required balance now calculates in fees for all tx that possibly can be
sent from the same chain.
2024-07-25 08:15:30 -04: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