From 6c391f56ef68e230c96dd2bcea3fbab1d070c82c Mon Sep 17 00:00:00 2001 From: Kirill Ageychenko Date: Tue, 17 Dec 2024 17:02:47 +0700 Subject: [PATCH] feat(HW-1012): network logger --- assets/locales/en/en.json | 3 +- assets/locales/id/id.json | 2 +- index.js | 2 +- ios/Podfile.lock | 25 ++ package.json | 2 + src/app.tsx | 24 ++ .../home-settings/home-settings.tsx | 10 +- .../home-settings/settings-button.tsx | 8 +- src/contexts/app.ts | 6 +- src/i18n.ts | 1 + src/models/app/app.store.ts | 30 ++ src/route-types.ts | 2 + .../SettingsStack/settings-about.tsx | 8 +- src/screens/HomeStack/index.tsx | 7 + src/screens/settings-developer-tools.tsx | 275 +++--------------- src/types.ts | 2 +- src/utils.ts | 229 +++++++++++++++ src/variables/common.ts | 1 + yarn.lock | 22 ++ 19 files changed, 415 insertions(+), 244 deletions(-) diff --git a/assets/locales/en/en.json b/assets/locales/en/en.json index d1a7d5c24..a3302f2f9 100644 --- a/assets/locales/en/en.json +++ b/assets/locales/en/en.json @@ -3,7 +3,7 @@ "StakingInfoUnDelegationDay": " ({{day}} day left)", "StakingInfoUnDelegationDays": " ({{days}} days left)", "Welcome_haqq_pin": "Welcome to HAQQ Wallet", - "_hash": "11e244ed30a5ce81abd18764e5daf82433d9f3c694c4823ca7a8258cefe2e936", + "_hash": "fada1b8ee4f00219e0ba864865e56984d0f683c6ad3ab5799680063212688eec", "accept": "Accept", "accountInfoNftTabTitle": "NFTs", "accountInfoTokensTabTitle": "Tokens", @@ -391,6 +391,7 @@ "moreAboutMaxPriorityFee": "More about Max Priority Fee", "name": "Name", "networkFee": "Network fee: {{value}}", + "networkLoggerTitle": "Network Logger", "networks": "Networks", "newUpdateAccept": "Update", "newUpdateCancel": "Not now", diff --git a/assets/locales/id/id.json b/assets/locales/id/id.json index 52a6cb61c..92e0f8b1e 100644 --- a/assets/locales/id/id.json +++ b/assets/locales/id/id.json @@ -3,7 +3,7 @@ "StakingInfoUnDelegationDay": " ({{day}} hari tersisa)", "StakingInfoUnDelegationDays": " ({{days}} hari tersisa)", "Welcome_haqq_pin": "Selamat datang di HAQQ Wallet", - "_hash": "897ed6dd6351a644bd14f105c5d24b0ebd024c3d36111821eb64cf45eb590849", + "_hash": "c85f09fc9c89a38b662904826e10e346a502c9755f8ac8594946847c814b573b", "accept": "Terima", "accountInfoNftTabTitle": "NFTs", "accountInfoTokensTabTitle": "Token", diff --git a/index.js b/index.js index a09f0d531..271d458bd 100644 --- a/index.js +++ b/index.js @@ -7,6 +7,7 @@ import './src/modifiers/json-rpc-provider.modifier'; import {DEBUG_VARS} from '@app/debug-vars'; import {enableBatchedStateUpdates} from '@app/hooks/batched-set-state'; +import {Language} from '@app/models/language'; import {IS_IOS, RTL_LANGUAGES} from '@app/variables/common'; import messaging from '@react-native-firebase/messaging'; import * as Sentry from '@sentry/react-native'; @@ -16,7 +17,6 @@ import {name as appName} from './app.json'; import {App} from './src/app'; import './src/event-actions'; import {Jailbreak} from './src/jailbreak'; -import {Language} from '@app/models/language'; LogBox.ignoreAllLogs(); if (!global.BigInt) { diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 1b9682552..8c688255d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -1222,6 +1222,27 @@ PODS: - React-Core - react-native-safe-area-context (4.11.1): - React-Core + - react-native-shake (6.0.0-beta.3): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Codegen + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - react-native-splash-screen (3.3.0): - React-Core - react-native-video (6.6.4): @@ -1773,6 +1794,7 @@ DEPENDENCIES: - react-native-randombytes (from `../node_modules/react-native-randombytes`) - react-native-restart (from `../node_modules/react-native-restart`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) + - react-native-shake (from `../node_modules/react-native-shake`) - react-native-splash-screen (from `../node_modules/react-native-splash-screen`) - react-native-video (from `../node_modules/react-native-video`) - react-native-video-cache (from `../node_modules/react-native-video-cache`) @@ -1979,6 +2001,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-restart" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" + react-native-shake: + :path: "../node_modules/react-native-shake" react-native-splash-screen: :path: "../node_modules/react-native-splash-screen" react-native-video: @@ -2166,6 +2190,7 @@ SPEC CHECKSUMS: react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846 react-native-restart: 7595693413fe3ca15893702f2c8306c62a708162 react-native-safe-area-context: 5141f11858b033636f1788b14f32eaba92cee810 + react-native-shake: ac71c914bd6a77259c982790e31802eb7f8b90e1 react-native-splash-screen: 4312f786b13a81b5169ef346d76d33bc0c6dc457 react-native-video: 917795f0e661c6542d1c7e4cb0d30f732b6f6ebf react-native-video-cache: 8300762bd3fd1c3dd19b76ba5236ca35de1f4bf7 diff --git a/package.json b/package.json index 86f9fd297..3887670f6 100644 --- a/package.json +++ b/package.json @@ -132,6 +132,7 @@ "react-native-markdown-package": "1.8.2", "react-native-mmkv": "2.12.2", "react-native-network-info": "5.2.1", + "react-native-network-logger": "^1.17.0", "react-native-os": "https://github.com/aprock/react-native-os#938676ebd92d58b8928168a7e78cbe216838ed17", "react-native-permissions": "5.0.1", "react-native-play-install-referrer": "1.1.8", @@ -145,6 +146,7 @@ "react-native-restart": "0.0.27", "react-native-safe-area-context": "4.11.1", "react-native-screens": "3.29.0", + "react-native-shake": "^6.0.0-beta.3", "react-native-skeleton-placeholder": "5.2.4", "react-native-splash-screen": "3.3.0", "react-native-svg": "13.10.0", diff --git a/src/app.tsx b/src/app.tsx index 46a024e2a..b87d5529c 100644 --- a/src/app.tsx +++ b/src/app.tsx @@ -14,8 +14,10 @@ import {observer} from 'mobx-react'; import PostHog, {PostHogProvider} from 'posthog-react-native'; import {AppState, Dimensions, Linking, StyleSheet} from 'react-native'; import {GestureHandlerRootView} from 'react-native-gesture-handler'; +import {startNetworkLogging} from 'react-native-network-logger'; import {MenuProvider} from 'react-native-popup-menu'; import {Metrics, SafeAreaProvider} from 'react-native-safe-area-context'; +import RNShake from 'react-native-shake'; import SplashScreen from 'react-native-splash-screen'; import {Color} from '@app/colors'; @@ -32,6 +34,7 @@ import {Stories} from '@app/models/stories'; import {VariablesBool} from '@app/models/variables-bool'; import {navigator} from '@app/navigator'; import { + HomeStackRoutes, KeystoneStackRoutes, LedgerStackRoutes, OnboardingStackRoutes, @@ -47,6 +50,7 @@ import {AppStore} from './models/app'; import {migrationWallets} from './models/migration-wallets'; import {Wallet} from './models/wallet'; import {EventTracker} from './services/event-tracker'; +import {HapticEffects, vibrate} from './services/haptic'; const appTheme = createTheme({ colors: { @@ -97,10 +101,30 @@ export const App = observer(() => { [theme], ); + useEffect(() => { + if (AppStore.networkLoggerEnabled && !__DEV__) { + const subscription = RNShake.addListener(() => { + vibrate(HapticEffects.success); + navigator.navigate(HomeStackRoutes.NetworkLogger); + }); + + return () => { + subscription.remove(); + }; + } + }, [AppStore.networkLoggerEnabled]); + useEffect(() => { const splashTimer = setTimeout(() => { hideModal(ModalType.splash); }, SPLASH_TIMEOUT_MS); + if (AppStore.networkLoggerEnabled) { + startNetworkLogging({ + forceEnable: true, + ignoredPatterns: [/posthog\.com/, /google\.com/], + maxRequests: AppStore.networkLogsCacheSize, + }); + } sleep(150) .then(async () => await app.awaitForInitialization()) .then(() => SplashScreen.hide()) diff --git a/src/components/home-settings/home-settings.tsx b/src/components/home-settings/home-settings.tsx index 3bb74b8ec..ecb8b7f33 100644 --- a/src/components/home-settings/home-settings.tsx +++ b/src/components/home-settings/home-settings.tsx @@ -16,7 +16,7 @@ import {AppStore} from '@app/models/app'; import {Currencies} from '@app/models/currencies'; import {Language} from '@app/models/language'; import {VariablesString} from '@app/models/variables-string'; -import {SettingsStackRoutes} from '@app/route-types'; +import {HomeStackRoutes, SettingsStackRoutes} from '@app/route-types'; import {AppTheme} from '@app/types'; import {openStorePage} from '@app/utils'; @@ -170,6 +170,14 @@ export const HomeSettings = observer(() => { /> )} + {AppStore.networkLoggerEnabled && ( + + )} + {AppStore.isDeveloperModeEnabled && ( { + this._networkLoggerEnabled = value; + }); + } + + get networkLogsCacheSize() { + return this._networkLogsCacheSize; + } + + set networkLogsCacheSize(value: number) { + runInAction(() => { + this._networkLogsCacheSize = value; + }); + } } const instance = new AppStore(); diff --git a/src/route-types.ts b/src/route-types.ts index 6307fe930..4247e7f4b 100644 --- a/src/route-types.ts +++ b/src/route-types.ts @@ -348,6 +348,7 @@ export enum HomeStackRoutes { SelectNetwork = 'selectNetwork', Receive = 'receive', Backup = 'backup', + NetworkLogger = 'networkLogger', WalletProtectionPopup = 'walletProtectionPopup', WalletConnectApplicationDetailsPopup = 'walletConnectApplicationDetailsPopup', WalletConnectApplicationListPopup = 'walletConnectApplicationListPopup', @@ -380,6 +381,7 @@ export type HomeStackParamList = { [HomeStackRoutes.Device]: undefined; [HomeStackRoutes.SignIn]: undefined; [HomeStackRoutes.SignUp]: undefined; + [HomeStackRoutes.NetworkLogger]: undefined; [HomeStackRoutes.AccountInfo]: {accountId: string}; [HomeStackRoutes.Transaction]: { from?: string; diff --git a/src/screens/HomeStack/SettingsStack/settings-about.tsx b/src/screens/HomeStack/SettingsStack/settings-about.tsx index 14fb6f2dc..509703ef8 100644 --- a/src/screens/HomeStack/SettingsStack/settings-about.tsx +++ b/src/screens/HomeStack/SettingsStack/settings-about.tsx @@ -1,12 +1,13 @@ import React, {useCallback} from 'react'; import {Alert} from 'react-native'; +import RNRestart from 'react-native-restart'; import {SettingsAbout} from '@app/components/settings-about'; import {I18N, getText} from '@app/i18n'; import {AppStore} from '@app/models/app'; -import {navigator} from '@app/navigator'; import {HapticEffects, vibrate} from '@app/services/haptic'; +import {sleep} from '@app/utils'; export const SettingsAboutScreen = () => { const onEnableDevMode = useCallback(() => { @@ -18,10 +19,11 @@ export const SettingsAboutScreen = () => { { text: getText(I18N.developerModeAttentionEnable), style: 'destructive', - onPress: () => { + onPress: async () => { AppStore.isTesterModeEnabled = true; vibrate(HapticEffects.success); - navigator.goBack(); + await sleep(200); + RNRestart.restart(); }, }, { diff --git a/src/screens/HomeStack/index.tsx b/src/screens/HomeStack/index.tsx index 820d284de..f139d8d94 100644 --- a/src/screens/HomeStack/index.tsx +++ b/src/screens/HomeStack/index.tsx @@ -6,6 +6,7 @@ import { } from '@react-navigation/native-stack'; import {StatusBar} from 'react-native'; import Config from 'react-native-config'; +import NetworkLogger from 'react-native-network-logger'; import {Color} from '@app/colors'; import {DismissPopupButton} from '@app/components/popup/dismiss-popup-button'; @@ -127,6 +128,12 @@ const HomeStack = memo(() => { options={modalOptions} /> + + ( ); -export const SHOW_NON_WHITELIST_TOKEN = 'SHOW_NON_WHITELIST_TOKEN'; - export const SettingsDeveloperTools = observer(() => { - const {showActionSheetWithOptions} = useActionSheet(); + const actionSheetProps = useActionSheet(); const {animate} = useLayoutAnimation(); const [wc, setWc] = useState(''); const [rawSignData, setRawSignData] = useState(''); @@ -115,7 +119,8 @@ export const SettingsDeveloperTools = observer(() => { const onTurnOffDeveloper = useCallback(() => { AppStore.isTesterModeEnabled = false; - navigator.goBack(); + stopNetworkLogging(); + RNRestart.restart(); }, []); const handleShowJsonViewer = useCallback(() => { @@ -235,7 +240,7 @@ TRON:\n${AddressUtils.toTron(watchOnlyAddress)}`, }); return ( - + {isAppInfoHidden && ( @@ -288,6 +293,33 @@ TRON:\n${AddressUtils.toTron(watchOnlyAddress)}`, icon={IconsName.language} title={I18N.homeSettingsLanguage} /> + + + + <MenuNavigationButton hideArrow onPress={() => {}}> + <DataContent + style={styles.dataContent} + title={'Enable network logger'} + subtitle={'Shake device to show network logs'} + /> + <Spacer width={24} /> + <Switch + value={AppStore.networkLoggerEnabled} + onChange={({nativeEvent: {value}}) => { + AppStore.networkLoggerEnabled = value; + if (value) { + startNetworkLogging({ + forceEnable: true, + ignoredPatterns: [/posthog\.com/, /google\.com/], + maxRequests: AppStore.networkLogsCacheSize, + }); + } else { + stopNetworkLogging(); + } + }} + /> + </MenuNavigationButton> + <Spacer height={8} /> <Title text="Watch only wallet" /> <Input @@ -493,232 +525,11 @@ TRON:\n${AddressUtils.toTron(watchOnlyAddress)}`, <Spacer height={8} /> <Button title="Transaction snippet" - onPress={() => { - showActionSheetWithOptions( - { - options: [ - 'Cancel', - 'eth_sendTransaction', - 'eth_signTransaction', - 'personal_sign', - 'eth_signTypedData_v4', - 'Sign in with Ethereum', - ], - cancelButtonIndex: 0, - destructiveButtonIndex: 0, - title: 'Choose action', - }, - index => { - let tx = {} as PartialJsonRpcRequest; - //eth_sendTransaction and eth_signTransaction - if (index === 1 || index === 2) { - tx = { - method: - index === 1 ? 'eth_sendTransaction' : 'eth_signTransaction', - params: [ - { - value: '1000000', - to: 'TXtLUKcumR3TNpCcCzr4tjjkpKpMeJ5H66', - }, - ], - }; - } - // personal_sign - if (index === 3) { - tx = { - method: 'personal_sign', - params: [ - '0x415b829d862121f25fcdfdfadf7a705e45249dbc', - 'Hello HAQQ Wallet!', - ], - }; - } - - // eth_signTypedData_v4 - if (index === 4) { - tx = { - method: 'eth_signTypedData_v4', - params: [ - '0x1bb71b571a16eed293d931d245f43d2a1d341759', - { - types: { - EIP712Domain: [ - { - name: 'name', - type: 'string', - }, - { - name: 'version', - type: 'string', - }, - { - name: 'chainId', - type: 'uint256', - }, - { - name: 'verifyingContract', - type: 'string', - }, - { - name: 'salt', - type: 'string', - }, - ], - Tx: [ - { - name: 'account_number', - type: 'string', - }, - { - name: 'chain_id', - type: 'string', - }, - { - name: 'fee', - type: 'Fee', - }, - { - name: 'memo', - type: 'string', - }, - { - name: 'msgs', - type: 'Msg[]', - }, - { - name: 'sequence', - type: 'string', - }, - ], - Fee: [ - { - name: 'feePayer', - type: 'string', - }, - { - name: 'amount', - type: 'Coin[]', - }, - { - name: 'gas', - type: 'string', - }, - ], - Coin: [ - { - name: 'denom', - type: 'string', - }, - { - name: 'amount', - type: 'string', - }, - ], - Msg: [ - { - name: 'type', - type: 'string', - }, - { - name: 'value', - type: 'MsgValue', - }, - ], - MsgValue: [ - { - name: 'delegator_address', - type: 'string', - }, - { - name: 'validator_address', - type: 'string', - }, - { - name: 'amount', - type: 'TypeAmount', - }, - ], - TypeAmount: [ - { - name: 'denom', - type: 'string', - }, - { - name: 'amount', - type: 'string', - }, - ], - }, - primaryType: 'Tx', - domain: { - name: 'Cosmos Web3', - version: '1.0.0', - chainId: 11235, - verifyingContract: 'cosmos', - salt: '0', - }, - message: { - account_number: '3239277', - chain_id: 'haqq_11235-1', - fee: { - amount: [ - { - amount: '181336045000000000', - denom: 'aISLM', - }, - ], - gas: '6594038', - feePayer: - 'haqq1rwm3k4c6zmhd9y7ex8fytapa9gwng96eapx3ek', - }, - memo: '', - msgs: [ - { - type: 'cosmos-sdk/MsgDelegate', - value: { - amount: { - amount: '1000000000000000000', - denom: 'aISLM', - }, - delegator_address: - 'haqq1rwm3k4c6zmhd9y7ex8fytapa9gwng96eapx3ek', - validator_address: - 'haqqvaloper16hy887wxzjmmkkfrdxzgz9dlv6mfru56q539cw', - }, - }, - ], - sequence: '1', - }, - }, - ], - }; - } - - // Sign in with Ethereum - if (index === 5) { - tx = { - method: 'personal_sign', - params: [ - '0x415b829d862121f25fcdfdfadf7a705e45249dbc', - `HAQQ Wallet wants you to sign in with your Ethereum account: -0x415b829d862121f25fcdfdfadf7a705e45249dbc - -This is a test statement. - -URI: https://test.test/login -Version: 1 -Chain ID: 11235 -Nonce: 1234567890 -Issued At: 2024-02-20T12:00:00.000Z`, - ], - }; - } - - setRawSignData(JSON.stringify(tx, null, 2)); - setSignData(tx); - setValidRawSignData(true); - }, - ); + onPress={async () => { + const tx = await requestMockTxActionSheet(actionSheetProps); + setRawSignData(JSON.stringify(tx, null, 2)); + setSignData(tx); + setValidRawSignData(true); }} variant={ButtonVariant.second} /> diff --git a/src/types.ts b/src/types.ts index 94e4c99dd..dfc2fe737 100644 --- a/src/types.ts +++ b/src/types.ts @@ -266,7 +266,7 @@ export type RootStackParamList = { backup: { accountId: string; }; - + networkLogger: undefined; sssMigrate: { accountId: string; }; diff --git a/src/utils.ts b/src/utils.ts index b53c040c7..4a3c62197 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,5 @@ /* eslint-disable no-bitwise */ +import {ActionSheetProps} from '@expo/react-native-action-sheet'; import {formatNumberWithSubscriptZeros} from '@haqq/format-number-with-subscript-zeros/src'; import AsyncStorage from '@react-native-async-storage/async-storage'; import {SessionTypes} from '@walletconnect/types'; @@ -1158,3 +1159,231 @@ export const deepClone = (value?: Object) => { return JSON.parse(JSON.stringify(value)); }; + +export const requestMockTxActionSheet = async ({ + showActionSheetWithOptions, +}: ActionSheetProps): Promise<PartialJsonRpcRequest> => { + return new Promise(resolve => { + showActionSheetWithOptions( + { + options: [ + 'Cancel', + 'eth_sendTransaction', + 'eth_signTransaction', + 'personal_sign', + 'eth_signTypedData_v4', + 'Sign in with Ethereum', + ], + cancelButtonIndex: 0, + destructiveButtonIndex: 0, + title: 'Choose action', + }, + index => { + let tx = {} as PartialJsonRpcRequest; + //eth_sendTransaction and eth_signTransaction + if (index === 1 || index === 2) { + tx = { + method: index === 1 ? 'eth_sendTransaction' : 'eth_signTransaction', + params: [ + { + value: '1000000', + to: 'TXtLUKcumR3TNpCcCzr4tjjkpKpMeJ5H66', + }, + ], + }; + } + // personal_sign + if (index === 3) { + tx = { + method: 'personal_sign', + params: [ + '0x415b829d862121f25fcdfdfadf7a705e45249dbc', + 'Hello HAQQ Wallet!', + ], + }; + } + + // eth_signTypedData_v4 + if (index === 4) { + tx = { + method: 'eth_signTypedData_v4', + params: [ + '0x1bb71b571a16eed293d931d245f43d2a1d341759', + { + types: { + EIP712Domain: [ + { + name: 'name', + type: 'string', + }, + { + name: 'version', + type: 'string', + }, + { + name: 'chainId', + type: 'uint256', + }, + { + name: 'verifyingContract', + type: 'string', + }, + { + name: 'salt', + type: 'string', + }, + ], + Tx: [ + { + name: 'account_number', + type: 'string', + }, + { + name: 'chain_id', + type: 'string', + }, + { + name: 'fee', + type: 'Fee', + }, + { + name: 'memo', + type: 'string', + }, + { + name: 'msgs', + type: 'Msg[]', + }, + { + name: 'sequence', + type: 'string', + }, + ], + Fee: [ + { + name: 'feePayer', + type: 'string', + }, + { + name: 'amount', + type: 'Coin[]', + }, + { + name: 'gas', + type: 'string', + }, + ], + Coin: [ + { + name: 'denom', + type: 'string', + }, + { + name: 'amount', + type: 'string', + }, + ], + Msg: [ + { + name: 'type', + type: 'string', + }, + { + name: 'value', + type: 'MsgValue', + }, + ], + MsgValue: [ + { + name: 'delegator_address', + type: 'string', + }, + { + name: 'validator_address', + type: 'string', + }, + { + name: 'amount', + type: 'TypeAmount', + }, + ], + TypeAmount: [ + { + name: 'denom', + type: 'string', + }, + { + name: 'amount', + type: 'string', + }, + ], + }, + primaryType: 'Tx', + domain: { + name: 'Cosmos Web3', + version: '1.0.0', + chainId: 11235, + verifyingContract: 'cosmos', + salt: '0', + }, + message: { + account_number: '3239277', + chain_id: 'haqq_11235-1', + fee: { + amount: [ + { + amount: '181336045000000000', + denom: 'aISLM', + }, + ], + gas: '6594038', + feePayer: 'haqq1rwm3k4c6zmhd9y7ex8fytapa9gwng96eapx3ek', + }, + memo: '', + msgs: [ + { + type: 'cosmos-sdk/MsgDelegate', + value: { + amount: { + amount: '1000000000000000000', + denom: 'aISLM', + }, + delegator_address: + 'haqq1rwm3k4c6zmhd9y7ex8fytapa9gwng96eapx3ek', + validator_address: + 'haqqvaloper16hy887wxzjmmkkfrdxzgz9dlv6mfru56q539cw', + }, + }, + ], + sequence: '1', + }, + }, + ], + }; + } + + // Sign in with Ethereum + if (index === 5) { + tx = { + method: 'personal_sign', + params: [ + '0x415b829d862121f25fcdfdfadf7a705e45249dbc', + `HAQQ Wallet wants you to sign in with your Ethereum account: + 0x415b829d862121f25fcdfdfadf7a705e45249dbc + + This is a test statement. + + URI: https://test.test/login + Version: 1 + Chain ID: 11235 + Nonce: 1234567890 + Issued At: 2024-02-20T12:00:00.000Z`, + ], + }; + } + + resolve(tx); + }, + ); + }); +}; diff --git a/src/variables/common.ts b/src/variables/common.ts index ba102d3d8..a75863ef1 100644 --- a/src/variables/common.ts +++ b/src/variables/common.ts @@ -273,6 +273,7 @@ export const HAQQ_DYNAMIC_LINKS_HOSTNAME = [ 'haqq.page.link', 'preview.page.link', ]; +export const SHOW_NON_WHITELIST_TOKEN = 'SHOW_NON_WHITELIST_TOKEN'; export const TRANSACTION_TOPIC_VARIABLE_NAME = `notificationsTopic:${PushNotificationTopicsEnum.transactions}`; export const NEWS_TOPIC_VARIABLE_NAME = `notificationsTopic:${PushNotificationTopicsEnum.news}`; diff --git a/yarn.lock b/yarn.lock index c0518672f..68811f903 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11547,6 +11547,7 @@ __metadata: react-native-markdown-package: 1.8.2 react-native-mmkv: 2.12.2 react-native-network-info: 5.2.1 + react-native-network-logger: ^1.17.0 react-native-os: "https://github.com/aprock/react-native-os#938676ebd92d58b8928168a7e78cbe216838ed17" react-native-permissions: 5.0.1 react-native-play-install-referrer: 1.1.8 @@ -11560,6 +11561,7 @@ __metadata: react-native-restart: 0.0.27 react-native-safe-area-context: 4.11.1 react-native-screens: 3.29.0 + react-native-shake: ^6.0.0-beta.3 react-native-skeleton-placeholder: 5.2.4 react-native-splash-screen: 3.3.0 react-native-svg: 13.10.0 @@ -16596,6 +16598,16 @@ __metadata: languageName: node linkType: hard +"react-native-network-logger@npm:^1.17.0": + version: 1.17.0 + resolution: "react-native-network-logger@npm:1.17.0" + peerDependencies: + react: "*" + react-native: "*" + checksum: 3024fb8b091483130186d47a6570bd5a66e0bc207a6a5ca78608b94609d4b02ff52462327bbd1b135f9b5b56a9b221849c1ddcf1703c4238e952d48d1fb98d73 + languageName: node + linkType: hard + "react-native-os@https://github.com/aprock/react-native-os#938676ebd92d58b8928168a7e78cbe216838ed17": version: 1.2.7 resolution: "react-native-os@https://github.com/aprock/react-native-os.git#commit=938676ebd92d58b8928168a7e78cbe216838ed17" @@ -16766,6 +16778,16 @@ __metadata: languageName: node linkType: hard +"react-native-shake@npm:^6.0.0-beta.3": + version: 6.0.0-beta.3 + resolution: "react-native-shake@npm:6.0.0-beta.3" + peerDependencies: + react: "*" + react-native: "*" + checksum: a58fa713039808192d318cf336f21e00826c1114db4ea9d4010591c3ca65ec32ef05d4970eeda5474ff692c496be038ce0bbd6625126a4a3f8fa8e077f25d3f6 + languageName: node + linkType: hard + "react-native-skeleton-placeholder@npm:5.2.4": version: 5.2.4 resolution: "react-native-skeleton-placeholder@npm:5.2.4"