272 Commits

Author SHA1 Message Date
yqrashawn
6fed50ce53
feat: media server and colorhash related change (#3500) 2023-05-18 14:27:16 +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
frank
a2ed1b78dd
feat:support backup/sync ens name (#3415) 2023-04-26 23:37:18 +08:00
Sale Djenic
c8ef2c1a7f fix: deleting derived from address keystore file applied to all keypairs being migrated instead to a profile keypair only 2023-04-25 14:03:32 +02:00
Sale Djenic
a0b062b503 chore: unused latest_derived_path removed from settings table 2023-04-21 16:35:24 +02:00
Andrea Maria Piana
522c578a35 Set keystore dir & network id 2023-03-30 13:39:54 +01:00
Andrea Maria Piana
3b97f94ccc Fix logging directory, and allow a few more fields to be set by the
client
2023-03-30 13:39:54 +01: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
Roman Volosovskyi
91c6949cd2
Return keyUID on succesfull validation of mnemonic 2023-03-28 10:52:06 +02:00
Roman Volosovskyi
bcca0b399d
Add PreviewPrivacy to CreateAccountRequest 2023-03-27 09:33:03 +02:00
Andrea Maria Piana
e2082bf5bd Add customization color 2023-03-24 14:22:29 +00:00
Pascal Precht
2cbced95c5 Check token funds when handling community requests to join
This adds checks to `HandleCommunityRequestToJoin` and
`AcceptRequestToJoinCommunity` that ensure a given user's revealed
wallet addresses own the token funds required by a community.

When community has token permissions of type `BECOME_MEMBER`, the
following happens when the owner receives a request:

1. Upon verifying provided wallet addresses by the requester, the owner
   node accumulates all token funds related to the given wallets that
   match the token criteria in the configured permissions
2. If the requester does not meet the necessary requirements, the
   request to join will be declined. If the requester does have the
   funds, he'll either be automatically accepted to the community, or
   enters the next stage where an owner needs to manually accept the
   request.
3. The the community does not automatically accept users, then the funds
   check will happen again, when the owner tries to manually accept the
   request. If the necessary funds do not exist at this stage, the
   request will be declined
4. Upon accepting, whether automatically or manually, the owner adds the
   requester's wallet addresses to the `CommunityDescription`, such that
   they can be retrieved later when doing periodic checks or when
   permissions have changed.
2023-03-23 08:40:31 +01:00
Andrea Maria Piana
31ae4c958b Add RestoreAccountAndLogin endpoint 2023-03-22 13:31:16 +00:00
Andrea Maria Piana
ccc8c9122c Dont set backup disabled datadir in defaults 2023-03-22 13:31:16 +00:00
Andrea Maria Piana
6775e79920 Make image path optional 2023-03-20 19:36:41 +00:00
Andrea Maria Piana
ba2aa3f83e Support display name/images/password/mnemonic 2023-03-20 17:26:25 +00:00
Andrea Maria Piana
4be978a2fe Address feedback 2023-03-16 17:02:11 +00:00
Andrea Maria Piana
3d2fd26d80 Add CreateAccount endpoint 2023-03-16 17:02:11 +00:00
Andrea Maria Piana
5d0e08ec7b Add spiff workflow cmd 2023-03-16 14:31:34 +00:00
Pascal Precht
6859a1d3b7 Add methods to sign and recover messages/signatures to AccountManager
Also, make AccountManager a dependency of Messenger.
This is needed for community token permissions as we'll need a way to access wallet accounts
and sign messages when sending requests to join a community.

The APIs have been mostly taken from GethStatusBackend and personal service.
2023-03-16 12:25:06 +01:00
frank
837bf2ca42
support local pairing after logged in as receiver; pair installation;(#3202) 2023-02-28 20:32:45 +08:00
Anthony Laibe
c786528965 feat: improve change db password without need to be logged in 2023-02-18 22:18:14 +01:00
Siddarth Kumar
cf84c40320
PR to fix media server sleep issue (#3189)
* fix media-server sleep wake up issue

we now use waku v2 and hence messenger was nil.
Since it was nil, the logic in place responsible for triggering app state events was not firing and hence media server would become un-responsive after a sleep event.

this commit fixes that.

Co-Authored-By: Andrea Maria Piana <andrea.maria.piana@gmail.com>


---------

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2023-02-15 13:44:00 +05:30
Andrea Maria Piana
dfe40ff6bd Init keystore fix
We delegate to services to init the keystore file, but there's a race
condition that can be triggered, whereby the keystore file is not
initialized before login, and that results in the user not being able to
login.

This commit changes the services so that the keystore is initialized
before login, I have left also the code in services just to make sure
nothing relies on it, but it could probably be removed.
Initializing keystore twice seems like a noop if already initialized.
2023-02-10 11:17:16 +00:00
Roman Volosovskyi
551715f493
Adjust ConvertToKeycardAccount to make it compatible with mobile version 2023-02-02 11:50:13 +01:00
Andrea Maria Piana
7e1a894ab8 Add compressed key to multiaccount/messages/contacts 2023-01-30 16:40:40 +00: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
Sale Djenic
6e656448ba feat(keycard): ConvertToRegularAccount endpoint added
It converts a keycard user to a regular user, setting all necessary details
that logged in account looks like it has never been a keycard account.
2023-01-27 13:20:52 +01:00
Sale Djenic
902d4b7501 fix(keycard): convert regular to a keycard account process fixed 2023-01-27 13:20:52 +01:00
frank
dc87d6bb0f
get messenger from account service when local pairing (#3069) 2023-01-11 19:30:54 +08:00
frank
ec7c0e9c7d
Sync all devices after initial pairing (#3047) 2023-01-06 20:21:14 +08: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
frank
9137257638
synchronize display name (#2989) 2022-12-29 14:16:19 +08:00
Sale Djenic
1340a55c1d feat: backup profile data to waku and sync them from waku
Changes applied here introduce backing up profile data (display name and identity
images) to waku and fetch them from waku. Information about those data is sent
as a separate signal to a client via `sync.from.waku.profile` signal.

New signal `sync.from.waku.progress` is introduced which will be used to notify a client
about the progress of fetching data from waku.
2022-12-23 15:07:14 +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
Richard Ramos
6300751e36 chore: upgrade go-waku and log about messages sent/received 2022-11-09 17:39:17 +03:00
Andrea Maria Piana
fc836e4c76 upgrade ethereum 2022-10-26 09:39:30 +02:00
Richard Ramos
bf9abfc350
feat: make kdf iterations configurable when creating a multiaccount (#2796) 2022-09-27 16:27:20 -04: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
Anthony Laibe
cdca3d86e2
feat(token): enable changing token address from the node config (#2848)
Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2022-09-13 11:30:52 +02:00
Samuel Hawksby-Robinson
9fda3a968e Added and integrated StartUpPairingServer
Also moved Mount() calls into the respective Server/Client send() funcs
2022-09-09 13:24:56 +01: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
Richard Ramos
86054875a4
fix: add mode build param and change ipfs gateway accordingly
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2022-08-26 18:57:55 +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
Anthony Laibe
8c0f230644
feat: Simple transaction router (#2686) 2022-06-09 15:09:56 +02:00
Sale Djenic
82550fca34 the way of initializing networks list is updated 2022-05-26 16:21:06 +02:00
Anthony Laibe
7227ae1c8e
fix: merge node config allows overide (#2664) 2022-05-24 12:57:45 +02:00