80 Commits

Author SHA1 Message Date
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
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 0bd4a06edc0893752378c1a57b35364144e3e169.
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
9050ed7aaf
fix: waku udp port conflict (#4610) 2024-01-24 09:09:43 +08:00
Siddarth Kumar
926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6c5642830354740d045f453eb3e77e8.
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
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
Andrea Maria Piana
7b752ac34c Allow to set fleet 2023-11-17 12:23:54 +00:00
Andrea Maria Piana
bafdf08529 Fix account not being stored 2023-10-24 19:01:46 +01:00
Andrea Maria Piana
9034f0a984 Update waku nodes 2023-10-05 18:20:44 +01:00
Sale Djenic
c5fd1ee2c4 fix: converting profile to/from keycard/regular keypair handling 2023-09-07 13:02:25 +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
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
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
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
frank
7da1ed38d4
chore: remove checking color id (#3651)
* remove checking color id

* bump version
2023-06-21 21:24:53 +08: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
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
yqrashawn
23138d0dbb
feat: start media server with no db right after logout (#3505) 2023-05-18 19:22:20 +08:00
Sale Djenic
189c7a6919 chore: keypairs package which actually refers to keycards is renamed to keycards package
This commit renames few api endpoints:
- old `AddMigratedKeyPairOrAddAccountsIfKeyPairIsAdded` renamed to `AddKeycardOrAddAccountsIfKeycardIsAdded`
- old `GetAllMigratedKeyPairs` renamed to `GetAllKnownKeycardsGroupedByKeyUID`
- old `GetMigratedKeyPairByKeyUID` renamed to `GetKeycardByKeyUID`
- old `DeleteKeypair` renamed to `DeleteAllKeycardsWithKeyUID`
2023-05-10 09:27:51 +02:00
Sale Djenic
31144ed5a3 chore: password removed from the DeleteAccount function
Asking for a password when removing a key is not necessary.
2023-05-09 10:48:44 +02:00
Eng Zer Jun
83ad76637a
test: use T.TempDir to create temporary test directory (#2746)
This commit replaces `os.MkdirTemp` with `t.TempDir` in tests. The
directory created by `t.TempDir` is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using `os.MkdirTemp`
needs to be removed manually by calling `os.RemoveAll`, which is omitted
in some tests. The error handling boilerplate e.g.
	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}
is also tedious, but `t.TempDir` handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2023-04-26 21:39:51 +01:00
Sale Djenic
a0b062b503 chore: unused latest_derived_path removed from settings table 2023-04-21 16:35:24 +02:00
Sale Djenic
e9482e3974 tests: updated due to updating old accounts as a part of migration process 2023-03-28 16:19:27 +02:00
Sale Djenic
c8994fe175 test: TestConvertAccount test update
This tests the entire process of converting a regular account to a keycard
account and then converting that keycard account back to a regular account.

For the need of this test I had to improve `DeleteAccount` function, cause the
previous implementation didn't remove account from the keystore cache, but
only from the keystore.
2023-01-27 13:20:52 +01:00
cceba787fa
replace deprecated ioutil.TempDir with os.MkdirTemp
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2023-01-03 15:40:11 +01:00
Sale Djenic
77b7ce5a09 fix: corresponding keystore files are deleted when account is migrated to a keycard 2022-11-09 18:07:16 +03:00
Sale Djenic
d89c0c8d9e fix(keycard): convert to keycard action removes keystore and doesn't change the pass properly fixed 2022-09-27 12:13:50 +02:00
saledjenic
2e51450393
fix: avoid imported wallet account deletion while converting it to keycard account (#2827)
- imported wallet accounts via seed phrase or private key are not deleted anymore
when migrating any of those key pairs to a keycard
2022-08-31 18:11:42 +02:00
Samuel Hawksby-Robinson
26b33aa09d Added AccountType to enforce strict typing on Accounts
Also a tpyo was fixed, probably introduced by me.
2022-08-25 22:01:43 +01:00
Vitaliy Vlasov
3dee94e505 Wallet sync for generated accounts 2022-07-06 19:24:43 +03:00
Vitaliy Vlasov
011238b1d1 Wallet sync 2022-05-18 15:25:20 +03:00
Richard Ramos
c71ccdb4e2
chore: test that login still works with 0.97.3 (#2661) 2022-05-04 10:46:49 -04:00
Samuel Hawksby-Robinson
e67592d556
Sync Settings (#2478)
* Sync Settings

* Added valueHandlers and Database singleton

Some issues remain, need a way to comparing incoming sql.DB to check if the connection is to a different file or not. Maybe make singleton instance per filename

* Added functionality to check the sqlite filename

* Refactor of Database.SaveSyncSettings to be used as a handler

* Implemented inteface for setting sync protobuf factories

* Refactored and completed adhoc send setting sync

* Tidying up

* Immutability refactor

* Refactor settings into dedicated package

* Breakout structs

* Tidy up

* Refactor of bulk settings sync

* Bug fixes

* Addressing feedback

* Fix code dropped during rebase

* Fix for db closed

* Fix for node config related crashes

* Provisional fix for type assertion - issue 2

* Adding robust type assertion checks

* Partial fix for null literal db storage and json encoding

* Fix for passively handling nil sql.DB, and checking if elem has len and if len is 0

* Added test for preferred name behaviour

* Adding saved sync settings to MessengerResponse

* Completed granular initial sync and clock from network on save

* add Settings to isEmpty

* Refactor of protobufs, partially done

* Added syncSetting receiver handling, some bug fixes

* Fix for sticker packs

* Implement inactive flag on sync protobuf factory

* Refactor of types and structs

* Added SettingField.CanSync functionality

* Addressing rebase artifact

* Refactor of Setting SELECT queries

* Refactor of string return queries

* VERSION bump and migration index bump

* Deactiveate Sync Settings

* Deactiveated preferred_name and send_status_updates

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2022-03-23 18:47:00 +00:00
Bitgamma
6c2e9652d0
add account conversion (#2277) 2021-07-20 14:48:10 +03:00
Andrea Maria Piana
b3a5455c46 Fix some tests & upgrade contracts 2021-07-20 10:57:38 +02:00
Andrea Maria Piana
d50fee6bb2 Handle connection state 2021-05-21 07:22:58 +02:00
Andrea Maria Piana
7387049d4b Upgrade linter and address issues 2020-12-28 16:55:14 +01:00
Andrea Maria Piana
c78e084eb9 Fix tests and lint 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson
829108c96f Changes to tests to include account where required for account injection 2020-12-17 14:10:00 +01:00