Commit Graph

642 Commits

Author SHA1 Message Date
IvanBelyakoff 2c9714f0f8
fix(wallet/coingecko): Fix coingecko crash on race writing to tokens map (#3274) 2023-03-14 21:59:10 +03:00
IvanBelyakoff 804b5b43b4
feat(Wallet): implement token list from Uniswap (#3273)
Fixes #8807
2023-03-14 20:33:05 +03:00
Andrea Maria Piana 44a0f5b74d
Add collapsed community categories 2023-03-14 17:13:21 +00:00
Roman Volosovskyi 290579f74f
Update wakuext_buildContact 2023-03-14 16:57:33 +01:00
Dario Gabriel Lipicar bac7eb08ca feat(Wallet): add API to fetch collectibles in a paginated way 2023-03-10 11:27:03 -03:00
Dario Gabriel Lipicar 7b6fc87f89 fix(wallet): use OpenSea api key only for mainnet endpoint 2023-03-10 08:55:58 -03:00
Stefan f607164122 feat(wallet) add GetMultiTransactions wallet API
Updates status-desktop #7663
2023-03-07 19:38:31 +04:00
Anthony Laibe bbe4e57f0f fix: use correct chain client 2023-03-07 16:24:32 +01:00
Dario Gabriel Lipicar 3f3e8f8894 feat(Wallet): add opensea asset fetching by contract address and token id 2023-03-07 10:33:50 -03:00
Dario Gabriel Lipicar 67bcf10466 feat(Wallet): handle erc721 transfers 2023-03-07 10:33:50 -03:00
Sale Djenic b660672a60 chore(accounts): `type` column from `accounts` table updated
`type` column is set for all rows to appropriate value. Before this change
accounts which were generated from the keypair created importing seed phrase
had `generated` value for the `type`.

According to above, a function for generating an account sets the `type`
based on the passed derive from address.
2023-03-07 11:28:06 +01:00
Michal Iskierko 1b24342a75 feat(CommunityTokenMetadata): Keep token metadata in CommunityDescription
Community tokens has some metadata (image, description) which must be kept in waku(CommunityDescription).
Add CommunityTokenMetadata message to communities.proto.
Add []CommunityTokenMetadata to CommunityDescription.

Issue #9545
2023-03-07 08:40:47 +01:00
IvanBelyakoff 48078393f9
feat: Update saved addresses DB to store ENS, isTest flag and chains (#3183)
prefixes. Changed primary keys and API methods.
Fixed tests and added new ones.
Fixed saved addresses and transaction tests to use ':memory:' sqlite
DB instead of a tmp file to speed up testing by hundred of times.

Fixes #8599
2023-03-06 16:26:46 +03:00
Michal Iskierko 8a296407f3 fix(GetCommunityTokens): Change API call - use only communityId param
Fix #9725
2023-03-06 10:46:41 +01:00
Mikhail Rogachev 224f7461e9
feat: refactor activity center endpoints (#3237)
* feat: refactor activity center endpoints

* fix: restore activity center tests using new endpoints

* feat: Remove from activity center endpoints accepted flag

* feat: Activity Center review fixes
2023-03-03 18:31:48 +04:00
Pascal Precht 596660c110 feat: add CommunityTokenPermission to community description
This adds token permission capabilities to CommunityDescription such that token permissions can be created, updated and deleted.
2023-03-03 09:46:49 +01:00
Stefan 7c7c3a1f13 feat(wallet): keep multi-transactions relation after transaction is complete
Updates status-desktop #7663
2023-03-01 23:34:00 +04:00
Stefan 226fa7d696 chore(wallet) increase the all-time fetching sample count
Also:
- extend maximum expected DB entries to fetch
- fix test TestBalanceHistoryGetWithoutOverlappingFetch passing because of all-time stride side effect

Closes status-desktop #9624
2023-03-01 19:55:07 +04:00
Anthony Laibe 42ee98e295 feat: Add circuit breaker for market provider 2023-03-01 08:58:00 +01:00
Sale Djenic 93de01e32e feat: backup keycards to and fetch them from waku
Changes applied here introduce backing up keycards data to and fetch them from waku.
Information about received keycards data is sent via `sync.from.waku.keycards` signal.
2023-02-28 19:23:36 +01:00
frank 837bf2ca42
support local pairing after logged in as receiver; pair installation;(#3202) 2023-02-28 20:32:45 +08:00
Stefan 411607d43d chore(wallet): hardcode specific average block duration for L2
The L2 networks have their own block number and average block duration,
so we need to hardcode to keep the logic simplified.

Updates status-desktop: #9582
2023-02-28 12:03:43 +04:00
Anthony Laibe 60e1978bb5 feat: fallback rpc endpoint 2023-02-28 08:43:57 +01:00
Sale Djenic 2d16e7b891 feat(keycard): keycard details are being synced among devices
- sync all keycards state
- sync every keycard change
2023-02-27 16:03:02 +01:00
Sale Djenic 30e20b42a0 chore(keycard): `last_update_clock` column added to `keycards` table
`last_update_clock` will be used later for synchronization.
All keypair functions take clock value in consideration when
making a decision whether to perform an action or not.
2023-02-27 16:03:02 +01:00
Sale Djenic c207c88cd3 chore(keycard): `AddMigratedKeyPair` renamed to `AddMigratedKeyPairOrAddAccountsIfKeyPairIsAdded` which better describes what that function does 2023-02-27 16:03:02 +01:00
Michal Iskierko d0cc036d48 feat(CommunityTokens): Keep community token details in database
New table for community tokens.
API for get,add, update community token.

Issue #9233
2023-02-27 10:37:54 +01:00
Anthony Laibe e543fda4b5 feat: add coingecko fallback 2023-02-27 09:55:04 +01:00
Icaro Motta 999d8c0ee0
Support soft deletion for activity center notifications (#3201)
Adds a new column named `deleted` to the table `activity_center_notifications`. 

Related PR in Mobile https://github.com/status-im/status-mobile/pull/15106 for a lot more details of the feature.

Why? Relying on the `dismissed` column for soft deletion is no longer viable because the mobile & desktop clients should display dismissed notifications (sometimes), hence the need for a new column to truly represent soft deletion.
2023-02-24 20:47:04 -03:00
Mikhail Rogachev 766f27d8f3
feat: Add `ActivityCenterNotificationsCountBy` endpoint (#3206)
* feat: add fetching notifications by activity center group

* feat: add api for counting notifications by activity center group

* chore: activity center query code refactor

* feat: add endpoint returning ActivityCenterType(s) by ActivityCenterGroup

* chore: Remove activityGroup from status-go level

* feat: add endpoint for counting notifications with different conditions
2023-02-24 20:35:48 +04:00
Anthony Laibe f81758ec6e feat: add time to check 2023-02-23 18:23:29 +01:00
RichΛrd 0babdad17b
chore: upgrade go-waku to v0.5 (#3213)
* chore: upgrade go-waku to v0.5
* chore: add println and logs to check what's being stored in the enr, and preemptively delete the multiaddr field (#3219)
* feat: add wakuv2 test (#3218)
2023-02-22 17:58:17 -04:00
Khushboo-dev-cpp dd3f4058c2
fix: Return statement after sendToL2 was missing (#3217)
fixes #9483
2023-02-22 08:39:26 +01:00
Alexander 27730057d0
Support outgoing contact requests (#3120)
* Outgoing contact requests

* Test fix

* Test fix

* Fixes

* Bugfixes

* Bugfixes

* Almost there

* Removed the activity center notification

* Test update

* Almost ready

* Fixes

* Fixes
2023-02-21 19:08:11 +01:00
dlipicar 1d1a95091d
feat: implement currency formatting calculation (#3191) 2023-02-17 11:11:07 -03:00
Mikhail Rogachev f25088483c
feat: Add seen/unseen activity center setting (#3148)
* feat: Add seen/unseen activity center state

* feat: ActivityCenterState for grouping ActivityCenter unread messages cnt and seen state

* feat: always use messenger's addActivityCenterNotification & add state to the response

* Remove unused activity center endpoints form api and fix test
2023-02-17 14:08:08 +04:00
Stefan f4f6b25302 feat: convert history balance tokens to fiat
Add history.exchange sub-package with following responsibilities

- fetch and caches daily exchange rates for tokens
    - Partial update if missing form yesterday back
- Implement all time fetching special case
- Fetches the price of the token after merging entries for the selected
chains

history.service package changes

- Return ValuePoint instead of DataPoint
    - Value point contains the value in fiat as float64 instead
- Convert merged values from tokens balance (wei) to fiat

Other changes

- Move start/stop balance history to startWallet/stopWallet
- Move cryptocompare to thirdparty package to avoid recursive import
- Rename DataPoint.Value to DataPoint.Balance
- Don't merge entries for single chain
2023-02-15 18:17:21 +04:00
Andrea Maria Piana b69042e7d7 Fix duplicated notifications on receiving contact update
This commit fixes an issue where when accepting a contact request
the other end would display an extra notification.

It also changes WaitOnResponse to collect results. This should make
tests less flaky, since sometimes messages are processed in different
batches.
Now we need to be though exact on what we expect from the response (i.e
use == instead of >, otherwise the same behavior applies)
This uncovered a couple of issues with messenger.Merge, so I have moved
the struct to use a map based collection instead of an array.
2023-02-14 09:22:37 +00:00
Michal Iskierko 8acc46f758 feat(collectibles): Mint collectibles (ERC-721):
Add testing smart contract and go api.
Add collectibles service.

Issue #3051
2023-02-13 12:59:55 +01:00
Pascal Precht 6cf3574dcd fix(api): ensure getFavoriteGifs doesn't error when response is empty 2023-02-09 11:02:58 +01:00
Pascal Precht 41654bf49d fix(api): ensure getRecentGifs doesn't error when response is empty
Because the BLOB retrieved from the database can be empty, umarshalling
the data into JSON causes an error.

The API should simply return an empty list of there are no recent gifs.
2023-02-09 11:02:58 +01:00
Khushboo-dev-cpp 9b32c6067a
fix: Fix issue where best routes with not enough balance is returned (#3164) 2023-02-08 16:22:50 +05:30
Stefan 8934426cbd fix: request token balance for overridden tokens
Fix balance for tokens overrides are not requested in case of fall back
when etherscan bulk fetch not working.

Updates status-desktop: #9091
2023-02-07 19:38:53 +04:00
Anthony Laibe b6a33089c8 fix: ensure bonder fees are lower than amount 2023-02-06 17:18:30 +01:00
Sale Djenic 242c85cd6a fix: `DeleteAccount` and `AddMigratedKeyPair` declaration change
Both functions `DeleteAccount` and `AddMigratedKeyPair` require password to be provided
in order to delete account from the keystore properly (removing account from the cache and
deleting corresponding local keystore file).

Password parameter can be also an empty string, since there are cases when an account is
not added to the keystore (in case of keycard account), so we have nothing to delete.
2023-02-02 15:53:25 +01:00
Sale Djenic d44fa42cbf feat: `GetDerivedAddressForPath` endpoint added 2023-02-01 09:03:59 +01:00
Andrea Maria Piana cefa0089dc
Split clock values for contacts 2023-01-31 15:43:00 +00:00
Alexander 2fba8c4591
Support providing a list of activity types when counting unread notifications (#3141)
* Support providing a list of activity types when counting unread notifications

* Minor cleanup

* Test added

* Smaller fix

* Test small fix

* uint64
2023-01-30 20:43:13 +01:00
Andrea Maria Piana 7e1a894ab8 Add compressed key to multiaccount/messages/contacts 2023-01-30 16:40:40 +00:00
Stefan d024d36718 fix: fix wallet.history.TestServiceAtEnd
First check was relying on sorting result of two items that had the same
weight and is not guaranteed to be deterministic.
2023-01-30 20:11:01 +04:00