From 028a71e481e464bc393a8c017c7d034f4a3c2a83 Mon Sep 17 00:00:00 2001 From: Andrey Sorokin Date: Wed, 15 May 2024 19:59:11 +0500 Subject: [PATCH] fix(mobile): add signer_about_url to config (#858) --- packages/mobile/src/config/index.ts | 8 ++++++-- .../screens/PairSignerScreen/PairSignerScreen.tsx | 14 +++++++++++--- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/packages/mobile/src/config/index.ts b/packages/mobile/src/config/index.ts index 176a60e84..4f5612c62 100644 --- a/packages/mobile/src/config/index.ts +++ b/packages/mobile/src/config/index.ts @@ -43,7 +43,6 @@ export type AppConfigVars = { tonapiTestnetHost: string; tronapiHost: string; tronapiTestnetHost: string; - signerStoreUrl: string; batteryHost: string; batteryTestnetHost: string; @@ -70,6 +69,9 @@ export type AppConfigVars = { exclude_jetton_chart_periods: boolean; devmode_enabled: boolean; + signer_store_url: string; + signer_about_url: string; + tonkeeper_pro_url: string; notcoin_jetton_master: string; notcoin_nft_collection: string; @@ -99,7 +101,6 @@ const defaultConfig: Partial = { holdersService: 'https://card-dev.whales-api.com', tronapiHost: 'https://tron.tonkeeper.com', tronapiTestnetHost: 'https://testnet-tron.tonkeeper.com', - signerStoreUrl: 'https://play.google.com/store/apps/details?id=com.tonapps.signer', batteryHost: 'https://battery.tonkeeper.com', batteryTestnetHost: 'https://testnet-battery.tonkeeper.com', @@ -122,6 +123,9 @@ const defaultConfig: Partial = { exclude_jetton_chart_periods: true, devmode_enabled: false, + signer_store_url: 'https://play.google.com/store/apps/details?id=com.tonapps.signer', + signer_about_url: 'https://tonkeeper.com', + tonkeeper_pro_url: 'https://tonkeeper.com/pro', notcoin_jetton_master: '0:2f956143c461769579baef2e32cc2d7bc18283f40d20bb03e432cd603ac33ffc', diff --git a/packages/mobile/src/screens/PairSignerScreen/PairSignerScreen.tsx b/packages/mobile/src/screens/PairSignerScreen/PairSignerScreen.tsx index 4c7c0d1a3..3f673f660 100644 --- a/packages/mobile/src/screens/PairSignerScreen/PairSignerScreen.tsx +++ b/packages/mobile/src/screens/PairSignerScreen/PairSignerScreen.tsx @@ -21,7 +21,6 @@ import { check, PERMISSIONS, RESULTS, request } from 'react-native-permissions'; import { DarkTheme } from '@tonkeeper/uikit/src/styles/themes/dark'; import * as S from '../../core/ScanQR/ScanQR.style'; import { config } from '$config'; -import { useNestedAutoScroll } from '$uikit/DraggableFlashList/hooks/useNestedAutoScroll'; import { DeeplinkOrigin, useDeeplinking } from '$libs/deeplinking'; import { delay } from '@tonkeeper/core'; import { useIsFocused } from '@react-navigation/native'; @@ -66,11 +65,15 @@ export const PairSignerScreen: FC = () => { setFlashlightOn(!isFlashlightOn); }, [isFlashlightOn]); + const openAbout = useCallback(() => { + Linking.openURL(config.get('signer_about_url')).catch(null); + }, []); + const openSigner = useCallback(async () => { try { await Linking.openURL(SIGNER_SCHEME); } catch { - Linking.openURL(config.get('signerStoreUrl')).catch(useNestedAutoScroll); + Linking.openURL(config.get('signer_store_url')).catch(null); } }, []); @@ -201,7 +204,12 @@ export const PairSignerScreen: FC = () => { -