Commit Graph

5055 Commits

Author SHA1 Message Date
Pedro Pombeiro af7341447c
nix: Remove need to pass default values in `--arg config`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-11-17 16:26:58 +01:00
Pedro Pombeiro e38e9f1072
Ensure `STATUS_GO_SRC_OVERRIDE` gets passed to the Nix shell's `config`
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-11-15 16:12:13 +01:00
Andrey Shovkoplyas 670c07b9b4
[#8845] Update list of public chats
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-15 13:59:47 +01:00
Andrea Maria Piana 9a9c0ce526
Render markdown
Fixes: https://github.com/status-im/trailofbits-audit/issues/47
Fixes: https://github.com/status-im/trailofbits-audit/issues/46
Fixes: https://github.com/status-im/trailofbits-audit/issues/44
Fixes: https://github.com/status-im/security-reports/issues/13
Fixes: https://github.com/status-im/security-reports/issues/5
Fixes: https://github.com/status-im/status-react/issues/8995

This commits re-introduce rendering of markdown text and implent a few
changes:

1) Parsing of the message content is now in status-go, this includes
markdown, line-count, and rtl. Parsing is not nested, as there's some
rendering degradation involved as we nest components, unclear exactly if
it's react-native or clojure, haven't looked too deeply into it.
2) Emojii type messages are not parsed on the sending side, not the
receiving one, using the appropriate content-type
3) Fixes a few issues with chat input rendering, currrently we use
`chats/current-chat` subscription which is very heavy and should not be
used unless necessary, and means that
any change to chat will trigger a re-render, which caused re-rendering
of input container on each received message. Also to note that
input-container is fairly heavy to render, and it's rendered twice at
each keypress on input.

The inline markdow supported is:

*italic* or _italic_
**bold** or __bold__
`inline code`
http://test.com links
\#status-tag

The block markdown supported is:

\# Headers
```
code blocks
```
> Quotereply

The styling is very basic at the moment, but can be improved.
Adding other markdown (photo,mentions) is straightforward and should
come at little performance cost (unless the component to render is
heavy, i.e a photo for example).

There are some behavioral changes with this commit:

1) Links are only parsed if starting with http:// or https://, meaning that
blah.com won't be parsed, nor www.test.com. This behavior is consistent
with discord for example and allows faster parsing at little expense to
ser experience imo. Fixes a few security issues as well.

