-
Notifications
You must be signed in to change notification settings - Fork 20
fix: android ci #549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
fix: android ci #549
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
2 changes: 1 addition & 1 deletion
2
packages/connect-examples/expo-example/src/constants/connect.ts
This file contains hidden or 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,4 +1,4 @@ | ||
// eslint-disable-next-line import/no-relative-packages | ||
coderabbitai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
import { getConnectSrc } from '../../../constants'; | ||
import { getConnectSrc } from '@onekey-internal/shared-constants'; | ||
|
||
export const CONNECT_SRC = getConnectSrc(); |
2 changes: 1 addition & 1 deletion
2
packages/connect-examples/expo-playground/app/constants/connect.ts
This file contains hidden or 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
File renamed without changes.
This file contains hidden or 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,10 @@ | ||
{ | ||
"name": "@onekey-internal/shared-constants", | ||
"version": "1.1.10-alpha.2", | ||
"private": true, | ||
"author": "OneKey", | ||
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme", | ||
"license": "ISC", | ||
"type": "module", | ||
"main": "constants.js" | ||
} | ||
ByteZhang1024 marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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,41 @@ | ||
diff --git a/node_modules/react-native-crypto/index.js b/node_modules/react-native-crypto/index.js | ||
index f644543..bf38ebb 100644 | ||
--- a/node_modules/react-native-crypto/index.js | ||
+++ b/node_modules/react-native-crypto/index.js | ||
@@ -1,28 +1,16 @@ | ||
'use strict' | ||
+import { getRandomValues } from 'react-native-get-random-values'; | ||
ByteZhang1024 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
-import { randomBytes } from 'react-native-randombytes' | ||
-exports.randomBytes = exports.rng = exports.pseudoRandomBytes = exports.prng = randomBytes | ||
- | ||
ByteZhang1024 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
-// implement window.getRandomValues(), for packages that rely on it | ||
-if (typeof window === 'object') { | ||
- if (!window.crypto) window.crypto = {} | ||
- if (!window.crypto.getRandomValues) { | ||
- window.crypto.getRandomValues = function getRandomValues (arr) { | ||
- let orig = arr | ||
- if (arr.byteLength != arr.length) { | ||
- // Get access to the underlying raw bytes | ||
- arr = new Uint8Array(arr.buffer) | ||
- } | ||
- const bytes = randomBytes(arr.length) | ||
- for (var i = 0; i < bytes.length; i++) { | ||
- arr[i] = bytes[i] | ||
- } | ||
- | ||
- return orig | ||
- } | ||
+if (typeof globalThis === 'object') { | ||
+ if (!globalThis.crypto) { | ||
+ globalThis.crypto = {}; | ||
+ } | ||
+ if (!globalThis.crypto.getRandomValues) { | ||
+ globalThis.crypto.getRandomValues = getRandomValues; | ||
} | ||
ByteZhang1024 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
|
||
+ | ||
exports.createHash = exports.Hash = require('create-hash') | ||
exports.createHmac = exports.Hmac = require('create-hmac') | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.