-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Quiet client to detect a v2 invite link format (#2330)
* refactor: adjust customProtocolSaga code to be similar to deepLinkSaga; Move parsing code from main.ts to saga * feat: handle old (psk, orbitdbIdentity, addresses) and new (cid, token, serverAddress, inviterAddress) invitation link format * chore: add joinNetwork saga that gathers data for createNetwork; mock DOWNLOAD_INVITE_DATA response * refactor: invitation link parsers * refactor: simplify deepLink and customProtocol sagas * chore: add missing github workflow for running common package tests * feat: add one script for preparing AppImage for e2e tests on Linux * chore: remove unused code responsible for locking invitation link form on deep linking
- Loading branch information
Showing
53 changed files
with
855 additions
and
452 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Common package tests | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- packages/common/** | ||
|
||
jobs: | ||
utils-tests: | ||
timeout-minutes: 25 | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-20.04, macos-latest, windows-2019] | ||
|
||
steps: | ||
- name: "Print OS" | ||
run: echo ${{ matrix.os }} | ||
|
||
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: "Setup environment" | ||
uses: ./.github/actions/setup-env | ||
with: | ||
bootstrap-packages: "@quiet/eslint-config,@quiet/logger,@quiet/types,@quiet/common" | ||
|
||
- name: "Unit tests" | ||
run: lerna run test --scope @quiet/common --stream |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
import { setEngine, CryptoEngine } from'pkijs' | ||
import { setEngine, CryptoEngine } from 'pkijs' | ||
import { Crypto } from '@peculiar/webcrypto' | ||
|
||
const crypto = new Crypto(); | ||
global.crypto = crypto; | ||
const crypto = new Crypto() | ||
global.crypto = crypto | ||
|
||
setEngine('newEngine', new CryptoEngine({ | ||
setEngine( | ||
'newEngine', | ||
new CryptoEngine({ | ||
name: 'newEngine', | ||
// @ts-ignore | ||
crypto: crypto, | ||
})) | ||
}) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ctions/areObjectsEqual/areObjectsEqual.ts → packages/common/src/compare.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export const areObjectsEqual = (obj1: any, obj2: any): boolean => { | ||
// Using this only makes sense for small objects whose properties are in the same order | ||
return JSON.stringify(obj1) === JSON.stringify(obj2) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.