2) Content is not anymore capped (regression), that's due to the fact that
before we only rendered text and react-native allowed us easily to limit
the number of lines, but adding markdown support means that this
strategy is not viable anymore. Performance of rendering don't see to be
very much impacted by this, I would re-introduce it if necessary, but
I'd rather do that in a separate PR.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-15 10:23:25 +01:00
Churikova Tetiana 3127f2fcb2
Reworked test_ens
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-14 12:04:26 +01:00
Andrey Shovkoplyas ec04709495
[#8854] Finish "Show my ENS name in chat" setting in user profile 2019-11-14 12:04:03 +01:00
Roman Volosovskyi ad80d4b0fd
[#9227] Disable keycard unpairing for v1 2019-11-14 10:22:57 +02:00
Pedro Pombeiro f7384ae338
Add support for `STATUS_GO_SRC_OVERRIDE` env var
Signed-off-by: Pedro Pombeiro <pombeirp@users.noreply.github.com>
2019-11-13 16:41:21 +01:00
Pedro Pombeiro a71500b312
nix: fix passing of env vars to release-android expression 2019-11-13 12:01:48 +01:00
Churikova Tetiana 2ed62e53eb
added waits
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-11-12 12:44:51 +01:00
Andrea Maria Piana 13b01ce879
Fix replies, clear-history, logout bug
Fixes #9433 : this was due to the fact that `.-response-to` was
returning nil, because of the dash in the name, instead in this cases
`(aget .. "response-to")` should be used.

Fixes #9431 : This was a left-over from the move from message-groups to
message-list, and the code was not updated.

Fixes #9430 #9429 Both of these were due to the same issue, cofx were
wrongly passed to the function resulting in the db being updated but the
fxs being discarded.

There's still a separate issue that might result in messages not being
saved on logout, because of a race condition (if you logout while is
fetching messages, some of the message might not be saved). I will
address that separately as we might be able to just save messages as
they come in status-go, rather then having to pass them to status-react
and back to status-go for saving.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-12 11:27:26 +01:00
Roman Volosovskyi a39ae15d99
[#9206] fix wrong ping handling on signing messages 2019-11-12 11:23:46 +02:00
Dmitry Novotochinov a6a65ec0e4
remove keycard views with old design 2019-11-12 11:23:04 +02:00
Andrey Shovkoplyas 3d4e9df825
fixes ens name wallet address
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-11 14:26:55 +01:00
Dmitry Novotochinov 5e7785d432
[#8993] adjust pin screens for small screen devices
find account by key-uid

show pairing slots info on pairing

fix pin reset flow

pass retry-counter

fix sign with keycard button in wallet

Signed-off-by: Dmitry Novotochinov <dmitry.novot@gmail.com>
2019-11-08 15:01:08 +01:00
Andrea Maria Piana 2bb7c70216
[Fixes: #1520] Enable ens
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-08 13:03:42 +01:00
Andrey Shovkoplyas 40de054393
[#9256] Remove the "~" from the fiat currency value "~10.4 USD"
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-08 12:14:18 +01:00
Churikova Tetiana 9205a147a2
tiny fix to test_send_funds_between_accounts_in_multiaccount_instance
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-11-07 16:26:37 +01:00
Roman Volosovskyi 10c45d8a79
[#9393] fix mnemonic shown during storing account on keycard 2019-11-07 16:21:56 +02:00
Churikova Tetiana 9311fee2ae
wallet update balance and fix failures
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-11-07 14:40:12 +01:00
Roman Volosovskyi 34a4b9a451
[#9350] fix back button on keycard login screen 2019-11-07 14:58:06 +02:00
Roman Volosovskyi b75e1bd53f
[#9342] fix pin-mismatch label 2019-11-07 14:31:39 +02:00
yenda 36ad6fb762
support for local notification service on Android
- add option in profile on Android to enable local notifications
- use foreground service to keep the app alive when running in the background
- implement enable and disbable notification function in status module

When enabling notifications, a foreground service is started that displays
a sticky notification to make the user aware that the app is running in the
background.
Notifications are updated whenever a new.message signal is handled on java side.
Currently only one to one chats are generating notifications but that can be
easily extended to other types of messages, including mentions and keywords.
The ens name of the user as well as keywords to follow should then be passed
to the native side when calling the enable function.

Signed-off-by: yenda <eric@status.im>
2019-11-07 09:59:12 +01:00
Jakub Sokołowski a6c2518de7
drop overriding .env values with CI parameters
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-06 22:17:40 +01:00
Jakub Sokołowski 05ee65b6fa
don't use SHA1s as status-go version
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-06 21:46:02 +01:00
Andrea Maria Piana 5fe385c225
Parse messages in status-go
This commit enables parsing of messages in status-go.
Currently only a few messages are supported in status-protocol-go.
For now we only enable Message types.
Status-react will conditionally use the parsed version if present.
Eventually this can be moved to a separate signal/different structure,
but for the time being is best to validate with the minimum amount of
changes.

The next step would be handle validation and processing of the field in
status-go, so we can skip saving the message from status-react.

This commit should improve performance of receiving messages from a
chat, although haven't had time to validate that.

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-06 19:30:47 +01:00
AlphaSerpentis 629464cc35
(Squashed - correctly this time?)
* Update fr.json

Validated JSON file (last line contained an extra comma)

* Update i18n_resources.cljs

Defined the languages and translations

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-06 18:19:39 +01:00
Andrea Maria Piana 9a2e1e97db
[Fixes: #9400] Fix last-group
The from parameter was left out, tests did not pick it up as they were
not running, probably I have wrongly rebased the code and did not
include the new namespace in runner.cljs

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-06 17:47:28 +01:00
Andrey Shovkoplyas 3da0a0dd4f
fix stickers alignment
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-06 13:18:32 +01:00
Rachel Hamlin c6c554409d
Change recover to access
There are some instances on the keycard screens that read `Recover key` rather than `Access key`, this is dated language so I've changed it. There are a few other instances of the word 'recover' in relation to keycard that may also need to be changed, but I'm not sure what context they are in.

Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-06 12:58:44 +01:00
Andrey Shovkoplyas ac60ef6c32
fix colors and launch screen
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
2019-11-06 12:57:35 +01:00
William Mruzek ed0c16b33b
Increase number on 'unread' messages indicator to +99
Signed-off-by: yenda <eric@status.im>
2019-11-06 11:04:08 +01:00
Churikova Tetiana 2e8e1a35ad
adjust tests to eth.fleet
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-11-05 12:17:47 +01:00
Andrea Maria Piana 1c63c782a4
Dont use network info but only rely on peers count for mailservers
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-05 11:50:54 +01:00
Roman Volosovskyi 76be2c279f
[#9268] fix Multiaccount is currently empty on login 2019-11-05 07:20:09 +02:00
Jakub Sokołowski 971db3ea2e
include status-go params to set varsion and commit
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-11-04 21:12:30 +01:00
Roman Volosovskyi 02ce0782b1
[#9061] fix fetching balances for keycard acc 2019-11-04 16:23:37 +02:00
Andrea Maria Piana 5eb314db58
Use staging fleet and upgrade status-go
Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-04 15:07:12 +01:00
Andrea Maria Piana c69863cda2
Fix message ordering and improve performance rec. messages
This commit does a few things:

==== Ordering of messages ====

Change the ordering of messages from a mixture of timestamp/clock-value to use
only clock-value.

Datemarks are now not used for sorting anymore, which means that the
order of messages is always causally related (not the case before, as we
were breaking this property by sorting by datemark), but datemark
calculation is unreliable (a reply to a message might have a timestamp <
then the message that is replied to).
So for timestamp calculation we
naively group them ignoring "out-of-order timestamp" messages, although
there's much to improve.
It fixes an issue whereby the user would change their time and the
message will be displayed in the past, although it is still possible to
craft a message with a lower clock value and order it in the past
(there's no way we can prevent this to some extent, but there are ways
to mitigate, but outside the scope of this PR).

==== Performance of receiving messages ====

The app would freeze on pulling messages from a mailserver (100 or so).
This is due to the JS Thread being hogged by CPU calculation, coupled
with the fact that we always tried to process messages all in one go.

This strategy can't scale, and given x is big enough (200,300,1000) the
UI will freeze.

Instead, each message is now processed separately, and we leave a gap
between processing each message for the UI to respond to user input
(otherwise the app freezes again).
Pulling messages will be longer overall, but the app will be usuable
while this happen (albeit it might slow down).
Other strategies are possible (calculate off-db and do a big swap,
avoiding many re-renders etc), but this is the reccommended strategy by
re-frame author (Solving the CPU Hog problem), so sounds like a safe
base point.

The underlying data structure for holding messages was also changed, we
used an immutable Red and Black Tree, same as a sorted map for clojure, but we use
a js library as is twice as performing then clojure sorted map.

We also don't sort messages again each time we receive them O(nlogn), but we
insert them in order O(logn).

Other data structures considered but discarded:
1) Plain vector, but performance prepending/insertion in the middle
(both O(n)) were not great, as not really suited for these operations.

2) Linked list, appealing as append/prepend is O(1), while insertion is
O(n). This is probably acceptable as messages tend to come in order
(from the db, so adding N messages is O(n)), or the network (most of
them prepends, or close to the head), while mailserver would not follow this path.
An implementation of a linked list was built, which performed roughtly the
same as a clojure sorted-map (although faster append/prepend), but not
worth the complexity of having our own implementation.

3) Clojure sorted-map, probably the most versatile, performance were
acceptable, but nowhere near the javascript implementation we decided on

4) Priority map, much slower than a sorted map (twice as slow)

5) Mutable sorted map, js implementation, (bintrees), not explored this very much, but from
just a quick benchmark, performance were much worse that clojure
immutable sorted map

Given that each message is now processed separately, saving the chat /
messages is also debounced to avoid spamming status-go with network
requests. This is a temporary measure for now until that's done directly
in status-go, without having to ping-pong with status-react.

Next steps performance wise is to move stuff to status-go, parsing of
transit, validation, which is heavy, at which point we can re-consider
performance and how to handle messages.

Fixes also an issue with the last message in the chat, we were using the
last message in the chat list, which might not necessarely be the last
message the chat has seen, in case messages were not loaded and a more
recent message is the database (say you fetch historical messages for
1-to-1 A, you don't have any messages in 1-to-1 chat B loaded, you receive an
historical message for chat B, it sets it as last message).

Also use clj beans instead of js->clj for type conversion

Signed-off-by: Andrea Maria Piana <andrea.maria.piana@gmail.com>
2019-11-01 23:59:26 +01:00
Serhy e579412334
E2e check if seedphrase in new acc is true
Signed-off-by: Serhy <sergii@status.im>
2019-11-01 19:04:11 +02:00
acolytec3 3cc157b0fb
Suppress remove photo option when no profile pic
Signed-off-by: yenda <eric@status.im>
2019-11-01 15:07:51 +01:00
Andrey Shovkoplyas acdad6d598
fixes animated gifs on Android
Signed-off-by: Jakub Sokołowski <jakub@status.im>
Signed-off-by: yenda <eric@status.im>
2019-11-01 13:05:03 +01:00
yenda 3528dd809a
fix fleet settings not being saved to node config
Signed-off-by: yenda <eric@status.im>
2019-11-01 11:56:11 +01:00
dependabot-preview[bot] 463b4111b2 Bump @react-native-community/netinfo in /mobile/js_filesBumps [@react-native-community/netinfo](https://github.com/react-native-community/react-native-netinfo) from 4.2.2 to 4.4.0.- [Release notes](https://github.com/react-native-community/react-native-netinfo/releases)- [Changelog](https://github.com/react-native-community/react-native-netinfo/blob/master/CHANGELOG.md)- [Commits](https://github.com/react-native-community/react-native-netinfo/compare/v4.2.2...v4.4.0)Signed-off-by: dependabot-preview[bot] <support@dependabot.com> 2019-10-31 11:12:11 +01:00
Roman Volosovskyi f7cc74a29a
fix recovery with mnemonic on keycard 2019-10-31 09:47:23 +02:00
Serhy c7cc80bc60
Followup e2e fix after PN remove
Signed-off-by: Serhy <sergii@status.im>
2019-10-30 21:34:53 +02:00
Roman Volosovskyi e80b08c42e
[#9233, #9173] fix some screens
Signed-off-by: yenda <eric@status.im>
2019-10-30 15:17:28 +01:00
tbenr 88dbeead42
fixes #8877
Signed-off-by: yenda <eric@status.im>
2019-10-30 15:13:54 +01:00
Jakub Sokołowski f85ace651a
combined desktop dependency upgrades
Signed-off-by: Jakub Sokołowski <jakub@status.im>
2019-10-30 11:43:13 +01:00
Churikova Tetiana bba6d735c3
Remove Myabe later after deleting PN
Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
2019-10-30 09:19:07 +01:00