Skip to content
This repository was archived by the owner on Feb 8, 2025. It is now read-only.

Update app deps #291

Merged
merged 9 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .easignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
/api
/contracts
/docs
/services
# packages/{chain,lib} are required
29 changes: 1 addition & 28 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,33 +19,6 @@ jobs:
- name: 🧪 Test
run: yarn lib test

# Temporarily disabled as both era_test_node@latest and era-test-node-action.releaseTag are broken
# Manually test on era_test_node@v0.1.0-alpha.18

# contracts:
# runs-on: ubuntu-latest

# steps:
# - name: 🚧 Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 2

# - name: 🚧 Setup Node
# uses: actions/setup-node@v4
# with:
# cache: 'yarn'
# node-version-file: '.nvmrc'

# - name: 🚧 Start zkSync local testnet node
# uses: dutterbutter/era-test-node-action@latest

# - name: 📦 Install
# run: yarn

# - name: 🧪 Test
# run: yarn contracts test

contracts-foundry:
runs-on: ubuntu-latest

Expand All @@ -63,7 +36,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: matter-labs/foundry-zksync
ref: 'dev'
ref: 'main'
path: 'foundry-zksync'

- name: 🚧 Add foundry-zksync to PATH
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/rxjs-npm-6.6.7-055046ea3c-c8263ebb20.zip
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/sjcl-npm-1.0.8-091d731e4f-5ab9fe956b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/url-npm-0.11.0-32ce15acfb-beec744c7a.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/uuid-npm-3.4.0-4fd8ef88ad-4f2b86432b.zip
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
diff --git a/lib/BleTransport.d.ts b/lib/BleTransport.d.ts
index 8c4a245a1c1d886fd0d96d5f5ac2393f5cddb6df..844c9c1add8e3b70fdb8f8e320d1274a18ed2f73 100644
index c33bae411b2b4dd9057c25f890b6a29086f1f530..b5511f05900630bed350212eeebf8a10d9fdc100 100644
--- a/lib/BleTransport.d.ts
+++ b/lib/BleTransport.d.ts
@@ -5,8 +5,9 @@ import { DeviceId, Device, Characteristic } from "react-native-ble-plx";
import type { DeviceModel } from "@ledgerhq/devices";
import { Observable, Observer } from "rxjs";
@@ -6,8 +6,9 @@ import type { DeviceModel } from "@ledgerhq/devices";
import { TraceContext } from "@ledgerhq/logs";
import { Observable, Observer, SchedulerLike } from "rxjs";
import { HwTransportError } from "@ledgerhq/errors";
-import { ReconnectionConfig } from "./types";
+import { BleManager, ReconnectionConfig } from "./types";
export declare const setReconnectionConfig: (config: ReconnectionConfig | null | undefined) => void;
+export declare const setBleManagerInstance: (manager: BleManager | null) => void;
export default class BleTransport extends Transport {
static disconnectTimeoutMs: number;
/**
/**
* react-native bluetooth BLE implementation
* @example
diff --git a/lib/BleTransport.js b/lib/BleTransport.js
index 4ecdc4ceee881e7561995731c24b14c74c981400..dacd8f8c7aa89efb5c4ed19af78f3d518c13521d 100644
index c914ce808acae77470589415e72f297d60738717..e6c40acbb4dfcaa3910bf2d80c728f7b1ad85778 100644
--- a/lib/BleTransport.js
+++ b/lib/BleTransport.js
@@ -89,6 +89,11 @@ const bleManagerInstance = () => {
}
return _bleManager;
};
@@ -85,6 +85,11 @@ let connectOptions = {
* @returns {BleManager} - The instance of the BleManager.
*/
let _bleManager = null;
+const setBleManagerInstance = (manager) => {
+ if (_bleManager && manager && _bleManager !== manager) console.error('BleTransport _bleManager already initialized');
+ _bleManager = manager;
+}
+exports.setBleManagerInstance = setBleManagerInstance;
const clearDisconnectTimeout = (deviceId) => {
const cachedTransport = transportsCache[deviceId];
if (cachedTransport && cachedTransport.disconnectTimeout) {
const bleManagerInstance = () => {
if (!_bleManager) {
_bleManager = new react_native_ble_plx_1.BleManager();
diff --git a/lib-es/BleTransport.d.ts b/lib-es/BleTransport.d.ts
index 8c4a245a1c1d886fd0d96d5f5ac2393f5cddb6df..844c9c1add8e3b70fdb8f8e320d1274a18ed2f73 100644
index c33bae411b2b4dd9057c25f890b6a29086f1f530..b5511f05900630bed350212eeebf8a10d9fdc100 100644
--- a/lib-es/BleTransport.d.ts
+++ b/lib-es/BleTransport.d.ts
@@ -5,8 +5,9 @@ import { DeviceId, Device, Characteristic } from "react-native-ble-plx";
import type { DeviceModel } from "@ledgerhq/devices";
import { Observable, Observer } from "rxjs";
@@ -6,8 +6,9 @@ import type { DeviceModel } from "@ledgerhq/devices";
import { TraceContext } from "@ledgerhq/logs";
import { Observable, Observer, SchedulerLike } from "rxjs";
import { HwTransportError } from "@ledgerhq/errors";
-import { ReconnectionConfig } from "./types";
+import { BleManager, ReconnectionConfig } from "./types";
export declare const setReconnectionConfig: (config: ReconnectionConfig | null | undefined) => void;
+export declare const setBleManagerInstance: (manager: BleManager | null) => void;
export default class BleTransport extends Transport {
static disconnectTimeoutMs: number;
/**
/**
* react-native bluetooth BLE implementation
* @example
diff --git a/lib-es/BleTransport.js b/lib-es/BleTransport.js
index 4edc417a02d0249fad463bae8a11ea8b1ff97d74..97af481fa5a361068a5b802af28c0c17ba4e861f 100644
index cfef17bf343a9bda226a0027826c2476b1a380c6..7b6ebab7b534580fe69fca0d88cc8c84cadcc6b7 100644
--- a/lib-es/BleTransport.js
+++ b/lib-es/BleTransport.js
@@ -82,6 +82,10 @@ const bleManagerInstance = () => {
}
return _bleManager;
};
@@ -78,6 +78,10 @@ let connectOptions = {
* @returns {BleManager} - The instance of the BleManager.
*/
let _bleManager = null;
+export const setBleManagerInstance = (manager) => {
+ if (_bleManager && manager && _bleManager !== manager) console.error('BleTransport _bleManager already initialized');
+ _bleManager = manager;
+}
const clearDisconnectTimeout = (deviceId) => {
const cachedTransport = transportsCache[deviceId];
if (cachedTransport && cachedTransport.disconnectTimeout) {
const bleManagerInstance = () => {
if (!_bleManager) {
_bleManager = new BleManager();
diff --git a/src/BleTransport.ts b/src/BleTransport.ts
index 44c1697d4665c60e875f6eb7c1516bc1d4468c76..39ed7024439a7697cc001a5943187fc5bb7c2dea 100644
index f8b73dc44ac2f5d56deb69ef6e1baa3bae044137..b002652dc905f0f74a5f135361e6f3bd53f7d00e 100644
--- a/src/BleTransport.ts
+++ b/src/BleTransport.ts
@@ -107,6 +107,10 @@ const bleManagerInstance = (): BleManager => {

return _bleManager;
};
@@ -128,6 +128,10 @@ let connectOptions: Record<string, unknown> = {
* @returns {BleManager} - The instance of the BleManager.
*/
let _bleManager: BleManager | null = null;
+export const setBleManagerInstance = (manager: BleManager | null) => {
+ if (_bleManager && manager && _bleManager !== manager) console.error('BleTransport _bleManager already initialized');
+ _bleManager = manager;
+}

const clearDisconnectTimeout = (deviceId: string): void => {
const cachedTransport = transportsCache[deviceId];
const bleManagerInstance = (): BleManager => {
if (!_bleManager) {
_bleManager = new BleManager();
1 change: 1 addition & 0 deletions app/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
'react-compiler/react-compiler': 'error',
'@tanstack/query/no-unstable-deps': 'warn', // false positives for non tanstack/query deps
},
env: {
es2021: true,
Expand Down
6 changes: 3 additions & 3 deletions app/app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const vary = (value: string, f: (variant: string) => string = (v) => '.' + v) =>
type ExternalUrl = `https:${string}`;

export const CONFIG = {
projectId: 'f8f4def1-b838-4dec-8b50-6c07995c4ff5',
env: ENV.RELEASE_ENV === 'development' ? 'development' : 'production',
sentryDsn: ENV.APP_SENTRY_DSN!,
apiUrl: ENV.API_URL!,
Expand All @@ -41,7 +42,6 @@ export const CONFIG = {

export type Config = typeof CONFIG;

export const PROJECT_ID = 'f8f4def1-b838-4dec-8b50-6c07995c4ff5';
const packageId = vary('io.zallo');

// https://docs.expo.dev/versions/latest/config/app/
Expand All @@ -55,7 +55,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
runtimeVersion: { policy: 'fingerprint' },
extra: {
...CONFIG,
eas: { projectId: PROJECT_ID },
eas: { projectId: CONFIG.projectId },
},
plugins: [
[
Expand Down Expand Up @@ -177,6 +177,6 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
// reactCompiler: true,
},
updates: {
url: `https://u.expo.dev/${PROJECT_ID}`,
url: `https://u.expo.dev/${CONFIG.projectId}`,
},
});
2 changes: 1 addition & 1 deletion app/babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function (api) {
],
plugins: [
'@babel/plugin-transform-flow-strip-types', // Must proceed other @babel plugins - https://github.com/facebook/react-native/issues/36828
['@babel/plugin-transform-private-methods', { loose: true }], // Required by ethers
// ['@babel/plugin-transform-private-methods', { loose: true }], // Required by ethers
['babel-plugin-react-compiler', { runtimeModule: 'react-compiler-runtime' }],
[
'module-resolver',
Expand Down
6 changes: 0 additions & 6 deletions app/metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ config.resolver.nodeModulesPaths = [

config.resolver.sourceExts.push('cjs', 'mjs');

// node-libs-react-native
config.resolver.extraNodeModules = {
...config.resolver.extraNodeModules,
...require('node-libs-react-native'),
};

// Use turborepo to restore the cache when possible
config.cacheStores = [new FileStore({ root: path.join(projectRoot, '.cache', 'metro') })];

Expand Down
67 changes: 33 additions & 34 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@
"dependencies": {
"@amplitude/analytics-react-native": "^1.4.9",
"@amplitude/experiment-react-native-client": "^1.5.1",
"@expo/config": "~9.0.2",
"@expo/config": "~9.0.3",
"@expo/vector-icons": "patch:@expo/vector-icons@npm:14.0.2#~/.yarn/patches/@expo-vector-icons-npm-14.0.2-204d0a5342.patch",
"@formatjs/intl": "^2.10.4",
"@formatjs/intl-datetimeformat": "^6.12.5",
"@formatjs/intl-getcanonicallocales": "^2.3.0",
"@formatjs/intl-locale": "^4.0.0",
"@formatjs/intl-numberformat": "^8.10.3",
"@formatjs/intl-pluralrules": "^5.2.14",
"@gorhom/bottom-sheet": "^5.0.0-alpha.10",
"@gorhom/bottom-sheet": "^5.0.0-alpha.11",
"@gorhom/portal": "^1.0.14",
"@hookform/resolvers": "^3.9.0",
"@ledgerhq/hw-app-eth": "^6.34.0",
"@ledgerhq/hw-transport-web-ble": "6.27.17",
"@ledgerhq/react-native-hw-transport-ble": "patch:@ledgerhq/react-native-hw-transport-ble@npm:6.29.3#../.yarn/patches/@ledgerhq-react-native-hw-transport-ble-npm-6.29.3-2fa5aa09cc.patch",
"@ledgerhq/hw-app-eth": "^6.38.0",
"@ledgerhq/hw-transport-web-ble": "6.29.2",
"@ledgerhq/react-native-hw-transport-ble": "patch:@ledgerhq/react-native-hw-transport-ble@npm:6.33.2#~/.yarn/patches/@ledgerhq-react-native-hw-transport-ble-npm-6.33.2-1024f42a14.patch",
"@react-native-async-storage/async-storage": "1.23.1",
"@react-native-clipboard/clipboard": "^1.13.2",
"@react-native-community/blur": "^4.4.0",
Expand All @@ -46,46 +46,46 @@
"@react-oauth/google": "^0.12.1",
"@sentry/react-native": "~5.22.2",
"@shopify/flash-list": "1.6.4",
"@tanstack/react-query": "^5.51.23",
"@walletconnect/react-native-compat": "^2.13.3",
"@walletconnect/web3wallet": "^1.12.3",
"@tanstack/react-query": "^5.52.0",
"@walletconnect/react-native-compat": "^2.15.1",
"@walletconnect/web3wallet": "^1.14.1",
"async-mutex": "^0.5.0",
"babel-plugin-formatjs": "^10.5.16",
"babel-plugin-module-resolver": "^5.0.2",
"babel-preset-expo": "~11.0.8",
"babel-preset-expo": "11.0.12",
"chardet": "^2.0.0",
"color": "^4.2.3",
"corejs": "^1.0.0",
"core-js": "^3.38.1",
"crypto-browserify": "^3.12.0",
"decimal.js": "^10.4.3",
"dotenv": "^16.4.5",
"ethers": "^6.13.2",
"expo": "~51.0.18",
"expo-apple-authentication": "~6.4.1",
"expo": "~51.0.30",
"expo-apple-authentication": "~6.4.2",
"expo-application": "~5.9.1",
"expo-asset": "~10.0.10",
"expo-barcode-scanner": "~13.0.1",
"expo-brightness": "~12.0.1",
"expo-build-properties": "~0.12.3",
"expo-camera": "~15.0.13",
"expo-build-properties": "~0.12.5",
"expo-camera": "~15.0.14",
"expo-clipboard": "~6.0.3",
"expo-constants": "~16.0.2",
"expo-dev-client": "~4.0.19",
"expo-dev-client": "~4.0.24",
"expo-device": "~6.0.2",
"expo-font": "~12.0.7",
"expo-font": "~12.0.9",
"expo-haptics": "~13.0.1",
"expo-image": "~1.12.12",
"expo-image": "~1.12.14",
"expo-linear-gradient": "~13.0.2",
"expo-linking": "~6.3.1",
"expo-local-authentication": "~14.0.1",
"expo-localization": "~15.0.3",
"expo-navigation-bar": "~3.0.7",
"expo-notifications": "~0.28.9",
"expo-router": "~3.5.17",
"expo-notifications": "~0.28.16",
"expo-router": "~3.5.23",
"expo-secure-store": "~13.0.2",
"expo-splash-screen": "~0.27.5",
"expo-status-bar": "~1.12.1",
"expo-updates": "~0.25.18",
"expo-updates": "~0.25.23",
"fast-deep-equal": "^3.1.3",
"fast-text-encoding": "^1.0.6",
"find-yarn-workspace-root": "^2.0.0",
Expand All @@ -95,39 +95,38 @@
"jotai": "^2.9.3",
"jotai-effect": "^1.0.0",
"jotai-immer": "^0.4.1",
"jotai-scope": "^0.7.1",
"jotai-scope": "^0.7.2",
"jwt-decode": "^4.0.0",
"lib": "workspace:*",
"luxon": "^3.5.0",
"neverthrow": "^7.0.1",
"node-libs-react-native": "^1.2.1",
"react": "18.2.0",
"react-call": "^1.1.0",
"react-call": "^1.2.0",
"react-compiler-runtime": "file:./src/util/patches/react-compiler-runtime",
"react-content-loader": "^7.0.2",
"react-dom": "18.2.0",
"react-hook-form": "^7.52.2",
"react-intl": "^6.6.8",
"react-native": "0.74.3",
"react-native-ble-plx": "^3.2.0",
"react-native": "^0.74.5",
"react-native-ble-plx": "^3.2.1",
"react-native-cloud-storage": "^1.4.1",
"react-native-collapsible": "^1.6.1",
"react-native-drawer-layout": "^3.3.0",
"react-native-drawer-layout": "^3.3.2",
"react-native-gesture-handler": "~2.16.1",
"react-native-get-random-values": "~1.11.0",
"react-native-jazzicon": "patch:react-native-jazzicon@npm:^0.1.2#../.yarn/patches/react-native-jazzicon-npm-0.1.2-c1633b051f.patch",
"react-native-pager-view": "6.3.0",
"react-native-paper": "^5.12.5",
"react-native-qrcode-svg": "^6.3.1",
"react-native-quick-crypto": "^0.7.1",
"react-native-qrcode-svg": "^6.3.2",
"react-native-quick-crypto": "0.7.2",
"react-native-reanimated": "~3.10.1",
"react-native-safe-area-context": "4.10.1",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-svg": "15.2.0",
"react-native-tab-view": "^3.5.2",
"react-native-toast-message": "^2.2.0",
"react-native-typewriter": "^0.7.0",
"react-native-unistyles": "^2.8.2",
"react-native-unistyles": "^2.9.1",
"react-native-web": "~0.19.12",
"react-relay": "^17.0.0",
"relay-runtime": "^17.0.0",
Expand All @@ -144,7 +143,7 @@
"devDependencies": {
"@babel/plugin-transform-flow-strip-types": "^7.25.2",
"@babel/plugin-transform-private-methods": "^7.24.7",
"@tanstack/eslint-plugin-query": "^5.51.15",
"@tanstack/eslint-plugin-query": "^5.52.0",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-native": "^12.5.2",
"@total-typescript/ts-reset": "^0.5.1",
Expand All @@ -160,17 +159,17 @@
"@typescript-eslint/parser": "^7.18.0",
"@walletconnect/jsonrpc-types": "^1.0.4",
"babel-plugin-lodash": "^3.3.4",
"babel-plugin-react-compiler": "0.0.0-experimental-52d6685-20240815",
"babel-plugin-react-compiler": "0.0.0-experimental-7d62301-20240821",
"babel-plugin-relay": "^17.0.0",
"babel-plugin-transform-remove-console": "^6.9.4",
"eslint": "^8.57.0",
"eslint-plugin-react": "^7.35.0",
"eslint-plugin-react-compiler": "0.0.0-experimental-9aef357-20240815",
"eslint-plugin-react-compiler": "0.0.0-experimental-8e3b87c-20240821",
"eslint-plugin-react-hooks": "^4.6.2",
"graphql": "^16.9.0",
"jest": "^29.7.0",
"jest-environment-node": "^29.7.0",
"jest-expo": "~51.0.3",
"jest-expo": "~51.0.4",
"react-test-renderer": "18.2.0",
"relay-compiler": "^17.0.0",
"ts-toolbelt": "^9.6.0",
Expand Down
Loading
Loading