Skip to content

Commit

Permalink
Merge pull request #582 from Peersyst/dev
Browse files Browse the repository at this point in the history
v1.3.0
  • Loading branch information
AdriaCarrera authored May 23, 2024
2 parents d8e264e + c301452 commit 58ddc51
Show file tree
Hide file tree
Showing 285 changed files with 8,024 additions and 5,130 deletions.
14 changes: 1 addition & 13 deletions App.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
import Root from "./src";
import useCachedResources from "./src/module/common/hook/useCachedResources";

//Explanation link :https://github.com/facebook/react-native/issues/12981#issuecomment-652745831
import { LogBox } from "react-native";

const App = (): JSX.Element | null => {
const isLoadingComplete = useCachedResources();
LogBox.ignoreLogs(["Setting a timer"]);
LogBox.ignoreLogs(["Require cycles"]);
LogBox.ignoreLogs(["Require cycle:"]);
return isLoadingComplete ? <Root /> : null;
};
import App from "./src";

export default App;
1 change: 1 addition & 0 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,5 @@ export default ({ config }: ConfigContext): ExpoConfig => ({
web: {
favicon: "./assets/images/favicon.png",
},
plugins: ["expo-localization"],
});
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ module.exports = function (api) {
},
],
["@babel/plugin-proposal-async-generator-functions"],
"transform-inline-environment-variables",
"react-native-reanimated/plugin",
"transform-inline-environment-variables"
],
};
};
18 changes: 17 additions & 1 deletion metro.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require("expo/metro-config");
const path = require("path");

module.exports = getDefaultConfig(__dirname);
const config = getDefaultConfig(__dirname);

config.resolver = {
extraNodeModules: {
crypto: path.resolve(__dirname, "src/polyfills/Crypto"),
fs: path.resolve(__dirname, "src/polyfills/FileSystem"),
path: path.resolve(__dirname, "src/polyfills/Path"),
stream: require.resolve("readable-stream"),
http: path.resolve(__dirname, "src/polyfills/Http"),
https: path.resolve(__dirname, "src/polyfills/Https"),
zlib: path.resolve(__dirname, "src/polyfills/Zlib"),
util: path.resolve(__dirname, "src/polyfills/Util"),
},
};

