Commit Graph

1492 Commits

Author SHA1 Message Date
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
status-bors-ng[bot] 54044d4437
Merge #743
743: Remove jemboh as reviewers for dependabot r=D4nte a=D4nte



Co-authored-by: Franck Royer <franck@status.im>
2022-05-17 11:37:07 +00:00
Franck Royer 575e7a49fa
Remove jemboh as reviewers for dependabot 2022-05-17 18:26:36 +10:00
status-bors-ng[bot] c2a160d0f5
Merge #731
731: Bump @testing-library/react from 12.1.2 to 13.2.0 in /examples/eth-pm r=D4nte a=dependabot[bot]

Bumps [`@testing-library/react](https://github.com/testing-library/react-testing-library)` from 12.1.2 to 13.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/testing-library/react-testing-library/releases"><code>`@​testing-library/react</code>'s` releases</a>.</em></p>
<blockquote>
<h2>v13.2.0</h2>
<h1><a href="https://github.com/testing-library/react-testing-library/compare/v13.1.1...v13.2.0">13.2.0</a> (2022-05-03)</h1>
<h3>Features</h3>
<ul>
<li>Export RenderHookOptions type (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1062">#1062</a>) (<a href="46b28ade73">46b28ad</a>)</li>
</ul>
<h2>v13.1.1</h2>
<h2><a href="https://github.com/testing-library/react-testing-library/compare/v13.1.0...v13.1.1">13.1.1</a> (2022-04-15)</h2>
<h3>Bug Fixes</h3>
<ul>
<li><strong>TS:</strong> export interface RenderHookResult (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1049">#1049</a>) (<a href="9171163fcc">9171163</a>)</li>
</ul>
<h2>v13.1.0</h2>
<h1><a href="https://github.com/testing-library/react-testing-library/compare/v13.0.1...v13.1.0">13.1.0</a> (2022-04-15)</h1>
<h3>Features</h3>
<ul>
<li>Add <code>renderHook</code> (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/991">#991</a>) (<a href="9535eff82a">9535eff</a>)</li>
</ul>
<h2>v13.0.1</h2>
<h2><a href="https://github.com/testing-library/react-testing-library/compare/v13.0.0...v13.0.1">13.0.1</a> (2022-04-11)</h2>
<h3>Bug Fixes</h3>
<ul>
<li>Specify a non-* version for <code>`@​types/react-dom</code>` (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1040">#1040</a>) (<a href="2a889e8065">2a889e8</a>)</li>
</ul>
<h2>v13.0.0</h2>
<h1><a href="https://github.com/testing-library/react-testing-library/compare/v12.1.4...v13.0.0">13.0.0</a> (2022-03-31)</h1>
<h3>Features</h3>
<ul>
<li>Add support for React 18 (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1031">#1031</a>) (<a href="ccd8a0d97d">ccd8a0d</a>)</li>
</ul>
<h3>BREAKING CHANGES</h3>
<ul>
<li>Drop support for React 17 and earlier. We'll use the new <a href="https://github.com/reactwg/react-18/discussions/5"><code>createRoot</code> API</a> by default which comes with a set of <a href="https://github.com/reactwg/react-18/discussions/4">changes while also enabling support for concurrent features</a>.
To opt-out of this change you can use <code>render(ui, { legacyRoot: true } )</code>. But be aware that the legacy root API is deprecated in React 18 and its usage will trigger console warnings.</li>
</ul>
<h2>v13.0.0-alpha.7</h2>
<h1><a href="https://github.com/testing-library/react-testing-library/compare/v13.0.0-alpha.6...v13.0.0-alpha.7">13.0.0-alpha.7</a> (2022-03-30)</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="00c89dce86"><code>00c89dc</code></a> docs: add mboettcher as a contributor for code (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1063">#1063</a>)</li>
<li><a href="46b28ade73"><code>46b28ad</code></a> feat: Export RenderHookOptions type (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1062">#1062</a>)</li>
<li><a href="9171163fcc"><code>9171163</code></a> fix(TS): export interface RenderHookResult (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1049">#1049</a>)</li>
<li><a href="9535eff82a"><code>9535eff</code></a> feat: Add <code>renderHook</code> (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/991">#991</a>)</li>
<li><a href="2c451b3468"><code>2c451b3</code></a> chore: Run release from 12.x branch (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1044">#1044</a>) (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1045">#1045</a>)</li>
<li><a href="c8c93f8322"><code>c8c93f8</code></a> docs: add Nokel81 as a contributor for bug, code (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1043">#1043</a>)</li>
<li><a href="2a889e8065"><code>2a889e8</code></a> fix: Specify a non-* version for <code>`@​types/react-dom</code>` (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1040">#1040</a>)</li>
<li><a href="93bc2c8afc"><code>93bc2c8</code></a> test(types): Don't assume implicit children (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1042">#1042</a>)</li>
<li><a href="ccd8a0d97d"><code>ccd8a0d</code></a> feat: Add support for React 18 (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1031">#1031</a>)</li>
<li><a href="0c4aabe0da"><code>0c4aabe</code></a> chore: Fix failing codesandbox/ci (<a href="https://github-redirect.dependabot.com/testing-library/react-testing-library/issues/1026">#1026</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/testing-library/react-testing-library/compare/v12.1.2...v13.2.0">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=`@testing-library/react&package-manager=npm_and_yarn&previous-version=12.1.2&new-version=13.2.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)`

You can trigger a rebase of this PR by commenting ``@dependabot` rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- ``@dependabot` rebase` will rebase this PR
- ``@dependabot` recreate` will recreate this PR, overwriting any edits that have been made to it
- ``@dependabot` merge` will merge this PR after your CI passes on it
- ``@dependabot` squash and merge` will squash and merge this PR after your CI passes on it
- ``@dependabot` cancel merge` will cancel a previously requested merge and block automerging
- ``@dependabot` reopen` will reopen this PR if it is closed
- ``@dependabot` close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- ``@dependabot` ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- ``@dependabot` ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-17 08:21:39 +00:00