when checking the checkbox, the entire list was being re-rendered
we now only re-render if the `checked?` value has changed
Signed-off-by: yenda <eric@status.im>
Currently there are two ways to initiate logging in with keycard:
- enter PIN code and after that connect card to the phone
- connect card to the phone and enter PIN after that
Before this commit in both cases when connection to the keyacrd was lost
and then restored, logging in didn't resume. In result a user saw a
pop-up with endless spinner.
The reason of this bug was that `:on-card-connected` and `:on-card-read`
actions were not restored in app-db after losing connection to the card.
This commit introduces helper functions for both `:on-card-connected` and
`:on-card-read` which allow to reset these values and stash them until
particular flow of calls to keycard will be finished. In case if
connection was lost before the flow is finished the valueas are restored
so that it can be succesfully resumed on th next connection.
Also a banch of log entries were added to simplify debugging of
interactions with keycard and native module.
Signed-off-by: Andrey Shovkoplyas <motor4ik@gmail.com>
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>
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>
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>