module.exports = config;
182 changes: 96 additions & 86 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
"scripts": {
"start": "yarn generate && expo start",
"start:fresh": "yarn start -c",
"postinstall": "./scripts/change-requirements.sh",
"android": "yarn start --android",
"android": "expo run:android",
"android:fresh": "yarn start:fresh --android",
"ios": "yarn start --ios",
"ios": "expo run:ios",
"ios:fresh": "yarn start:fresh --ios",
"web": "yarn start --web",
"web:fresh": "yarn start:fresh --web",
Expand All @@ -25,109 +24,120 @@
"test:unit:ci": "jest --runInBand --coverage ./test/unit",
"test:integration": "jest --maxWorkers=30% --coverage ./test/integration",
"test:debug": "jest --coverage --no-cache --runInBand || true",
"check-types": "tsc --noEmit",
"lint": "eslint . --ext .ts,.tsx,.js,.jsx,.json --max-warnings 0"
},
"dependencies": {
"@ckb-lumos/lumos": "^0.18.0-rc6",
"@expo/config-plugins": "^5.0.2",
"@peersyst/react-hooks": "^2.2.7",
"@peersyst/react-native-components": "^2.5.0",
"@peersyst/react-native-styled": "^2.1.2",
"@peersyst/react-types": "^1.5.5",
"@peersyst/react-utils": "^2.2.4",
"@ckb-lumos/lumos": "^0.22.0-next.4",
"@exact-realty/multipart-parser": "^1.0.13",
"@expo/config-plugins": "~7.2.2",
"@peersyst/react-hooks": "^2.2.10",
"@peersyst/react-native-components": "^3.5.0-alpha.0",
"@peersyst/react-native-styled": "^3.2.3",
"@peersyst/react-native-transak": "1.0.0",
"@peersyst/react-types": "^1.6.2",
"@peersyst/react-utils": "^2.4.1",
"@rather-labs/nrc-721-sdk": "0.0.16",
"@react-native-async-storage/async-storage": "~1.17.11",
"@react-native-community/hooks": "^2.8.1",
"@react-navigation/bottom-tabs": "^6.2.0",
"@react-navigation/native": "^6.0.8",
"@react-navigation/native-stack": "^6.5.0",
"big-integer": "^1.6.51",
"@react-native-async-storage/async-storage": "1.18.2",
"@react-native-community/hooks": "^3.0.0",
"@react-navigation/bottom-tabs": "^6.5.14",
"@react-navigation/native": "^6.1.12",
"@react-navigation/native-stack": "^6.9.20",
"@spore-sdk/core": "^0.2.0-beta.2",
"bech32": "2.0.0",
"big-integer": "^1.6.52",
"buffer": "^6.0.3",
"core-js": "^3.26.0",
"cross-fetch": "^3.1.5",
"expo": "^47.0.0",
"expo-asset": "~8.6.2",
"expo-barcode-scanner": "~12.0.0",
"expo-camera": "~13.0.0",
"expo-clipboard": "~4.0.1",
"expo-constants": "~14.0.2",
"expo-file-system": "~15.1.1",
"expo-font": "~11.0.1",
"expo-haptics": "~12.0.1",
"expo-linear-gradient": "~12.0.1",
"expo-linking": "~3.2.3",
"expo-local-authentication": "~13.0.2",
"expo-localization": "~14.0.0",
"expo-random": "~13.0.0",
"expo-secure-store": "~12.0.0",
"expo-splash-screen": "~0.17.5",
"expo-status-bar": "~1.4.2",
"expo-web-browser": "~12.0.0",
"fast-xml-parser": "^4.0.7",
"i18next": "^22.0.6",
"intl": "^1.2.5",
"core-js": "^3.36.0",
"cross-fetch": "^4.0.0",
"crypto-browserify": "^3.12.0",
"dotbit": "^0.4.29",
"expo": "^49.0.0",
"expo-asset": "~8.10.1",
"expo-barcode-scanner": "~12.5.3",
"expo-camera": "~13.4.4",
"expo-clipboard": "~4.3.1",
"expo-constants": "~14.4.2",
"expo-crypto": "~12.4.1",
"expo-file-system": "~15.4.5",
"expo-font": "~11.4.0",
"expo-haptics": "~12.4.0",
"expo-linear-gradient": "~12.3.0",
"expo-linking": "~5.0.2",
"expo-local-authentication": "~13.4.1",
"expo-localization": "~14.3.0",
"expo-random": "~13.2.0",
"expo-secure-store": "~12.3.1",
"expo-splash-screen": "~0.20.5",
"expo-status-bar": "~1.6.0",
"expo-web-browser": "~12.3.2",
"fast-xml-parser": "^4.3.5",
"i18next": "^23.10.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "18.1.0",
"react-dom": "18.1.0",
"react-i18next": "^12.0.0",
"react-native": "0.70.5",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-i18next": "^14.0.5",
"react-native": "0.72.10",
"react-native-expo-bitcoinjs-lib": "^2.4.4",
"react-native-expo-crypto": "^2.1.4",
"react-native-gesture-handler": "2.9.0",
"react-native-fs": "^2.20.0",
"react-native-gesture-handler": "~2.12.0",
"react-native-keyboard-aware-scroll-view": "^0.9.5",
"react-native-pager-view": "6.0.1",
"react-native-pager-view": "6.2.0",
"react-native-qrcode-svg": "^6.1.2",
"react-native-reanimated": "~2.12.0",
"react-native-safe-area-context": "4.4.1",
"react-native-screens": "~3.18.0",
"react-native-svg": "13.4.0",
"react-native-web": "~0.18.7",
"react-native-reanimated": "~3.3.0",
"react-native-safe-area-context": "4.6.3",
"react-native-screens": "~3.22.0",
"react-native-svg": "13.9.0",
"react-native-web": "~0.19.6",
"react-native-webp-format": "^1.1.2",
"react-native-webview": "13.2.2",
"react-query": "^3.34.14",
"recoil": "^0.7.6",
"recoil": "^0.7.7",
"stream-browserify": "^3.0.0",
"text-encoding-polyfill": "^0.6.7",
"whatwg-fetch": "^3.6.2"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/plugin-proposal-async-generator-functions": "^7.16.8",
"@testing-library/jest-native": "^5.1.2",
"@babel/core": "^7.24.0",
"@babel/plugin-proposal-async-generator-functions": "^7.20.7",
"@swisstype/essential": "^0.0.5",
"@testing-library/jest-native": "^5.4.3",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^11.3.0",
"@testing-library/react-native": "^12.4.3",
"@types/bs58": "^4.0.1",
"@types/jest": "^27.5.2",
"@types/node": "^17.0.22",
"@types/react": "~18.0.24",
"@types/react-dom": "~18.0.8",
"@types/react-native": "~0.70.6",
"@typescript-eslint/eslint-plugin": "^5.11.0",
"@typescript-eslint/parser": "^5.11.0",
"babel-plugin-module-resolver": "^4.1.0",
"@types/jest": "^29.5.12",
"@types/node": "^20.10.20",
"@types/react": "~18.2.14",
"@typescript-eslint/eslint-plugin": "^7.1.0",
"@typescript-eslint/parser": "^7.1.0",
"babel-plugin-module-resolver": "^5.0.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"eslint": "^8.8.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"jest": "^27.5.1",
"jest-expo": "^47.0.0",
"openapi-typescript": "^5.1.1",
"openapi-typescript-codegen": "^0.19.0",
"prettier": "^2.5.1",
"react-test-renderer": "18.1.0",
"ts-jest": "^27.1.5",
"typescript": "^4.6.3"
"eslint": "^8.57.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.0",
"eslint-plugin-react": "^7.33.0",
"eslint-plugin-react-hooks": "^4.6.0",
"jest": "^29.7.0",
"jest-expo": "^49.0.0",
"openapi-typescript": "^6.7.4",
"openapi-typescript-codegen": "^0.27.0",
"prettier": "^3.2.5",
"react-test-renderer": "18.2.0",
"text-encoding": "^0.7.0",
"ts-jest": "^29.1.2",
"typescript": "^5.1.3"
},
"resolutions": {
"@types/react": "18.0.25",
"react": "18.1.0",
"@types/react-dom": "18.0.8",
"react-dom": "18.1.0",
"react-native-pager-view": "6.0.0",
"react-native-svg": "13.4.0",
"react-native-gesture-handler": "2.9.0",
"react-native-reanimated": "~2.12.0",
"immutable": "4.0.0-rc.12"
}
"react-native-pager-view": "6.2.2",
"react-native-svg": "13.9.0",
"react-native-gesture-handler": "2.12.0",
"react-native-reanimated": "~3.3.0",
"bech32": "2.0.0",
"expo-modules-autolinking": "~1.5.0",
"@expo/config-plugins": "~7.2.2",
"@expo/prebuild-config": "~6.2.4",
"@expo/metro-config": "~0.10.0"
},
"version": "1.0.0"
}
35 changes: 0 additions & 35 deletions scripts/change-requirements.sh

