Commit Graph

1595 Commits

Author SHA1 Message Date
Franck Royer 4cb8769271
Remove unused constant 2022-05-20 11:44:58 +10:00
Franck Royer b93c876043
Consolidate compress public key functions 2022-05-20 11:42:01 +10:00
Franck Royer 479081f611
Remove unnecessary abstract class 2022-05-20 11:38:44 +10:00
Franck Royer 5e1cd78288
Remove unused code 2022-05-20 11:27:57 +10:00
Franck Royer 17c8335d6f
Remove file 2022-05-20 11:27:15 +10:00
Franck Royer c6189170e0
Remove unused code 2022-05-20 11:05:44 +10:00
Franck Royer ee8ba791cc
Move ecdsa sign to crypto.ts 2022-05-20 10:59:33 +10:00
Franck Royer b3f4686da1
Use Uint8Array instead of hex string for hash 2022-05-20 10:59:32 +10:00
Franck Royer 595fb877eb
Move keccak256 function to crypto.ts 2022-05-20 10:59:32 +10:00
Franck Royer 20b3b5b667
Move common crypto functions to crypto.ts 2022-05-20 10:59:32 +10:00
status-bors-ng[bot] e46369d968
Merge #726
726: Remove buffer usage r=D4nte a=D4nte

This only removes it from the code we wrote.

- `ts-proto` uses `Buffer`, the idea would be to review whether we can use the new `protons`
- Some dependencies are likely to use `Buffer`, will need review.

Co-authored-by: Franck Royer <franck@status.im>
2022-05-20 00:40:58 +00:00
Franck Royer dbdf37a31d
Remove usage of `Buffer` from version_1.ts 2022-05-20 10:32:45 +10:00
Franck Royer 89de2e3c77
Remove `buf` variable 2022-05-20 10:32:45 +10:00
Franck Royer 06b4ab581d
Remove `Buffer` from `isMessageSigned` 2022-05-20 10:32:45 +10:00
Franck Royer ce0c5cef07
Pass Uint8Array when possible 2022-05-20 10:32:45 +10:00
Franck Royer 5648f72d3d
Extract is message signed logic 2022-05-20 10:32:45 +10:00
Franck Royer bd9d592fda
Remove Buffer from `getPayloadSize` 2022-05-20 10:32:45 +10:00
Franck Royer 33f52ef56d
Extract `getPayloadSize` logic 2022-05-20 10:32:45 +10:00
Franck Royer 95485f0a69
Remove `Buffer` from `getSizeOfPayloadSizeField` 2022-05-20 10:32:44 +10:00
Franck Royer 9e09de831f
Extract decoding of size of payload size field 2022-05-20 10:32:44 +10:00
Franck Royer 0964425a12
Remove `Buffer` from `validateDataIntegrity` 2022-05-20 10:32:44 +10:00
Franck Royer 64ea36faa3
Remove `Buffer` from `ecRecoverPubKey` 2022-05-20 10:32:44 +10:00
Franck Royer 76777744f0
Remove `Buffer` from `decrypt*` 2022-05-20 10:32:44 +10:00
Franck Royer 181ba489be
Remove `Buffer` from `encrypt*` 2022-05-20 10:32:44 +10:00
Franck Royer 5d32877357
Remove `Buffer` from `getSignature`, `getHash`, `getPublicKey` 2022-05-20 10:32:44 +10:00
Franck Royer 6929805425
Remove `Buffer` from `clearEncode` 2022-05-20 10:32:44 +10:00
Franck Royer 564fee29eb
Remove `Buffer` from addPayloadSizeField 2022-05-20 10:32:44 +10:00
Franck Royer 661c6227e7
Move type definition to the top 2022-05-20 10:32:43 +10:00
Franck Royer ab3b23f100
Remove Buffer from symmetric.ts 2022-05-20 10:32:43 +10:00
Franck Royer c66927668b
Run tsc as part of test script instead of building 2022-05-20 10:32:43 +10:00
status-bors-ng[bot] 8a84024c7d
Merge #745
745: update unique key to React list element in relay-reactjs-chat app r=D4nte a=tobyjaguar

## Problem

When running the app on a development server, the React list of mapped messages produces a warning that the children in a list should have a unique key prop:

<img width="1347" alt="Screen Shot 2022-05-17 at 4 02 23 PM" src="https://user-images.githubusercontent.com/16940072/168926247-ca331666-f23c-487b-9023-3c63eea35492.png">


## Solution

Add a unique key to the list element in the App.js component.

## Notes

Any unique key will do here, but the timestamp seems to work unless the maintainers refactor for a better id. 
A timestamp may not be ideal if multiple messages with the same timestamp come in. Perhaps a uuid would
work, but perhaps that is too heavy handed for an example, although this may be a choice for a production
implementation.


Co-authored-by: tobyjaguar <talgya@gmail.com>
Co-authored-by: Franck Royer <franck@status.im>
2022-05-20 00:32:21 +00:00
Franck R d267d44b3b
Merge pull request #744 from status-im/improve-error
Improve `waitForRemotePeer` API
2022-05-19 16:30:38 +10:00
Franck Royer aad678a708
Add a timeout to `waitForRemotePeer` 2022-05-19 16:04:38 +10:00
Franck Royer 06930c15dc
Remove unneeded variable 2022-05-19 16:04:06 +10:00
Franck Royer d9940f4d9b
Simplify async iterator usage
The iterator will return only once there is a first item available.
Hence, there is no need to add an observer on `change:protocols` event.
2022-05-19 16:04:06 +10:00
Franck Royer 4b43db6daa
Change default to wait for Relay only
Store is not used by all applications, also, note all
nodes have store enabled.
Default value should prefer working software over feature complexity.
2022-05-19 16:04:04 +10:00
Franck R 7772c0afd6
Merge pull request #749 from status-im/release/0.23.0 2022-05-19 16:02:46 +10:00
Franck Royer 3ec3ad1fd9
Update changelog for release 0.23.0 2022-05-19 15:54:24 +10:00
Franck R 315de8b701
Merge pull request #748 from status-im/release/0.23.0 2022-05-19 15:53:25 +10:00
Franck Royer 7d9406bcfc
Release 0.23.0 2022-05-19 15:36:24 +10:00
Franck Royer 27a90d8204
Use timestamp in millisecond
It was implicitly using `toString` which return the timestamp in
readable format with a precision in seconds which meant messages sent
within the same second had the same key.
2022-05-19 15:32:06 +10:00
tobyjaguar 35cfd5679e
update unique key to React list element in relay-reactjs-chat app 2022-05-19 15:32:06 +10:00
Franck R 4a6e424a8c
Merge pull request #738 from status-im/remove-multihashes 2022-05-19 15:31:33 +10:00
Franck Royer 0ec6e6d2fb
Update changelog 2022-05-19 15:17:37 +10:00
Franck Royer 4639537fd6
Ensure `ENR.create` is used instead of the constructor 2022-05-19 15:17:19 +10:00
Franck Royer 95d1ef4b4a
Ignore imports when check spell 2022-05-19 15:17:18 +10:00
Franck Royer 1d8e3837ea
Replace deprecated `multihashes` with `multiformats` 2022-05-19 15:17:16 +10:00
Franck Royer e8ba7f6440
Calculate peer id at creation
As the peer id method calculation method will become async.
2022-05-19 15:16:35 +10:00
Franck R c5ca3d60b3
Merge pull request #746 from status-im/parcel
Add all used deps
2022-05-18 21:35:06 +10:00
Franck Royer 48efcc1562
Add all used deps 2022-05-18 20:41:10 +10:00