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

Commit a3d2d9a

Browse files
committed
fix(app): native build
1 parent fbff59c commit a3d2d9a

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.easignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@
55
/api
66
/contracts
77
/docs
8+
/services
89
# packages/{chain,lib} are required

app/app.config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const vary = (value: string, f: (variant: string) => string = (v) => '.' + v) =>
1717
type ExternalUrl = `https:${string}`;
1818

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

4243
export type Config = typeof CONFIG;
4344

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

4747
// https://docs.expo.dev/versions/latest/config/app/
@@ -55,7 +55,7 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
5555
runtimeVersion: { policy: 'fingerprint' },
5656
extra: {
5757
...CONFIG,
58-
eas: { projectId: PROJECT_ID },
58+
eas: { projectId: CONFIG.projectId },
5959
},
6060
plugins: [
6161
[
@@ -177,6 +177,6 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
177177
// reactCompiler: true,
178178
},
179179
updates: {
180-
url: `https://u.expo.dev/${PROJECT_ID}`,
180+
url: `https://u.expo.dev/${CONFIG.projectId}`,
181181
},
182182
});

app/babel.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ module.exports = function (api) {
1414
],
1515
plugins: [
1616
'@babel/plugin-transform-flow-strip-types', // Must proceed other @babel plugins - https://github.com/facebook/react-native/issues/36828
17-
['@babel/plugin-transform-private-methods', { loose: true }], // Required by ethers
17+
// ['@babel/plugin-transform-private-methods', { loose: true }], // Required by ethers
1818
['babel-plugin-react-compiler', { runtimeModule: 'react-compiler-runtime' }],
1919
[
2020
'module-resolver',

app/src/components/provider/NotificationsProvider/NotificationsRegistrar.native.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { PROJECT_ID } from 'app.config';
21
import * as Notifications from 'expo-notifications';
32
import type { DevicePushToken } from 'expo-notifications';
43
import { useEffect } from 'react';
@@ -13,6 +12,7 @@ import { graphql } from 'relay-runtime';
1312
import { useLazyQuery } from '~/api';
1413
import { NotificationsRegistrarQuery } from '~/api/__generated__/NotificationsRegistrarQuery.graphql';
1514
import { useMutation } from '~/api';
15+
import { CONFIG } from '~/util/config';
1616

1717
const Query = graphql`
1818
query NotificationsRegistrarQuery {
@@ -88,7 +88,7 @@ export const NotificationsRegistrar = () => {
8888

8989
const pushToken = (
9090
await Notifications.getExpoPushTokenAsync({
91-
projectId: PROJECT_ID,
91+
projectId: CONFIG.projectId,
9292
devicePushToken: devicePushToken ?? (await Notifications.getDevicePushTokenAsync()),
9393
})
9494
).data;

app/src/util/patches/index.native.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import '@walletconnect/react-native-compat';
99
// Intl pollyfills - required for iOS
1010
import './intl';
1111

12+
// Import corejs async iterator polyfill
13+
import 'core-js/features/symbol/async-iterator'; // Required for neverthrow & viem
14+
1215
global.process = require('process');
1316
// @ts-expect-error Cannot assign to userAgent because it is a read-only property.
1417
global.navigator.userAgent ??= 'React Native';
1518

16-
// Import corejs async iterator polyfill
17-
import 'core-js/features/symbol/async-iterator'; // Required for neverthrow & viem
18-
1919
export default {};

0 commit comments

Comments
 (0)