Commit Graph

3058 Commits

Author SHA1 Message Date
Andrea Maria Piana dea21f440a Linting and some fixes on contact requests handling 2023-02-08 17:48:09 +00:00
Andrea Maria Piana 7d72281815 check for nil envelopes 2023-02-08 17:48:09 +00:00
Andrea Maria Piana 9a598cc65b Bump go waku 2023-02-08 17:48:09 +00:00
Andrea Maria Piana 7523ff1104 Handle a few edge cases in contact requests 2023-02-08 17:48:09 +00:00
Roman Volosovskyi 7360e07224
Update AC notification on EditMessage 2023-02-08 16:29:24 +01:00
Alex Jbanca 2bcd7e97a6
fix(LinksPreview): Validate image links in the links preview request (#3169)
Motivated by: https://github.com/status-im/status-desktop/pull/9084
While we don't request preview data from Tenor because the url itself will contain the GIF image, we still need to validate the url in the preview request. This is done using a HEAD request where we expect the response status code to be 200 OK.
At the same time we will add the content type to the preview response.
2023-02-08 15:23:55 +02: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
RichΛrd 5b642d3bed
fix: enr exceeds 300 bytes (#3171) 2023-02-07 10:33:26 -04:00
Andrea Maria Piana c38ec00a2d Add community request to response when a response handled
In general, any time a piece of state is updated in the backend, that
should be propagated to the client through signals.

In this case, when a request was accepted, the client wasn't notified,
requiring them to re-fetch the accepted requests and causing
inconsistent state between status-go and client.
2023-02-07 13:17:19 +00:00
Anthony Laibe b6a33089c8 fix: ensure bonder fees are lower than amount 2023-02-06 17:18:30 +01:00
frank 5ea8906dda
temporary fix: data/log dir looks weired after local pair sync (#3159) 2023-02-06 17:55:41 +08:00
Richard Ramos 03c61e8847 chore: bump go-waku to also log output from go-libp2p into geth.log 2023-02-02 16:26:25 -04:00
Andrea Maria Piana 1c660c3525 Move images to shared namespace 2023-02-02 19:18:06 +00: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
Siddarth Kumar efee11d28a
Introduce QR code generation & serve it via the media server (#3154)
* introduce QR code generation
2023-02-02 19:26:00 +05:30
Roman Volosovskyi 550de3bff2
Add previews for youtube links with www subdomain 2023-02-02 12:08:19 +01:00
Roman Volosovskyi 551715f493
Adjust ConvertToKeycardAccount to make it compatible with mobile version 2023-02-02 11:50:13 +01:00
Omar Basem 2485143e20
Fix image fields (#3121)
* fix: image fields
2023-02-02 12:00:49 +04:00
Richard Ramos dc4c1a61b1 fix: reset bandwidth stats totals every day, and send message size 2023-02-01 16:43:57 -04:00
Richard Ramos ab2ff4eeb1 feat: protocol stats 2023-02-01 16:43:57 -04:00
Andrea Maria Piana 9e43905821 Fix broken migrations 2023-02-01 18:31:32 +00:00
frank 4a970683d1
throw error if account already exist when doing local pairing on receiver side (#3091) 2023-02-01 20:28:32 +08:00
Sale Djenic d44fa42cbf feat: `GetDerivedAddressForPath` endpoint added 2023-02-01 09:03:59 +01:00
yqrashawn d4ec412df2
feat: add deleted by xxx support (#3077) 2023-02-01 08:57:35 +08:00
Richard Ramos 17fcd947d2 fix(waku2): close discv5 iterator on logout 2023-01-31 14:26:09 -04:00
Andrea Maria Piana cefa0089dc
Split clock values for contacts 2023-01-31 15:43:00 +00:00
Alexander a3f59e223c
Fix for syncing settings (empty field is not getting added) (#3147)
* Fix for syncing settings (empty field is not getting added)

* Version bump
2023-01-31 14:37:41 +01:00
frank 2c38b9e673
reorder pair action by the order of occurrence (#3082) 2023-01-31 16:47:30 +08: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
Anthony Laibe 5d80c5cc42 fix: update go-waku 2023-01-30 13:39:49 +01:00
Pascal Precht f31e40264e refactor(import-tool): process import data in chunks
This commit refactors the discord import tool such that,
instead of loading all data to be imported into memory at
once, it will now perform the import on a per file basis.

This improves the memory pressure for the node performing
the import and seems to increase its performance as well.
2023-01-30 12:23:56 +01:00
Mikhail Rogachev ee9f8edfcf
Mark as read acivated notifications with CTA (#3126)
* fix: Accepting or dismissing contact request should mark AC notification as read

* fix: Accepting or declining community request should mark AC notification as read

* fix: Read notification status fo identity verification requests

* fix: Save whole notification object while handling contact requests

* fix: Remove unused functions from activity_center_persistence

* fix: Use Accepted and Dismissed flags for AC notifications with CTA

* fix: Mark notification as unread when we handle accepted verification request

* fix: Replace Warn with Error on fail to save notification, test fixes

* fix: Fix conditions for fetching AC notifications from the db

* fix: Review fixes for err name and conditions array
2023-01-28 13:52:53 +04:00
Richard Ramos ddfe16f56f fix: add cursors to store queries 2023-01-27 17:03:59 -04:00
Richard Ramos cccea5f14b chore(waku2): bump go-waku to notice disconnection from peers faster 2023-01-27 14:17:43 -04:00
Mikhail Rogachev dad7221f36
Hotfix: temporary restore cross compilation on Mac M1 (#3139) 2023-01-27 20:09:59 +04:00
Stefan 90b39eeb41 fix: merge balance history using block time
This change improves on the previous implementation which used
the block number that doesn't work with incompatible blockchains e.g. L1 vs. L2

Closes: #9205
2023-01-27 16:28:59 +04: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
Sale Djenic d8e2884d4e feat(keycard): `DeleteKeypair` endpoint added 2023-01-27 13:20:52 +01:00
Richard Ramos 6072bd17ab feat: send message type to opt-in telemetry service 2023-01-26 16:34:20 -04:00
Roman Volosovskyi fc03393e1b
Fix incorrect pagination of notifications 2023-01-26 19:23:08 +01:00
Richard Ramos 3553761cb5 fix: use parent ctx (of 30s instead of 20s) and log requestID in case of failures 2023-01-26 14:13:01 -04:00
Richard Ramos db74eaa0d9 fix: add missing waku2 store columns 2023-01-26 13:47:47 -04:00
Stefan a2ff03c79e feat: retrieve balance history for tokens and cache it to DB
Extends wallet module with the history package with the following
components:

BalanceDB (balance_db.go)

- Keeps track of balance information (token count, block, block timestamp)
for a token identity (chain, address, currency)
- The cached data is stored in `balance_history` table.
- Uniqueness constrained is enforced by the `balance_history_identify_entry`
UNIQUE index.
- Optimal DB fetching is ensured by the `balance_history_filter_entries`
index

Balance (balance.go)

- Provides two stages:
    - Fetch of balance history using RPC calls (Balance.update function)
    - Retrieving of cached balance data from the DB it exists (Balance.get
    function)
- Fetching and retrieving of data is done for specific time intervals
    defined by TimeInterval "enumeration"
- Update process is done for a token identity by the Balance.Update function
- The granularity of data points returned is defined by the constant
increment step define in `timeIntervalToStride` for each time interval.
- The `blocksStride` values have a common divisor to have cache hit
between time intervals.

Service (service.go)

- Main APIs
    - StartBalanceHistory: Regularly updates balance history for all
    enabled networks, available accounts and provided tokens.
    - GetBalanceHistory: retrieves cached token count for a token identity
    (chain, address, currency) for multiple chains
    - UpdateVisibleTokens: will set the list of tokens to have historical
    balance fetched. This is a simplification to limit tokens to a small
    list that make sense

Fetch balance history for ECR20 tokens

- Add token.Manager.GetTokenBalanceAt to fetch balance of a specific
block number of ECR20.
- Add tokenChainClientSource concrete implementation of DataSource
to fetch balance of ECR20 tokens.
- Chose the correct DataSource implementation based on the token
"is native" property.

Tests

Tests are implemented using a mock of `DataSource` interface used
to intercept the RPC calls.

Notes:

- the timestamp used for retrieving block balance is constant

Closes status-desktop: #8175, #8226, #8862
2023-01-25 22:25:50 +04:00
Stefan 5ff029dd57 feat: add balance_history DB table and update migration scripts
Updates status-desktop #8226
2023-01-25 22:25:50 +04:00
Richard Ramos eb36eb3ee5 fix: cancel mailserver requests when stopping messenger 2023-01-25 11:15:12 -04:00