Commit Graph

371 Commits

Author SHA1 Message Date
frank 4f4b7a9ce4 refactor_: add more default node config values for frontend when doing local pair sync 2024-05-07 18:17:25 +08:00
frank 22bea87bb2 fix_: not enough peers to publish 2024-05-02 05:40:49 +08:00
frank 8c5a735438 feat_: retry sending specific messages 2024-05-02 05:40:49 +08:00
frank 90b18d4f88 refactor_: set default node config values for frontend when doing local pair sync 2024-04-25 11:51:23 +08:00
Igor Sirotin 68bc9d39fd
fix_: set default user status to Automatic on account creationg (#5083) 2024-04-24 17:36:02 +02:00
Igor Sirotin e691a1b5bb
chore_: rename networks, proper icons for testnets (#5077) 2024-04-19 11:55:31 +01:00
Sean Hagstrom 55e2dc6a90
Allow for timestamps to be saved with accounts (#5049)
* fix_: allow for saving timestamp when saving account

* fix_: associate timestamp to restored account
2024-04-18 09:34:00 +02:00
kaichao e2a4a22896
chore: refactor status cli (#5010)
* chore: remove opts when create account

* chore: namings and better logging

* chore: config api modules with flag.

* chore: renaming

* chore: use methods on object

* fix: allow less characters for name

* fix: display name unit test

* chore: revert display name check.

* chore: change simulate display name.
2024-04-09 18:44:43 +03:00
Igor Sirotin 223a1d759e
Login endpoints improvements (#4980) 2024-03-28 15:01:44 +00:00
Mohamed Javid 1886dc3360
[Feature] Allow setting TestNetworksEnabled in Create/Restore Account (#4971)
This commit adds the ability to set the "TestNetworksEnabled" flag while creating an account.

Function affected: "generateOrImportAccount"

This helps Dev/E2E/PR builds to enable Test Networks by default and disable them on release/nightly builds.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-03-26 17:08:16 +05:30
Cuteivist 296b44f9ab
Chore: Fix default values (#4960) 2024-03-21 23:19:39 +01:00
kaichao f0d6a4f64f
Send direct message using CLI (#4913)
* feat: send dm with cli

* fix: send contact request works

* feat: accept contact request

* feat: send dm

* fix: log

* feat: more dm

* fix: lint

* refactor: fix comments

* fix: more refactor

* fix: refoctor more

* fix: more refacotr

* fix: refactor dm

* fix: context from cli

* fix: add light mode flag

* fix: remove sleep when start node

* fix: better log

* fix: better logger

* fix: lint

* fix: comments

* fix: const flags

* fix: named logger

* feat: inteactive mode

* fix: send message in loop

* fix: better context manage

* feat: cli serve

* fix: readme

* extract to multi files

* fix: status cli rpc

* feat: create and login account

* fix: missing messagess

* fix: missing messages because data sync is not started.

* feat: start http service

* fix: lint

* fix: more build instructions.

* fix: review comments
2024-03-19 08:31:35 +08:00
Sale Djenic f69ee07593 fix: calculating next nonce for optimism chain improved to align with calculation on mainnet and arbitrum 2024-03-13 15:21:33 +01:00
frank 3de945feaf chore: WakuV2 use config instead of settings 2024-03-07 17:20:53 +08:00
Mohamed Javid 6b7efd3dd8
[Chore] Remove POKT Sepolia and Goerli RPC URL (#4830)
This PR removes the POKT (Grove) URL for Sepolia and Goerli, as POKT dropped support.

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-03-06 15:23:32 +05:30
Alexander 26bc564b38
Peer syncing toggle (#4758)
* Peer syncing toggle

* bindata.go
2024-03-05 11:44:09 +01:00
Ivan Belyakov 20c1e7f88b fix: some chain colors in default networks config are wrong which
were saved to DB, so fix the colors in DB as well.

Closes https://github.com/status-im/status-desktop/issues/13762
2024-02-29 13:52:44 +01:00
Igor Sirotin 4fb27ec53a
fix: ensure db opened in UpdateNodeConfigFleet (#4822) 2024-02-27 19:00:20 +00:00
Igor Sirotin c32ab70c33
fix: lost wakuv2 nameserver with `CreateAccountAndLogin` (#4813) 2024-02-27 16:15:11 +00:00
Patryk Osmaczko 1f42f2582a Revert "Comment out all logged flaky tests"
This reverts commit 0bd4a06edc.
2024-02-27 11:00:29 +01:00
Igor Sirotin 34c693bdea
fix: override unsupported settings.fleet (#4785) (#4797)
* chore: remove fleet enum duplication
* fix: `updateNodeConfigFleet` on login
2024-02-22 19:32:24 +00:00
Godfrain Jacques 4584de34b0
fix(settings): It's not possible to switch the log level (#4667)
Closes #13139

Previously it was not possible to change the state of the Debug toggle.
This is because the code forced the setting the default value, ignoring
the database setup, hence always setting the DEBUG as LogLevel.

This PR adds :

- A RuntimeLogLevel to enable setting ephemeral loggig strategy on status-go
2024-02-02 13:08:48 -08:00
Mohamed Javid 7816ee186d
Update default networks list and build Wallet config on login (#4592)
This commit:
- Updates the default networks list to include the Sepolia test network
- Updates the "LoginAccount" method to build and include the wallet config in the node config

---------

Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2024-02-02 19:25:46 +05:30
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
Roman Volosovskyi 9b97ecbd90
Temporary disbale deactivation of tx detection routine for newly created profile (#4639) 2024-01-29 14:39:58 +01:00
frank 9050ed7aaf
fix: waku udp port conflict (#4610) 2024-01-24 09:09:43 +08: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
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6.
2024-01-18 20:29:33 +00:00
Richard Ramos d0ca4447c6
test: bump go-libp2p 2024-01-18 14:28:06 +00:00
Roman Volosovskyi 0bd4a06edc Comment out all logged flaky tests 2024-01-18 06:36:12 +00:00
Roman Volosovskyi 9aef13f83e
[#4200] Enable prevention of tx detection on unrevealed mnemonic/address (#4444) 2024-01-16 15:17:02 +01:00
Stefan 70b2cab096 chore(wallet) rename pokt urls to grove in config and tests
Change tests to account for new urls

Updates status-desktop #13189
2024-01-12 20:23:11 +01:00
Cuteivist 7814f39cd7
feat: Add advanced token settings (#4524) 2024-01-05 12:12:53 +01:00
Andrea Maria Piana 546f0b9d5c Set default fleet to shards.test 2023-12-20 12:53:32 +00:00
Omar Basem 1096b16336
feat: wallet - emoji and color (#4322)
* feat: init wallet with emoji
2023-12-06 14:47:38 +04:00
Roman Volosovskyi aee111e5ab
[#4200] Avoid tx watching for addresses which were not exposed 2023-12-01 12:30:42 +01:00
Dario Gabriel Lipicar 8848943422 feat: obtain rarible api keys 2023-11-27 20:30:18 -03:00
Sale Djenic 8641ec5dd5 feat(walletconnect)_: ethereum rpc calls support
Reference: https://docs.walletconnect.com/advanced/rpc-reference/ethereum-rpc
2023-11-27 10:49:23 +01:00
Richard Ramos 8e0621d1b1 chore: add cluster_id to DB, move clusterID to config file and load clusterID when switching fleets 2023-11-23 11:16:50 -04:00
Prem Chaitanya Prathi 9510ad0f5d fix: specify clusterid as 16 when using sharding fleet so that metadata proto negotiation doesn't fail 2023-11-23 11:16:50 -04:00
Dario Gabriel Lipicar 14a8df8948 feat: support alchemy sepolia api keys 2023-11-21 16:20:05 -03:00
Andrea Maria Piana 7b752ac34c Allow to set fleet 2023-11-17 12:23:54 +00:00
richΛrd 2c954d42cf
feat: replace DefaultPubsubTopic by Shard 32 (#4161) 2023-11-09 20:29:15 -04:00
Michal Iskierko 02e4cc6e1f feat: Send envelopes to telemetry service
Issue #12430
2023-11-08 11:34:10 +01:00
Andrea Maria Piana bafdf08529 Fix account not being stored 2023-10-24 19:01:46 +01:00
Roman Volosovskyi 42527723f2
[#4087] Omit history scanning on generated multiacc creation 2023-10-19 15:07:34 +02:00
Sale Djenic b348cca15c feat: added functionality to ask a client to sign a transaction and an endpoint to continue sending using provided signature
This functionality is needed in case the user wants to send a transaction and
signs it using the signature provided by the keycard (or any other compatible way).
2023-10-17 19:42:06 +02:00
Igor Sirotin 176bdd297d
feat: url unfurling settings (#4128) 2023-10-13 15:31:56 +01:00
Andrea Maria Piana 9034f0a984 Update waku nodes 2023-10-05 18:20:44 +01:00
Dario Gabriel Lipicar 2bcf08f273 feat: use Alchemy API key for Ethereum main/goerli 2023-10-05 09:40:18 -03:00
Patryk Osmaczko 53423e58ba fix: use proper migrations for protocol's test database
- use `appdatabse.DbInitializer{}` in tests to ensure consistent migrations

- remove protocol's open database functions due to improper
  initialization caused by missing node config migration

- introduce `PushNotificationServerConfig` to resolve cyclic dependency
  issues
2023-10-03 15:11:58 +02:00
frank 6bcf5f1289
Removed settings.Usernames and reactivate PreferredName (#3964)
* sync preferred name;
remove settings.usernames

* update account name when handle settings.preferred_name from backup message

* fix Error:Field validation for 'KeycardPairingDataFile' failed on the 'required' tag

* bump version

* rebase
2023-09-16 09:20:23 +08:00
Sale Djenic 6894295ac3 feat: register and maintain keycard local pairing file by `status-go`
Closes: #4003
2023-09-13 17:15:32 +02:00
frank e72a033930
fix unable to reset password on ios (#4016) 2023-09-13 08:21:13 +08:00
Sale Djenic c5fd1ee2c4 fix: converting profile to/from keycard/regular keypair handling 2023-09-07 13:02:25 +02:00
Michal Iskierko 8425e6d238 feat(Collectibles): Change Collectibles service name to CommunityTokens.
Issue #12011
2023-08-29 11:01:01 +02:00
Stefan 524c21834b fix(wallet) propagate multi-transactions IDs to transfers
Mainly refactor API to have control on pending_transactions operations.
Use the new API to migrate the multi-transaction ID from to transfers
in one SQL transaction.
The refactoring was done to better mirror the purpose of pending_transactions

Also:
- Externalize TransactionManager from WalletService to be used by
  other services
- Extract walletEvent as a dependency for all services that need to
  propagate events
- Batch chain requests
- Remove unused APIs
- Add auto delete option for clients that fire and forget transactions

Updates status-desktop #11754
2023-08-22 18:39:42 +02:00
Ivan Belyakov e922fc40d5 fix(wallet): do not create databases on verifyDatabasePassword call.
Fixed wallet database having uppercase password in some cases which does
not match lowercase password of app db.
2023-08-22 17:23:12 +02:00
Samuel Hawksby-Robinson 6f1c9af76b Added functionality to local pairing that makes client calls (more) idempotent 2023-08-21 15:44:32 +01:00
Ivan Belyakov c270a42e09 Fixed keystore reencryption failure on password change.
Added a test case for keystore decryption after password change.
Revert the app DB password on wallet password change failure
2023-08-18 09:00:56 +02:00
Ivan Belyakov ea38b788b3 tests: Added unit test for copying 'keypairs_accounts' table to the wallet db.
Added a unit test for changing app and wallet DBs passwords.
Refactored geth_backend to simplify and allow wallet db password changing.
Fixed opening database with wrong password.
2023-08-18 09:00:56 +02:00
Ivan Belyakov 2df9df10ab fix(tests): moved test db setup to a common place 't/helpers', created
interface for initializing db, which is implemented for appdatabase and
walletdatabase. TBD for multiaccounts DB.
Unified DB initializion for all tests using helpers and new interface.
Reduced sqlcipher kdf iterations for all tests to 1.
2023-08-18 09:00:56 +02:00
Ivan Belyakov d106b449b6 feat(wallet): move wallet-related tables to a dedicated db.
The only place where appDB is used in wallet is activity,
which refers to `keycards_accounts` table. So a temporary
table `keycards_accounts` is created in wallet db and updated
before each activity query.
2023-08-18 09:00:56 +02:00
Pascal Precht 4b07960fba feat: rehydrate community_tokens table upon account recovery
Closes https://github.com/status-im/status-desktop/issues/11188
2023-08-09 13:38:59 +02:00
frank 57e64122a8
fix: process backup messages when recovering account from seed phrase (#3850) 2023-08-08 16:01:21 +08:00
frank b81ad3fcac
Fix/stuck on keys saved (#3823)
* fixed: getting stuck on the "Keys saved" randomly

* bump version
2023-08-01 17:09:23 +08:00
Sale Djenic 4088edfa14 fix: changes needed to support recovering from waku in case recovering is done using keycard, but stored data refers to a regular profile and vice versa 2023-07-28 12:16:23 +02:00
Sale Djenic 6a5cdbaa8b fix: review comments applied
`GetKeypairs(includeRemoved bool)` removed
`GetActiveKeypairs()` added
`GetAllKeypairs()` added

`GetAccounts(includeRemoved bool)` removed
`GetActiveAccounts()` added
`GetAllAccounts()` added
2023-07-25 18:11:05 +02:00
Sale Djenic d5bba5d80f chore: wallet accounts improvements - soft delete 2023-07-25 18:11:05 +02:00
Sale Djenic 7c72d5ec99 fix: discard backed up messages if `ProcessBackedupMessages` is not set to `true`
If user followed onboarding flow to recover his account using seed phrase or keycard,
then `ProcessBackedupMessages` property of node config json object should be set to
`true`, otherwise it should be set to `false` or be omitted.
2023-07-25 07:50:43 +02:00
frank 71ca35bf34
Feat/sync customization color (#3702)
* sync customization color

* addressed feedback from @cammellos

* add param customizationColorClock to function generateOrImportAccount
2023-07-18 21:35:06 +08:00
Anthony Laibe 104d9c8ff6
feat: add related chain id to networks (#3697) 2023-07-13 16:03:49 +02:00
Jonathan Rainville 2a935100a0
fix: fix returning correctly when the password is incorrect (#3738) 2023-07-11 15:36:51 -04:00
Mohamed Javid 5fd9c5de66
[Fix] Send Login signal on error (#3737)
Signed-off-by: Mohamed Javid <19339952+smohamedjavid@users.noreply.github.com>
2023-07-11 15:13:16 -04:00
Ivan Belyakov 09dff82db5 feat(wallet): Move pending transactions to `transactions` module.
Handle creation and deletion of pending transactions automatically
on status-go side.
2023-07-11 16:07:42 +02:00
Sale Djenic 7063ad11aa chore: synchronization improvements applied to keycards
This is the second step of improvements over keypairs/keycards/accounts.
- `SyncKeycardAction` protobuf removed
- `SyncKeypair` protobuf is used for syncing keycards state as well as for all
keycards related changes
- `last_update_clock` column removed from `keypairs` table cause as well as
for accounts, any keycard related change is actually a change made on a related
keypair, thus a keypair's clock keeps the clock of the last change
- `position` column added to `keypairs` table, needed to display keycards in
the same order accross devices
2023-07-11 15:14:49 +02:00
Andrea Maria Piana c3ae0e98fe Enable lightclient 2023-07-07 14:49:40 +01:00
Andrea Maria Piana e08aad7d73 Send account/settings on login 2023-07-06 17:35:32 +01:00
frank a04e21013d
make sure profile image is saved before node started (#3693) 2023-06-30 09:18:42 +08:00
Andrea Maria Piana 40a59b3aca Allow passing nameserver on login
Nameserver is passed by the OS on creation/restore, this commit adds the
ability to pass it at login time.
We don't want to store it on disk since that's bound to change, and
currently there's a bug on golang that prevents getting the DNS from the
system on android.
2023-06-29 13:05:46 +01:00
Roman Volosovskyi 18a0bc3130
Set installation name on account creation and pairing 2023-06-29 10:14:12 +02:00
frank 7da1ed38d4
chore: remove checking color id (#3651)
* remove checking color id

* bump version
2023-06-21 21:24:53 +08:00
Alexander 49187cc553
Make profile photos visible by default (#3553)
* Make profile photos visible by default

* Slight refactoring
2023-06-19 18:55:04 +02:00
Alex Jbanca 3978048afa
feat: Make DB re-encryption fault proof (#3607)
Improve the error management in order to avoid DB corruption in case the process is killed while encrypting the DB.

Changes:
Use sqlcipher_export instead of rekey to change the DB password. The advantage is that sqlcipher_export will operate on a new DB file and we don't need to modify the current account unless the export is successful.
Keeping the rekey requires to create a DB copy before trying to re-encrypt the DB, but the DB copy is risky in case the DB file changes wile the copy is in progress. It could also lead to DB corruption.
2023-06-14 13:12:23 +03:00
Alex Jbanca 43b2c3b7ce
perf(sqlCipher): Increase cipher page size to 8192 (#3591)
* perf(sqlCipher): Increase cipher page size to 8192

Increasing the cipher page size to 8192 requires DB re-encryption. The process is as follows:
//Login to v3 DB
PRAGMA key = 'key';
PRAGMA cipher_page_size = 1024"; // old Page size
PRAGMA cipher_hmac_algorithm = HMAC_SHA1";
PRAGMA cipher_kdf_algorithm = PBKDF2_HMAC_SHA1";
PRAGMA kdf_iter = kdfIterationsNumber";

//Create V4 DB with increased page size
ATTACH DATABASE 'newdb.db' AS newdb KEY 'key';
PRAGMA newdb.cipher_page_size = 8192; // new Page size
PRAGMA newdb.cipher_hmac_algorithm = HMAC_SHA1"; // same as in v3
PRAGMA newdb.cipher_kdf_algorithm = PBKDF2_HMAC_SHA1"; // same as in v3
PRAGMA newdb.kdf_iter = kdfIterationsNumber"; // same as in v3
SELECT sqlcipher_export('newdb');
DETACH DATABASE newdb;

//Login to V4 DB
...

Worth noting:
The DB migration will happen on the first successful login.
The new DB version will have a different name to be able to distinguish between different DB versions.Versions naming mirrors sqlcipher major version (naming conventions used by sqlcipher), meaning that we're migrating from V3 to V4 DB (even if we're not fully aligned with V4 standards). The DB is not migrated to the v4 standard `SHA512` due to performance reasons. Our custom `SHA1` implementation is fully optimised for perfomance.

* perf(sqlCipher): Fixing failing tests

Update the new DB file format in Delete account, Change password and Decrypt database flows

* perf(SQLCipher): Increase page size - send events to notify when the DB re-encryption starts/ends
2023-06-13 18:20:21 +03:00
Khushboo-dev-cpp 8b91e3aaaf
chore: Add ColorId for Wallet accounts that can be shared with mobile (#3521) 2023-06-02 17:06:51 +02:00
frank 5d62a9eef4
Fix/mobile issue 16043 (#3560)
* update color hash/id on login

* bump version

* fix test

* fix conflict with LoginAccount
2023-06-01 20:57:05 +08:00
Andrea Maria Piana 7fd9fefdef Add LoginAccount endpoint
This commit adds LoginAccount endpoint.
This makes it consistent with CreateAccount and RestoreAccount as they
use similar config.

The notable difference with the previous endpoint is the API, which is
the same as CreateAccount/RestoreAccount, and the fact that it will
override your networks configuration.

Storing them in the config is now not needed anymore, as that's always
driven from the backend, and we won't allow custom networks in the new
wallet.
2023-06-01 10:05:11 +01:00
Igor Sirotin a7df4ed388
Local Pairing update for `StopNode` (#3536) 2023-06-01 08:33:57 +03:00
IvanBelyakoff 963f9e3dbd
fix(wallet): replace POKT rpc urls with archival ones (#3533) 2023-05-26 14:32:59 +03:00
Roman Volosovskyi ee4003279a
Changes necessary to restore wallet on mobile app 2023-05-25 21:08:34 +02:00
Sale Djenic b16a38408a tests: migration test fixed
An issue was that in the `0.97.3` version we didn't have `key_uid` column, later
it was added but there was no chance to set in `key_uid` value properly during
migration and we left it empty. Now in `accounts_and_keycards_improvements.up.sql`
script a constraint `CHECK (length(trim(key_uid)) > 0)` is set for `key_uid` column and
because of it migration test couldn't pass cause `key_uid` was empty.

How it is fixed: the same test account is used but just `key_uid` was added to table to
make migration tests pass again and stored Status test account data refer to `0.132.0`
version.
2023-05-25 19:46:47 +02:00
Sale Djenic 03f93e9f6c tests: tests affected by accounts improvements are fixed 2023-05-25 19:46:47 +02:00
Sale Djenic eeaaf0ce3f feat: accounts improvements applied
- old `accounts` table is moved/mapped to `keypairs` and `keypairs_accounts`
- `keycards` table has foreign key which refers to `keypairs.key_uid`
- `Keypair` introduced as a new type
- api endpoints updated according to this change
2023-05-25 19:46:47 +02:00
Andrea Maria Piana 6acb34bab7 Allow setting up wallet with new config
This commit does a few things:

1) Extend create/import account endpoint to get wallet config, some of
   which has been moved to the backend
2) Set up a loop for retrieving balances every 10 minutes, caching the
   balances
3) Return information about which checks are not passing when trying to
   join a token gated community
4) Add tests to the token gated communities
5) Fixes an issue with addresses not matching when checking for
   permissions

The move to the wallet as a background task is not yet complete, I need
to publish a signal, and most likely I will disable it before merging
for now, as it's currently not used by desktop/mobile, but the PR was
  getting to big
2023-05-19 13:23:21 +01:00
frank c7aebfeed3
Fix/mobile issue 15899 : error when trying login under updated password (#3493)
* fix: unable to reset password for newly created account using CreateAccountAndLogin

* remove unnecessary print

* add TestCreateAccountAndLogin

* update TestCreateAccountAndLogin

* bump version
2023-05-18 22:00:55 +08:00
yqrashawn 23138d0dbb
feat: start media server with no db right after logout (#3505) 2023-05-18 19:22:20 +08:00
yqrashawn 6fed50ce53
feat: media server and colorhash related change (#3500) 2023-05-18 14:27:16 +08:00