Commit Graph

277 Commits

Author SHA1 Message Date
Andrea Maria Piana f115b8d289 Request/Decline access to communities 2021-02-26 15:35:43 +01:00
Volodymyr Kozieiev c38439e664
Listen for delivered messages (#2150) 2021-02-23 17:47:45 +02:00
Samuel Hawksby-Robinson 730f540a0b
Adding Transactions messages to the localnotifications (#2142)
* Revert "Revert "Expand Local Notifications to support multiple Notification types (#2100)""

This reverts commit 5887337b88.

* Revert "Revert "fix protocol.MessageNotificationBody marshalling""

This reverts commit cf0a16dff1.

* Bump version to 0.70.0

* Added localnotifications for Transaction messages

* Fixed bug where Message.SigPubKey was presumed to be set

* Added lookup for contact existing in Messenger.allContacts

Additionally added functionality to add a contact to the messenger store if it isn't present

* Get chat directly from Messenger.allChats store

Co-authored-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2021-02-23 07:37:08 +00:00
Roman Volosovskyi 363ab0a2ab
[wallet] Avoid some unnecessary RPC requests
- avoid making RPC request for `zero - zero` range
- avoid checking of nonce for a lower block in the range if it is zero
  in a higher block
- on `wallet_getTransfersByAddress` scanning of history is skipped if
  zero block is already reached
- no need to fetch block num before fetching token balances
2021-02-17 13:55:27 +02:00
Samuel Hawksby-Robinson db962e0135 Added API for getting on ramp data 2021-02-17 09:53:45 +01:00
Roman Volosovskyi 8268083008
[wallet] Merge blocks ranges when possible
- old existing ranges are merged when wallet service is started
- a new range is merged with an existing one if possible

This will decrease the number of entries in blocks_range table as
currently it can grow indefinitely (@flexsurfer reported 23307 entries).

This change is also needed for further optimisations of RPC usage.
2021-02-09 16:32:20 +02:00
Andrea Maria Piana eec9518825
Revert "Revert "fix protocol.MessageNotificationBody marshalling""
This reverts commit cf0a16dff1.
2021-02-05 16:48:46 +02:00
Andrea Maria Piana 84db2fb472
Revert "Revert "Expand Local Notifications to support multiple Notification types (#2100)""
This reverts commit 5887337b88.
2021-02-05 16:48:45 +02:00
Roman Volosovskyi e18050b87f
Make sure tokens balances can be fetched 2021-02-03 11:54:24 +02:00
Andrea Maria Piana 5887337b88
Revert "Expand Local Notifications to support multiple Notification types (#2100)"
This reverts commit 46157dc4dc.
2021-01-26 09:40:05 +01:00
Andrea Maria Piana cf0a16dff1
Revert "fix protocol.MessageNotificationBody marshalling"
This reverts commit fbec17af18.
2021-01-26 09:40:04 +01:00
Andrea Maria Piana a1b3e3a772
Clean topics that we don't listen to
There was a bug on status-react where it would save filters that were
not listened to.
This commit adds a task to clean up those filters as they might result
in long syncing times.

This commit also returns topics/ranges/mailserves from messenger in
order to make the initialization of the app simpler and start moving
logic to status-go.

It also removes whisper from vendor.
2021-01-26 09:39:57 +01:00
Roman Volosovskyi d8bccaff18
[wallet] Detect non archival RPC node 2021-01-25 14:52:14 +02:00
Roman Volosovskyi fbec17af18 fix protocol.MessageNotificationBody marshalling 2021-01-15 14:00:51 +01:00
Roman Volosovskyi 79716227db
[wallet] Show PNs right after enabling 2021-01-13 12:33:09 +02:00
Samuel Hawksby-Robinson 46157dc4dc
Expand Local Notifications to support multiple Notification types (#2100)
* Initial work on expanding Local Notifications

Adding functionality to support multiple notification types in Notification.Body. Currently have a bug that I think is caused by a the jsonMarshal func not working as intented, need to resolve this next before proceeding

* Fixed json.Marshaller issue and implemented json.Unmarshaller

* Tweak errors, go convention is errors don't begin with capital letters

* Added notificationMessageBody with un/marshalling

Also removed the Body interface

* Added check for bodyType mismatch

* Implement building and sending new message notifications

* Refactor to remove cycle imports

* Resolved linting issue ... Hopefully

* Resolving an implicit memory aliasing in a for loop

* version bump

* Added Notification.Category consts
2021-01-12 14:28:27 +00:00
Andrea Maria Piana b331b61807 Add ClearHistory & DeactivateChat methods 2021-01-11 13:36:05 +01:00
Andrea Maria Piana 7387049d4b Upgrade linter and address issues 2020-12-28 16:55:14 +01:00
Andrea Maria Piana 3be6d86326 Remove user from community 2020-12-23 17:20:55 +01:00
Andrea Maria Piana a0d5f66c8f Leave import community data 2020-12-23 17:20:55 +01:00
Andrea Maria Piana 5d929c3584 Handle organisation membership requests 2020-12-23 17:20:55 +01:00
Roman Volosovskyi bf703254ba
[wallet] Dispatch event on tx history fetching failure 2020-12-21 15:45:10 +02:00
Andrea Maria Piana c78e084eb9 Fix tests and lint 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson e0eb96a992 Fix failing tests due to account not present in test env 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson ca80140c1a Resolved broken tests 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
Samuel Hawksby-Robinson 30c2b64cf5 Test condition MUST REVERT 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 16fecf5520 Passing Master info to Messenger 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 094ea2ce85 Added Identity Images to multi-accounts GetAccounts() 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 87f161da08 Moved identity image endpoints to multi-accounts api 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 279697128d Update API endpoint to return objects 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson b84fc9b938 Resolved more linting 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson b7a7035894 Resolved further linting issues 2020-12-17 14:10:00 +01:00
Samuel Hawksby-Robinson 193ab30ada Refactor injecting multiaccounts into messenger and service 2020-12-17 14:10:00 +01:00
Roman Volosovskyi d39ca7fea4
[wallet] Fix multiple notifications on a single erc20 transfer 2020-12-11 16:47:38 +02:00
Andrea Maria Piana d65946e9c0 Use IsOwnAccount instead of Wallet when watching for transactions
There was an issue in using the `Wallet` flag when checking accounts to
watch for transactions.
`Wallet` indicates that it's the default wallet, not whether is a wallet
account.
That can only be checked by looking at the type (and the `Wallet` flag).
If the type is `generated`, `key` or `seed` it should be watched for
transactions.
2020-12-07 16:12:50 +01:00
Andrea Maria Piana 156c0de832 Add SendChatMessages endpoints
This commit adds an endpoint to batch the sending of messages.
This is useful to simplify client logic when sending a batch of messages
and ensuring the correct order in the message stream.

It currently implements only what's needed, and naively return an error
if any of the messages fail.
2020-12-03 18:25:53 +01:00
Andrea Maria Piana 0304b3fa46 [Fixes: #2068] Pass topics for mailserver
We were not actually passing the topics in the request, therefore we
were using bloom filter for query, which resulted in long syncing times
for some users.
2020-11-30 12:03:27 +01:00
Roman Volosovskyi 002f9a5597
[wallet] Reduce number of RPC requests
- Wallet service is not started on foreground event on status-go side
  anymore, it leaves a client side opportunity to decide whether new
  blocks should be watched.
- `watchNewBlocks` parameter is added to `StartWallet`.
- Some requests are removed/moved to the place where they are necessary.
2020-11-25 12:20:23 +02:00
Andrea Maria Piana 9814a9a5e7 Dont crash if to or from are nil 2020-11-19 08:14:51 +01:00
Jonathan Rainville b2d8f7f416
feat: add bookmarks table for the browser bookmarks
plus get bookmark icon using a lib
2020-11-16 13:31:34 -05:00
Gheorghe Pinzaru d04e54e54e
Local notifications service (#2026)
Also adds implementation for eth transactions notifications
2020-10-28 10:56:14 +03:00
Volodymyr Kozieiev 3e446eed8c
Link previews support (#2059) 2020-10-27 19:35:28 +02:00
Andrea Maria Piana 1cd9396038 Remove flaky suite api_geth_test 2020-10-08 09:48:06 +02:00
Andrea Maria Piana efbf093bc4 Don't fail if one request fails in getTokensBalances
If one request failed, the whole batch would fail.
This caused issue as one of the contract is constantly returning an
error now, and essentially there was not way to fetch balance.
Also extend the timeout to 20s as we throw 165 request to Infura in one
go and it takes its time to reply to those, although it seems like we
should batch them on our side instead of sending them all cuncurrently.
2020-10-05 12:53:51 +02:00
andrey 397ee840c6 [#2042] Wrong ERC20 decimal rounding in "Set max" 2020-09-22 16:00:47 +02:00
andrey 682722b973 add wallet favourites 2020-09-21 10:48:00 +02:00
Gheorghe Pinzaru 9e148eab89
Dont allow disabling waku (#2040) 2020-09-16 10:31:01 +03:00
RichΛrd 62c9d56fe8
Add API functions to store pending transaction data (#2037)
* Add API functions to store pending transaction data
* fix: code review
2020-09-14 09:39:24 -04:00
Andrea Maria Piana 2d525f9503
Set block mentions 2020-09-09 21:22:17 +02:00