This file was deleted.

17 changes: 10 additions & 7 deletions src/Providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ import QueryClientProvider from "./query/QueryClientProvider";
import { ConfigProvider } from "./config";
import { I18nextProvider } from "react-i18next";
import i18n from "./locale/i18n";
import { StylesheetProvider } from "./stylesheets/StylesheetProvider";

const Providers = ({ children }: PropsWithChildren<unknown>): JSX.Element => (
<RecoilRoot>
<SafeAreaProvider initialSafeAreaInsets={{ top: 0, left: 0, right: 0, bottom: 0 }}>
<SafeAreaProvider>
<I18nextProvider i18n={i18n}>
<ConfigProvider>
<ToastProvider>
<QueryClientProvider>
{children}
{/*{process.env.NODE_ENV === 'development' && <ReactQueryDevtools initialIsOpen={false} />}*/}
</QueryClientProvider>
</ToastProvider>
<StylesheetProvider>
<ToastProvider>
<QueryClientProvider>
{children}
{/*{process.env.NODE_ENV === 'development' && <ReactQueryDevtools initialIsOpen={false} />}*/}
</QueryClientProvider>
</ToastProvider>
</StylesheetProvider>
</ConfigProvider>
</I18nextProvider>
</SafeAreaProvider>
Expand Down
3 changes: 3 additions & 0 deletions src/asset/icon/Database.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 5 additions & 1 deletion src/config/ConfigProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ export interface ConfigProviderProps {
const ConfigProvider = ({ children }: ConfigProviderProps): JSX.Element => {
const translate = useTranslate("error");
const { locale = "en" } = useRecoilValue(settingsState);
return <GenesysConfigProvider config={{ ...config, translate, locale }}>{children}</GenesysConfigProvider>;
return (
<GenesysConfigProvider config={{ ...config, translate, locale }} storeTheme>
{children}
</GenesysConfigProvider>
);
};

export default ConfigProvider;
2 changes: 1 addition & 1 deletion src/config/config.base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"projectName": "ckbull",
"minimumTransactionAmount": 61,
"minimumTransactionAmount": 85,
"minimumDaoDeposit": 102,
"mainnetExplorerLink": "https://explorer.nervos.org/",
"testnetExplorerLink": "https://pudge.explorer.nervos.org/",
Expand Down
8 changes: 8 additions & 0 deletions src/config/config.declarations.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ import { TFunction } from "react-i18next";
import { MaxAmountValidatorOptions } from "./validators/MaxAmountValidator";
import { MinAmountFromDecimalsValidatorOptions } from "./validators/MinAmountFromDecimalsValidator";
import { MinAmountValidatorOptions } from "./validators/MinAmountValidator";
import { TransakOnRampQueryParams } from "@peersyst/react-native-transak";

export interface TransakConfig extends Omit<TransakOnRampQueryParams, "environment"> {
environment: string;
enableTransak: boolean;
}

declare module "@peersyst/react-native-components" {
export interface ConfigTypes {
Expand Down Expand Up @@ -32,6 +38,7 @@ declare module "@peersyst/react-native-components" {
/* signerUrl: url of CKBull Developer Console, if you're running this in a local envirorment add your IP as host. p.e. http://192.168.1.2:3001 */
signerUrl: string;
defaultDAppImage: string;
transak: TransakConfig;
}

export interface CreateConfig {
Expand All @@ -54,6 +61,7 @@ declare module "@peersyst/react-native-components" {
enableSignerApp: boolean;
signerUrl: string;
defaultDAppImage: string;
transak: TransakConfig;
}

export interface ExtraValidators {
Expand Down
Loading

0 comments on commit 58ddc51

Please sign in to comment.