Commit Graph

942 Commits

Author SHA1 Message Date
Andrea Maria Piana 4fba5647d1
Use NewContractMaker for messenger 2023-08-29 14:17:49 +01:00
Michal Iskierko 8425e6d238 feat(Collectibles): Change Collectibles service name to CommunityTokens.
Issue #12011
2023-08-29 11:01:01 +02:00
Cuteivist dd3e408a4e
feat(wallet/activity): Added API for tx and multiTx details (#3939) 2023-08-24 14:23:40 +02:00
Dario Gabriel Lipicar 8d8bd4fc92 fix: handle opensea v2 api error for accounts holding no collectibles 2023-08-24 08:28:36 +02:00
Dario Gabriel Lipicar c494904f18 fix: use all available providers when fetching collectibles by ID 2023-08-24 08:28:36 +02:00
frank 22cd90e878
Fix/wallet watcher panic (#3940)
* fix wallet watcher panic

* bump version
2023-08-24 10:57:10 +08:00
Richard Ramos f9ec588c4e feat: use protected topics for communities
refactor: associate chats to pubsub topics and populate these depending if the chat belongs to a community or not
refactor: add pubsub topic to mailserver batches
chore: ensure default relay messages continue working as they should
refactor: mailserver functions should be aware of pubsub topics
fix: use []byte for communityIDs
2023-08-23 13:56:00 -04:00
Sale Djenic 1f8a3d3f5a feat: endpoint `MakePartiallyOperableAccoutsFullyOperable` added 2023-08-23 14:07:39 +02:00
Mykhailo Prakhov 86d969727f
feat: share CommunityTokens between privileged users (#3931)
feat: sync CommunityTokens between privileged users
feat: restore PrivilegeLevel for synchronized CommunityToken
2023-08-22 19:48:42 +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
Stefan afe0fcdcf4 fix(wallet) fix test on checking order of async task
Updates status-desktop: #11404
2023-08-22 18:39:42 +02:00
Andrea Maria Piana 8dd1b66d69 Always use protobufs by reference & generate handlers 2023-08-22 12:08:54 +01:00
Anthony Laibe 9d782edb4d feat: wallet custom token with communities 2023-08-22 12:41:35 +02:00
Igor Sirotin 09a988607d
chore: Moved link preview unfurlers to a separate package (#3917)
* MessengerLinkPreviewsTestSuite
2023-08-21 22:31:32 +03:00
Jonathan Rainville 3bf0bed78d
Fix pending join requests + API to get them (#3902)
Needed for https://github.com/status-im/status-desktop/issues/11851
2023-08-18 15:52:13 -04:00
Sale Djenic d05ce522f9 feat: transferring keystore files for selected keypair via local network
There is a desktop app feature where we need to transfer keystore files for selected
keypair/s only via local network using a QR code (of course, which are not migrated
to a keycard, otherwise we wouldn't need to do that).
2023-08-18 17:43:14 +02:00
Mykhailo Prakhov d1db60918d
feat: owner and token master permissions (#3912) 2023-08-18 17:29:44 +02:00
Dario Gabriel Lipicar ae17ad57c3 fix: change cursor of opensea v2 ownership endpoint 2023-08-18 11:55:39 -03:00
Dario Gabriel Lipicar ad0e2c2450 feat: implement opensea v2 endpoints 2023-08-18 09:59:38 -03:00
Dario Gabriel Lipicar 3734f03645 chore: split collection data provider 2023-08-18 09:59:38 -03: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
Michal Iskierko c4cd5775db feat(MasterToken): Add MasterToken.go
Small refactoring in Collectibles service in order to make API code more simple.
Add TokenInstance interface with some common functions.
Implementations of TokenInstance for TokenMaster, Collectibles and Assets contracts.

Issue #11276
2023-08-16 11:31:12 +02:00
Dario Gabriel Lipicar 25ff1dd758 feat: make collectibles api support multiple clients 2023-08-15 10:17:10 -03:00
Dario Gabriel Lipicar d6aae82566 chore: move multi-client scheduler implementation to separate file 2023-08-15 10:17:10 -03:00
Michal Iskierko 9d0acc2265 feat(OwnerToken): Owner token and master token deployment
Adding new smart contracts and generated go files.
Deploy token owner function and master token address getter.
Adding deployer and privilegesLevel columns to community_tokens table.
Passing addressFrom to API calls.

Issue #11250
2023-08-14 20:57:00 +02:00
Mikhail Rogachev 0950721a6d
feat: add 'GetCommunityMembersForWalletAddresses' endpoint (#3854)
For https://github.com/status-im/status-desktop/issues/11143
2023-08-14 12:59:02 +04:00
Sale Djenic 6ee7038809 fix: synced from field updated if recovered keypairs made fully operable 2023-08-10 16:09:29 +02:00
Jonathan Rainville b4b0d26aa4
feat(api): add api to get members revealed accounts (#3864) 2023-08-09 11:08:20 -04:00
Dario Gabriel Lipicar 4b394e088e fix: minor collectible provider fixes 2023-08-09 11:21:59 -03:00
Dario Gabriel Lipicar cd83a5fe00 chore: make use of new collectibles data DB 2023-08-09 11:21:59 -03:00
Dario Gabriel Lipicar 33c116f7b1 chore: implement collectibles data db cache 2023-08-09 11:21:59 -03: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
Sale Djenic 70c29a828e feat: new endpoints added
- `HasPairedDevices`
- `MakePrivateKeyKeypairFullyOperable`
- `MakeSeedPhraseKeypairFullyOperable`
2023-08-09 10:31:11 +02:00
Dario Gabriel Lipicar e30cba4303 fix: parse collectible ownership response from v3 alchemy endpoint properly
Fixes #11832
2023-08-08 13:20:36 -03:00
Volodymyr Kozieiev 7560540392
Regularly update the list of curated communities (#3827)
Regularly update the list of curated communities
2023-08-07 13:54:00 +01:00
Patryk Osmaczko ce82a8c0e5 chore: remove community invitations 2023-08-05 11:49:00 +02:00
Dario Gabriel Lipicar d5974dd52e feat: fetch collection metadata when missing 2023-08-04 09:54:18 -03:00
Cuteivist 1f510eae70
fix: Query token id for transactions (#3851) 2023-08-04 13:40:36 +02:00
Cuteivist 06c4eb5df9
feat: Handle collectible mint (#3852) 2023-08-04 12:47:22 +02:00
Igor Sirotin bbb8e99492
Fix syncing `blocked` contacts (#3799)
* fix(messenger_testing_utils): Always return response
* feat: test blocking/unblocking contacts with paired devices 
* fix: Remove recursive sync on contact blocking
* rename `syncing` flag to `fromSyncing`
2023-08-04 13:41:24 +03:00
Dario Gabriel Lipicar 078f71a235 feat: use new collectible account ownership providers 2023-08-03 12:53:00 -03:00
Dario Gabriel Lipicar c92a10b846 feat: implement alchemy and infura collectible account ownership endpoints 2023-08-03 12:53:00 -03:00
Dario Gabriel Lipicar 51d676bb08 chore: reorganized collectibles clients code 2023-08-03 12:53:00 -03:00
Dario Gabriel Lipicar c2ac108556 chore: rework data structures to accomodate new providers 2023-08-03 12:53:00 -03:00
frank 60143556ff
add api to create community for testing (#3818) 2023-08-03 08:24:11 +08:00
Jonathan Rainville 9267e58143
feat(api): add GetCommunityPublicKeyFromPrivateKey to api (#3828) 2023-08-02 13:11:26 -04:00
Anthony Laibe 0cd140c9b2 feat: change network selection strategy
1) Only fetch history for networks that match test mode enabled
* Trade Off: it will be only refetch in 12 hours so changing test mode won't trigger a refetch until app is restarted or 12 hours.
I think it is ok as change test mode is not a common use case
2) Do not consider networks that are enabled or not as this can be change more often than every 12 hours
2023-08-02 12:45:37 +02:00
Michal Iskierko 1592d2a079 feat(RemoteDestructedAmount): Add RemoteDestructedAmount function
Issue #1182
2023-08-02 12:19:03 +02:00
Mikhail Rogachev 4ad84d80cc
feat: Collecting community messages count metrics (#3802)
* feat: proposal for collecting community metrics

https://github.com/status-im/status-desktop/issues/11152

* feat: collecting community message metrics with test

* feat: implement both strategies for fetching community metrics

* fix: review fixes

* fix: calc counts for timestamps
2023-08-01 17:08:57 +04:00
Anthony Laibe 21d9d17cdc chore: reduce batch size for goerli arbitrum/optimism 2023-08-01 13:37:45 +02:00
Stefan eb8d74e1ae feat(wallet) add request id to activity events
Add and use the optional chainID in the wallet event structure.

Updates status-desktop #11380
2023-07-31 18:22:13 +02:00
Anthony Laibe a139871383 fix: celer check on tokens 2023-07-31 13:16:33 +02:00
Dario Gabriel Lipicar 10a42e639d feat: parallel collectibles fetching per account and chain 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar 57424e076c chore: moved collectibles ownership cache to db 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar 85d8e83394 feat: trigger collectibles fetch on new account 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar 5ba5611a8d feat: implement collectibles service 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar b1cf54974e chore: make opensea client return common types 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar 849be69299 chore: use single opensea client instance 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar f138964a9c chore: move scheduler to async dir 2023-07-27 12:12:03 -03:00
Dario Gabriel Lipicar b5224b3cc5 chore: rename and reorder types 2023-07-27 12:12:03 -03:00
Patryk Osmaczko 0465ab668d fix: populate API Chat with channel members 2023-07-27 11:35:59 +02:00
Patryk Osmaczko fa5b316324 chore: deprecate InviteUsersToCommunity 2023-07-27 08:45:01 +02:00
Pascal Precht 3d1b1bab57 feat: introduce messenger API to remove community tokens
This is to allow users to remove a community token if the deployment
transaction has been rejected.
2023-07-26 15:57:08 +02:00
Pascal Precht e8bac916ec !refactor: introduce `SaveCommunityToken()` and change `AddCommunityToken()`
**This is a breaking change!**

Prior to this commit we had `AddCommunityToken(token *communities,
croppedImage CroppedImage)` that we used to

1. add a `CommunityToken` to the user's database and
2. to create a `CommunityTokenMetadata` from it which is then added to
   the community's `CommunityDescription` and published to its members

However, I've then discovered that we need to separate these two things,
such that we can deploy a community token, then add it to the database
only for tracking purposes, **then** add it to the community description
(and propagate to members) once we know that the deploy tx indeed went
through.

To implement this, this commit introduces a new API
`SaveCommunityToken(token *communities.CommunityToken, croppedImage
CroppedImage)` which adds the token to the database only and doesn't
touch the community description.

The `AddCommunityToken` API is then changed that it's exclusively used
for adding an already saved `CommunityToken` to the community
description so it can be published to members. Hence, the signature is
now `AddCommunityToken(communityID string, chainID int, address
string)`, which makes this a breaking change.

Clients that used `AddCommunityToken()` before now need to ensure that
they first call `SaveCommunityToken()` as `AddCommunityToken()` will
fail otherwise.
2023-07-26 14:45:02 +02:00
Stefan d956a3e854 feat(wallet) chain id multi-transaction filtering
Updates status-desktop #11631
2023-07-26 13:54:55 +02:00
Anthony Laibe e5ce2c7c03 feat: make activity check optional 2023-07-26 09:07:55 +02:00
Sale Djenic 20bc27619b fix: function name change
`GetWatchOnlyAccounts(includeRemoved bool)` removed
`GetActiveWatchOnlyAccounts()` added
`GetAllWatchOnlyAccounts()` added
2023-07-26 08:23:55 +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
Mikhail Rogachev 631962ce88
feat: add api to remove private key (#3772)
* feat: add api to remove private key and separete owner from private key ownership

For https://github.com/status-im/status-desktop/issues/11475

* feat: introduce IsControlNode for Community

* feat: remove community private key from syncing

* feat: add IsControlNode flag to Community json serialisation

* Update protocol/protobuf/pairing.proto

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>

---------

Co-authored-by: Jonathan Rainville <rainville.jonathan@gmail.com>
2023-07-21 13:41:26 +04:00
Cuteivist 84bfdf4aab
feat: Add contract deployment tx type (#3770) 2023-07-20 16:04:30 +02:00
Sale Djenic 543b087896 fix: wallet accounts ordering improvements 2023-07-20 14:32:41 +02:00
Stefan 8926990c2d chore(wallet) retrieve all required activity header data as metadata
Add missing fields to activity metadata.

Updates status-desktop #11173
2023-07-20 11:34:41 +02:00
John Ngei cf2d72bfa8
Mute and Unmute community
* mute and unmute all community chats when community mute status changes

* unmute community when atleast one channel is unmuted

* fix: save community, extend the function to save muted state and mute duration
2023-07-19 15:14:42 +03:00
Dario Gabriel Lipicar 1f379aec1f feat: implemented multi chain collectible ownership provider 2023-07-19 07:58:05 -03:00
Michal Iskierko 7d9092e295 fix(Collectibles): Trigger transaction event when creating transaction
Issue #11565
2023-07-18 16:21:20 +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 0f8347dc59 feat: get chain id for url api 2023-07-18 13:50:13 +02:00
Stefan 64f7706567 chore(wallet) index activity filter columns to speed up queries
Implemented required benchmarks

Also

- refactor tests as needed
- don't filter temporary or incomplete transfers (transfers.loaded != 1)

Updates status-desktop #11351
2023-07-14 16:11:14 +02:00
Stefan e6705f264c chore(wallet) refactor activity tests 2023-07-14 16:11:14 +02:00
Dario Gabriel Lipicar 40eed0fd01 fix: ensure correct initialization order for wallet and mesenger services 2023-07-13 16:16:31 -03:00
Anthony Laibe 104d9c8ff6
feat: add related chain id to networks (#3697) 2023-07-13 16:03:49 +02:00
Stefan 8bfcb80ed6 fix(wallet) fix scan to/from hash when for multi_transactions 2023-07-13 00:24:36 +02:00
Dario Gabriel Lipicar 9ee523be99 fix: remove unsupported chainIDs from opensea client 2023-07-12 15:49:18 -03:00
Michal Iskierko ff0628c23b feat(Collectibles): Handle ERC20 burn and mint
Modify API to handle also ERC20 tokens.
Modify community_tokens table - keep supply as string since string is easly convertible to bigint.BigInt.
Use bigint.BigInt for supply functions and fields.

Issue #11129
2023-07-12 10:41:17 +02:00
Stefan 69412cf3a3 fix(wallet) fix scan of default NULL multi_transactions.*_network_id 2023-07-12 10:34:32 +02:00
Anthony Laibe 23492467b9 feat: clear balance cache after usage 2023-07-12 09:23:56 +02:00
Stefan 3ce851b84b feat(wallet) report new multi-transactions updates
Updates status-desktop #11233
2023-07-11 22:34:43 +02: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
Jonathan Rainville 2c275058ad
feat(community): add api to edit shared address (#3723) 2023-07-10 10:11:37 -04:00
Dario Gabriel Lipicar 66a21aa7e4 feat(wallet): detect ETH L2 to L1/L2 bridge transactions 2023-07-10 09:59:05 -03:00
Dario Gabriel Lipicar e6711c8cc8 feat(wallet): detect ETH L1 to L2 bridge transactions 2023-07-10 09:59:05 -03:00
Dario Gabriel Lipicar fb6e2a41f7 chore(wallet): reorganize multitx processing code 2023-07-10 09:59:05 -03:00
Anthony Laibe bc92df79d5 fix: fourbyte integration no arg 2023-07-10 12:26:42 +02:00
Stefan 9a30674590 feat(wallet) deliver pending changed events to clients
Add wallet events feed to TransactionManager and send pending changed
events on add and delete

Also

- Remove hardcoded values in the filter query
- Small improvement to query

Updates status-desktop #11233
2023-07-07 15:06:14 +02:00
Anthony Laibe dffcb708ea feat: add fourbyte github integration 2023-07-06 11:31:14 +02:00