From 44038ba95b61f9339b8536d3f0dceaf2778fb38c Mon Sep 17 00:00:00 2001 From: Thuc Nguyen Duy Date: Sat, 13 Jan 2024 09:17:40 +0700 Subject: [PATCH] [issue-1346] Add banner in token detail --- ios/Podfile.lock | 388 +++++++++--------- src/hooks/campaign/useGetBannerByScreen.ts | 6 +- .../Crowdloans/CampaignBannerModal/index.tsx | 4 +- src/screens/Home/Crypto/TokenGroupsDetail.tsx | 92 ++++- src/utils/storage.ts | 25 +- 5 files changed, 313 insertions(+), 202 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index bdf084bef..df14ed77d 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -10,14 +10,14 @@ PODS: - React-Core - SSZipArchive (~> 2.2.2) - DoubleConversion (1.1.6) - - FBLazyVector (0.72.7) - - FBReactNativeSpec (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTRequired (= 0.72.7) - - RCTTypeSafety (= 0.72.7) - - React-Core (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) + - FBLazyVector (0.72.9) + - FBReactNativeSpec (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - RCTRequired (= 0.72.9) + - RCTTypeSafety (= 0.72.9) + - React-Core (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) - Flipper (0.182.0): - Flipper-Folly (~> 2.6) - Flipper-Boost-iOSX (1.76.0.1.11) @@ -81,9 +81,9 @@ PODS: - GCDWebServer/Core (= 3.5.4) - GCDWebServer/Core (3.5.4) - glog (0.3.5) - - hermes-engine (0.72.7): - - hermes-engine/Pre-built (= 0.72.7) - - hermes-engine/Pre-built (0.72.7) + - hermes-engine (0.72.9): + - hermes-engine/Pre-built (= 0.72.9) + - hermes-engine/Pre-built (0.72.9) - JWT (3.0.0-beta.14): - Base64 (~> 1.1.2) - libevent (2.1.12) @@ -120,26 +120,26 @@ PODS: - fmt (~> 6.2.1) - glog - libevent - - RCTRequired (0.72.7) - - RCTTypeSafety (0.72.7): - - FBLazyVector (= 0.72.7) - - RCTRequired (= 0.72.7) - - React-Core (= 0.72.7) - - React (0.72.7): - - React-Core (= 0.72.7) - - React-Core/DevSupport (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) - - React-RCTActionSheet (= 0.72.7) - - React-RCTAnimation (= 0.72.7) - - React-RCTBlob (= 0.72.7) - - React-RCTImage (= 0.72.7) - - React-RCTLinking (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - React-RCTSettings (= 0.72.7) - - React-RCTText (= 0.72.7) - - React-RCTVibration (= 0.72.7) - - React-callinvoker (0.72.7) - - React-Codegen (0.72.7): + - RCTRequired (0.72.9) + - RCTTypeSafety (0.72.9): + - FBLazyVector (= 0.72.9) + - RCTRequired (= 0.72.9) + - React-Core (= 0.72.9) + - React (0.72.9): + - React-Core (= 0.72.9) + - React-Core/DevSupport (= 0.72.9) + - React-Core/RCTWebSocket (= 0.72.9) + - React-RCTActionSheet (= 0.72.9) + - React-RCTAnimation (= 0.72.9) + - React-RCTBlob (= 0.72.9) + - React-RCTImage (= 0.72.9) + - React-RCTLinking (= 0.72.9) + - React-RCTNetwork (= 0.72.9) + - React-RCTSettings (= 0.72.9) + - React-RCTText (= 0.72.9) + - React-RCTVibration (= 0.72.9) + - React-callinvoker (0.72.9) + - React-Codegen (0.72.9): - DoubleConversion - FBReactNativeSpec - glog @@ -154,11 +154,11 @@ PODS: - React-rncore - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-Core (0.72.7): + - React-Core (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) + - React-Core/Default (= 0.72.9) - React-cxxreact - React-hermes - React-jsi @@ -168,7 +168,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/CoreModulesHeaders (0.72.7): + - React-Core/CoreModulesHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -182,7 +182,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/Default (0.72.7): + - React-Core/Default (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -195,23 +195,23 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/DevSupport (0.72.7): + - React-Core/DevSupport (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) + - React-Core/Default (= 0.72.9) + - React-Core/RCTWebSocket (= 0.72.9) - React-cxxreact - React-hermes - React-jsi - React-jsiexecutor - - React-jsinspector (= 0.72.7) + - React-jsinspector (= 0.72.9) - React-perflogger - React-runtimeexecutor - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTActionSheetHeaders (0.72.7): + - React-Core/RCTActionSheetHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -225,7 +225,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTAnimationHeaders (0.72.7): + - React-Core/RCTAnimationHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -239,7 +239,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTBlobHeaders (0.72.7): + - React-Core/RCTBlobHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -253,7 +253,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTImageHeaders (0.72.7): + - React-Core/RCTImageHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -267,7 +267,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTLinkingHeaders (0.72.7): + - React-Core/RCTLinkingHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -281,7 +281,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTNetworkHeaders (0.72.7): + - React-Core/RCTNetworkHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -295,7 +295,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTSettingsHeaders (0.72.7): + - React-Core/RCTSettingsHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -309,7 +309,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTTextHeaders (0.72.7): + - React-Core/RCTTextHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -323,7 +323,7 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTVibrationHeaders (0.72.7): + - React-Core/RCTVibrationHeaders (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -337,11 +337,11 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-Core/RCTWebSocket (0.72.7): + - React-Core/RCTWebSocket (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Core/Default (= 0.72.7) + - React-Core/Default (= 0.72.9) - React-cxxreact - React-hermes - React-jsi @@ -351,57 +351,57 @@ PODS: - React-utils - SocketRocket (= 0.6.1) - Yoga - - React-CoreModules (0.72.7): + - React-CoreModules (0.72.9): - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/CoreModulesHeaders (= 0.72.7) - - React-jsi (= 0.72.7) + - RCTTypeSafety (= 0.72.9) + - React-Codegen (= 0.72.9) + - React-Core/CoreModulesHeaders (= 0.72.9) + - React-jsi (= 0.72.9) - React-RCTBlob - - React-RCTImage (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) + - React-RCTImage (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) - SocketRocket (= 0.6.1) - - React-cxxreact (0.72.7): + - React-cxxreact (0.72.9): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-debug (= 0.72.7) - - React-jsi (= 0.72.7) - - React-jsinspector (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-runtimeexecutor (= 0.72.7) - - React-debug (0.72.7) - - React-hermes (0.72.7): + - React-callinvoker (= 0.72.9) + - React-debug (= 0.72.9) + - React-jsi (= 0.72.9) + - React-jsinspector (= 0.72.9) + - React-logger (= 0.72.9) + - React-perflogger (= 0.72.9) + - React-runtimeexecutor (= 0.72.9) + - React-debug (0.72.9) + - React-hermes (0.72.9): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - RCT-Folly/Futures (= 2021.07.22.00) - - React-cxxreact (= 0.72.7) + - React-cxxreact (= 0.72.9) - React-jsi - - React-jsiexecutor (= 0.72.7) - - React-jsinspector (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-jsi (0.72.7): + - React-jsiexecutor (= 0.72.9) + - React-jsinspector (= 0.72.9) + - React-perflogger (= 0.72.9) + - React-jsi (0.72.9): - boost (= 1.76.0) - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-jsiexecutor (0.72.7): + - React-jsiexecutor (0.72.9): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-perflogger (= 0.72.7) - - React-jsinspector (0.72.7) - - React-logger (0.72.7): + - React-cxxreact (= 0.72.9) + - React-jsi (= 0.72.9) + - React-perflogger (= 0.72.9) + - React-jsinspector (0.72.9) + - React-logger (0.72.9): - glog - react-native-blur (4.3.2): - React-Core @@ -433,7 +433,9 @@ PODS: - react-native-pager-view (6.2.3): - RCT-Folly (= 2021.07.22.00) - React-Core - - react-native-safe-area-context (4.8.1): + - react-native-render-html (6.3.4): + - React-Core + - react-native-safe-area-context (4.8.2): - React-Core - react-native-segmented-control (2.2.2): - React-Core @@ -454,9 +456,10 @@ PODS: - React-Core - react-native-view-shot (3.8.0): - React-Core - - react-native-webview (13.6.3): + - react-native-webview (13.6.4): + - RCT-Folly (= 2021.07.22.00) - React-Core - - React-NativeModulesApple (0.72.7): + - React-NativeModulesApple (0.72.9): - hermes-engine - React-callinvoker - React-Core @@ -465,17 +468,17 @@ PODS: - React-runtimeexecutor - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - React-perflogger (0.72.7) - - React-RCTActionSheet (0.72.7): - - React-Core/RCTActionSheetHeaders (= 0.72.7) - - React-RCTAnimation (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTAnimationHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTAppDelegate (0.72.7): + - React-perflogger (0.72.9) + - React-RCTActionSheet (0.72.9): + - React-Core/RCTActionSheetHeaders (= 0.72.9) + - React-RCTAnimation (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.9) + - React-Codegen (= 0.72.9) + - React-Core/RCTAnimationHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTAppDelegate (0.72.9): - RCT-Folly - RCTRequired - RCTTypeSafety @@ -487,54 +490,54 @@ PODS: - React-RCTNetwork - React-runtimescheduler - ReactCommon/turbomodule/core - - React-RCTBlob (0.72.7): + - React-RCTBlob (0.72.9): - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.7) - - React-Core/RCTBlobHeaders (= 0.72.7) - - React-Core/RCTWebSocket (= 0.72.7) - - React-jsi (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTImage (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTImageHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - React-RCTNetwork (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTLinking (0.72.7): - - React-Codegen (= 0.72.7) - - React-Core/RCTLinkingHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTNetwork (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTNetworkHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTSettings (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - RCTTypeSafety (= 0.72.7) - - React-Codegen (= 0.72.7) - - React-Core/RCTSettingsHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-RCTText (0.72.7): - - React-Core/RCTTextHeaders (= 0.72.7) - - React-RCTVibration (0.72.7): - - RCT-Folly (= 2021.07.22.00) - - React-Codegen (= 0.72.7) - - React-Core/RCTVibrationHeaders (= 0.72.7) - - React-jsi (= 0.72.7) - - ReactCommon/turbomodule/core (= 0.72.7) - - React-rncore (0.72.7) - - React-runtimeexecutor (0.72.7): - - React-jsi (= 0.72.7) - - React-runtimescheduler (0.72.7): + - React-Codegen (= 0.72.9) + - React-Core/RCTBlobHeaders (= 0.72.9) + - React-Core/RCTWebSocket (= 0.72.9) + - React-jsi (= 0.72.9) + - React-RCTNetwork (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTImage (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.9) + - React-Codegen (= 0.72.9) + - React-Core/RCTImageHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - React-RCTNetwork (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTLinking (0.72.9): + - React-Codegen (= 0.72.9) + - React-Core/RCTLinkingHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTNetwork (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.9) + - React-Codegen (= 0.72.9) + - React-Core/RCTNetworkHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTSettings (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - RCTTypeSafety (= 0.72.9) + - React-Codegen (= 0.72.9) + - React-Core/RCTSettingsHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-RCTText (0.72.9): + - React-Core/RCTTextHeaders (= 0.72.9) + - React-RCTVibration (0.72.9): + - RCT-Folly (= 2021.07.22.00) + - React-Codegen (= 0.72.9) + - React-Core/RCTVibrationHeaders (= 0.72.9) + - React-jsi (= 0.72.9) + - ReactCommon/turbomodule/core (= 0.72.9) + - React-rncore (0.72.9) + - React-runtimeexecutor (0.72.9): + - React-jsi (= 0.72.9) + - React-runtimescheduler (0.72.9): - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) @@ -542,37 +545,37 @@ PODS: - React-debug - React-jsi - React-runtimeexecutor - - React-utils (0.72.7): + - React-utils (0.72.9): - glog - RCT-Folly (= 2021.07.22.00) - React-debug - - ReactCommon/turbomodule/bridging (0.72.7): + - ReactCommon/turbomodule/bridging (0.72.9): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) - - ReactCommon/turbomodule/core (0.72.7): + - React-callinvoker (= 0.72.9) + - React-cxxreact (= 0.72.9) + - React-jsi (= 0.72.9) + - React-logger (= 0.72.9) + - React-perflogger (= 0.72.9) + - ReactCommon/turbomodule/core (0.72.9): - DoubleConversion - glog - hermes-engine - RCT-Folly (= 2021.07.22.00) - - React-callinvoker (= 0.72.7) - - React-cxxreact (= 0.72.7) - - React-jsi (= 0.72.7) - - React-logger (= 0.72.7) - - React-perflogger (= 0.72.7) + - React-callinvoker (= 0.72.9) + - React-cxxreact (= 0.72.9) + - React-jsi (= 0.72.9) + - React-logger (= 0.72.9) + - React-perflogger (= 0.72.9) - ReactNativeLocalization (2.3.2): - React-Core - rn-fetch-blob (0.13.0-beta.2): - React-Core - RNCAsyncStorage (1.21.0): - React-Core - - RNCClipboard (1.13.1): + - RNCClipboard (1.13.2): - React-Core - RNCMaskedView (0.2.9): - React-Core @@ -681,6 +684,7 @@ DEPENDENCIES: - react-native-mmkv (from `../node_modules/react-native-mmkv`) - "react-native-netinfo (from `../node_modules/@react-native-community/netinfo`)" - react-native-pager-view (from `../node_modules/react-native-pager-view`) + - react-native-render-html (from `../node_modules/react-native-render-html`) - react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`) - "react-native-segmented-control (from `../node_modules/@react-native-community/segmented-control`)" - react-native-sensitive-info (from `../node_modules/react-native-sensitive-info`) @@ -770,7 +774,6 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" hermes-engine: :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" - :tag: hermes-2023-08-07-RNv0.72.4-813b2def12bc9df02654b3e3653ae4a68d0572e0 RCT-Folly: :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTRequired: @@ -821,6 +824,8 @@ EXTERNAL SOURCES: :path: "../node_modules/@react-native-community/netinfo" react-native-pager-view: :path: "../node_modules/react-native-pager-view" + react-native-render-html: + :path: "../node_modules/react-native-render-html" react-native-safe-area-context: :path: "../node_modules/react-native-safe-area-context" react-native-segmented-control: @@ -917,8 +922,8 @@ SPEC CHECKSUMS: CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99 CodePush: c3fdecab0dba1f760a1c6d1a562b9b88ce311fe1 DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 - FBLazyVector: 5fbbff1d7734827299274638deb8ba3024f6c597 - FBReactNativeSpec: 638095fe8a01506634d77b260ef8a322019ac671 + FBLazyVector: dc178b8748748c036ef9493a5d59d6d1f91a36ce + FBReactNativeSpec: d0aaae78e93c89dc2d691d8052a4d2aeb1b461ee Flipper: 6edb735e6c3e332975d1b17956bcc584eccf5818 Flipper-Boost-iOSX: fd1e2b8cbef7e662a122412d7ac5f5bea715403c Flipper-DoubleConversion: 2dc99b02f658daf147069aad9dbd29d8feb06d30 @@ -930,7 +935,7 @@ SPEC CHECKSUMS: fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 GCDWebServer: 2c156a56c8226e2d5c0c3f208a3621ccffbe3ce4 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - hermes-engine: 9180d43df05c1ed658a87cc733dc3044cf90c00a + hermes-engine: 9b9bb14184a11b8ceb4131b09abf634880f0f46d JWT: ef71dfb03e1f842081e64dc42eef0e164f35d251 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 1786c9f4ff8a279e4dac1e8f385004d5fc253009 @@ -938,20 +943,20 @@ SPEC CHECKSUMS: MMKVCore: e50135dbd33235b6ab390635991bab437ab873c0 OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1 - RCTRequired: 83bca1c184feb4d2e51c72c8369b83d641443f95 - RCTTypeSafety: 13c4a87a16d7db6cd66006ce9759f073402ef85b - React: e67aa9f99957c7611c392b5e49355d877d6525e2 - React-callinvoker: 2790c09d964c2e5404b5410cde91b152e3746b7b - React-Codegen: e6e05e105ca7cdb990f4d609985a2a689d8d0653 - React-Core: 9283f1e7d0d5e3d33ad298547547b1b43912534c - React-CoreModules: 6312c9b2fec4329d9ae6a2b8c350032d1664c51b - React-cxxreact: 7da72565656c8ac7f97c9a031d0b199bbdec0640 - React-debug: 4accb2b9dc09b575206d2c42f4082990a52ae436 - React-hermes: 1299a94f255f59a72d5baa54a2ca2e1eee104947 - React-jsi: 2208de64c3a41714ac04e86975386fc49116ea13 - React-jsiexecutor: c49502e5d02112247ee4526bc3ccfc891ae3eb9b - React-jsinspector: 8baadae51f01d867c3921213a25ab78ab4fbcd91 - React-logger: 8edc785c47c8686c7962199a307015e2ce9a0e4f + RCTRequired: f30c3213569b1dc43659ecc549a6536e1e11139e + RCTTypeSafety: e1ed3137728804fa98bce30b70e3da0b8e23054e + React: 54070abee263d5773486987f1cf3a3616710ed52 + React-callinvoker: 794ea19cc4d8ce25921893141e131b9d6b7d02eb + React-Codegen: 10359be5377b1a652839bcfe7b6b5bd7f73ae9f6 + React-Core: 7e2a9c4594083ecc68b91fc4a3f4d567e8c8b3b3 + React-CoreModules: 87cc386c2200862672b76bb02c4574b4b1d11b3c + React-cxxreact: 1100498800597e812f0ce4ec365f4ea47ac39719 + React-debug: 4dca41301a67ab2916b2c99bef60344a7b653ac5 + React-hermes: b871a77ba1c427ca00f075759dc0cc9670484c94 + React-jsi: 1f8d073a00264c6a701c4b7b4f4ef9946f9b2455 + React-jsiexecutor: 5a169b1dd1abad06bed40ab7e1aca883c657d865 + React-jsinspector: 54205b269da20c51417e0fc02c4cde9f29a4bf1a + React-logger: f42d2f2bc4cbb5d19d7c0ce84b8741b1e54e88c8 react-native-blur: cfdad7b3c01d725ab62a8a729f42ea463998afa2 react-native-camera: 3eae183c1d111103963f3dd913b65d01aef8110f react-native-cameraroll: 4701ae7c3dbcd3f5e9e150ca17f250a276154b35 @@ -962,7 +967,8 @@ SPEC CHECKSUMS: react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43 react-native-netinfo: 48c5f79a84fbc3ba1d28a8b0d04adeda72885fa8 react-native-pager-view: e26d35e382d86950c936f8917e3beb9188115ccc - react-native-safe-area-context: cd1169d797a2ef722a00bfc5af10748d5b6c94f9 + react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe + react-native-safe-area-context: 0ee144a6170530ccc37a0fd9388e28d06f516a89 react-native-segmented-control: 65df6cd0619b780b3843d574a72d4c7cec396097 react-native-sensitive-info: d44e909d065f9c0e15734245e5dd6a24b82e3dcd react-native-slider: cc89964e1432fa31aa9db7a0fa9b21e26b5d5152 @@ -970,28 +976,28 @@ SPEC CHECKSUMS: react-native-static-server: 201b2a945a35096be3ae7f43e367c65bcbd61343 react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253 react-native-view-shot: 6b7ed61d77d88580fed10954d45fad0eb2d47688 - react-native-webview: 88293a0f23eca8465c0433c023ec632930e644d0 - React-NativeModulesApple: b6868ee904013a7923128892ee4a032498a1024a - React-perflogger: 31ea61077185eb1428baf60c0db6e2886f141a5a - React-RCTActionSheet: 392090a3abc8992eb269ef0eaa561750588fc39d - React-RCTAnimation: 4b3cc6a29474bc0d78c4f04b52ab59bf760e8a9b - React-RCTAppDelegate: 89b015b29885109addcabecdf3b2e833905437c7 - React-RCTBlob: 3e23dcbe6638897b5605e46d0d62955d78e8d27b - React-RCTImage: 8a5d339d614a90a183fc1b8b6a7eb44e2e703943 - React-RCTLinking: b37dfbf646d77c326f9eae094b1fcd575b1c24c7 - React-RCTNetwork: 8bed9b2461c7d8a7d14e63df9b16181c448beebc - React-RCTSettings: 506a5f09a455123a8873801b70aa7b4010b76b01 - React-RCTText: 3c71ecaad8ee010b79632ea2590f86c02f5cce17 - React-RCTVibration: d1b78ca38f61ea4b3e9ebb2ddbd0b5662631d99b - React-rncore: bfc2f6568b6fecbae6f2f774e95c60c3c9e95bf2 - React-runtimeexecutor: 47b0a2d5bbb416db65ef881a6f7bdcfefa0001ab - React-runtimescheduler: 7649c3b46c8dee1853691ecf60146a16ae59253c - React-utils: 56838edeaaf651220d1e53cd0b8934fb8ce68415 - ReactCommon: 5f704096ccf7733b390f59043b6fa9cc180ee4f6 + react-native-webview: 107961c73db53d66549c867a3b64eaa20d34c41f + React-NativeModulesApple: 9f72feb8a04020b32417f768a7e1e40eec91fef4 + React-perflogger: cb433f318c6667060fc1f62e26eb58d6eb30a627 + React-RCTActionSheet: 0af3f8ac067e8a1dde902810b7ad169d0a0ec31e + React-RCTAnimation: 453a88e76ba6cb49819686acd8b21ce4d9ee4232 + React-RCTAppDelegate: b9fb07959f227ddd2c458c42ed5ceacbd1e1e367 + React-RCTBlob: fa513d56cdc2b7ad84a7758afc4863c1edd6a8b1 + React-RCTImage: 8e059fbdfab18b86127424dc3742532aab960760 + React-RCTLinking: 05ae2aa525b21a7f1c5069c14330700f470efd97 + React-RCTNetwork: 7ed9d99d028c53e9a23e318f65937f499ba8a6fd + React-RCTSettings: 8b12ebf04d4baa0e259017fcef6cf7abd7d8ac51 + React-RCTText: a062ade9ff1591c46bcb6c5055fd4f96c154b8aa + React-RCTVibration: 87c490b6f01746ab8f9b4e555f514cc030c06731 + React-rncore: 140bc11b316da7003bf039844aef39e1c242d7ad + React-runtimeexecutor: 226ebef5f625878d3028b196cbecbbdeb6f208e4 + React-runtimescheduler: a7b1442e155c6f131d8bdfaac47abdc303f50788 + React-utils: a3ffbc321572ee91911d7bc30965abe9aa4e16af + ReactCommon: 180205f326d59f52e12fa724f5278fcf8fb6afc3 ReactNativeLocalization: fb171138cdc80d5d0d4f20243d2fc82c2b3cc48f rn-fetch-blob: d469adb2e1d17f9d02ceb2b7bdd35ae5bd5db66b RNCAsyncStorage: 618d03a5f52fbccb3d7010076bc54712844c18ef - RNCClipboard: 90e241893de33a2f5962fc34d76ada4576033e49 + RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d RNCMaskedView: 949696f25ec596bfc697fc88e6f95cf0c79669b6 RNDeviceInfo: db5c64a060e66e5db3102d041ebe3ef307a85120 RNFastImage: 5c9c9fed9c076e521b3f509fe79e790418a544e8 @@ -1009,7 +1015,7 @@ SPEC CHECKSUMS: SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d SocketRocket: f32cd54efbe0f095c4d7594881e52619cfe80b17 SSZipArchive: 62d4947b08730e4cda640473b0066d209ff033c9 - Yoga: 4c3aa327e4a6a23eeacd71f61c81df1bcdf677d5 + Yoga: eddf2bbe4a896454c248a8f23b4355891eb720a6 YogaKit: f782866e155069a2cca2517aafea43200b01fd5a ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb diff --git a/src/hooks/campaign/useGetBannerByScreen.ts b/src/hooks/campaign/useGetBannerByScreen.ts index 26dc8bae0..32d295ae7 100644 --- a/src/hooks/campaign/useGetBannerByScreen.ts +++ b/src/hooks/campaign/useGetBannerByScreen.ts @@ -4,17 +4,17 @@ import { RootState } from 'stores/index'; import { useSelector } from 'react-redux'; import { getBannerSlugs } from 'utils/storage'; -const bannerSlugs = getBannerSlugs(); const useGetBannerByScreen = (screen: string) => { + const bannerSlugs = getBannerSlugs(); const { banners } = useSelector((state: RootState) => state.campaign); return useMemo(() => { - if (banners.length > 0 && bannerSlugs?.includes(banners[0].slug)) { + if (banners.length > 0 && bannerSlugs?.includes(banners[0].slug) && screen === 'home') { return []; } return banners.filter(item => item.data.position.includes(screen)); - }, [banners, screen]); + }, [bannerSlugs, banners, screen]); }; export default useGetBannerByScreen; diff --git a/src/screens/Home/Crowdloans/CampaignBannerModal/index.tsx b/src/screens/Home/Crowdloans/CampaignBannerModal/index.tsx index bc1a45cee..b9e14d76c 100644 --- a/src/screens/Home/Crowdloans/CampaignBannerModal/index.tsx +++ b/src/screens/Home/Crowdloans/CampaignBannerModal/index.tsx @@ -33,8 +33,8 @@ const CampaignBannerModal = ({ visible, banner, setVisible }: Props) => { completeBannerCampaign({ slug: banner.slug, }) - .then(() => setBannerSlugs(banner.slug)) - .catch(console.error); + .catch(console.error) + .finally(() => setBannerSlugs(banner.slug)); }, [banner.slug, setVisible]); const onPressBtn = (item: CampaignButton) => { diff --git a/src/screens/Home/Crypto/TokenGroupsDetail.tsx b/src/screens/Home/Crypto/TokenGroupsDetail.tsx index 5a6545322..3997f1dd7 100644 --- a/src/screens/Home/Crypto/TokenGroupsDetail.tsx +++ b/src/screens/Home/Crypto/TokenGroupsDetail.tsx @@ -1,5 +1,5 @@ import React, { useCallback, useMemo, useState } from 'react'; -import { ListRenderItemInfo, View } from 'react-native'; +import { Linking, ListRenderItemInfo, TouchableOpacity, View } from 'react-native'; import { CryptoNavigationProps, TokenGroupsDetailProps } from 'routes/home'; import { SwNumberProps } from 'components/design-system-ui/number'; import { TokenBalanceItemType } from 'types/balance'; @@ -22,6 +22,14 @@ import useAccountBalance from 'hooks/screen/useAccountBalance'; import { useToast } from 'react-native-toast-notifications'; import i18n from 'utils/i18n/i18n'; import { SelectAccAndTokenModal } from 'screens/Home/Crypto/shared/SelectAccAndTokenModal'; +import useGetBannerByScreen from 'hooks/campaign/useGetBannerByScreen'; +import FastImage from 'react-native-fast-image'; +import { BUTTON_ACTIVE_OPACITY } from 'constants/index'; +import { CampaignBanner } from '@subwallet/extension-base/background/KoniTypes'; +import { deeplinks } from 'utils/browser'; +import { Button, Icon } from 'components/design-system-ui'; +import { X } from 'phosphor-react-native'; +import { getHideBanner, setHideBanner, tokenDetailBannerKey } from 'utils/storage'; type CurrentSelectToken = { symbol: string; @@ -33,12 +41,16 @@ export const TokenGroupsDetail = ({ params: { slug: tokenGroupSlug }, }, }: TokenGroupsDetailProps) => { + const hiddenBanners = getHideBanner(tokenDetailBannerKey); const theme = useSubWalletTheme().swThemes; const navigation = useNavigation(); const [currentTokenInfo, setCurrentTokenInfo] = useState(undefined); const [tokenDetailVisible, setTokenDetailVisible] = useState(false); + const [isShowBanner, setIsShowBanner] = useState(true); const assetRegistryMap = useSelector((root: RootState) => root.assetRegistry.assetRegistry); const multiChainAssetMap = useSelector((state: RootState) => state.assetRegistry.multiChainAssetMap); + const banners = useGetBannerByScreen('token-details'); + const groupSymbol = useMemo(() => { if (tokenGroupSlug) { if (multiChainAssetMap[tokenGroupSlug]) { @@ -169,6 +181,83 @@ export const TokenGroupsDetail = ({ ); }, [onOpenReceive, _onOpenSendFund, tokenBalanceValue, onClickBack, groupSymbol, tokenGroupSlug, tokenGroupMap]); + const listFooter = useMemo(() => { + if (!banners || banners.length === 0) { + return; + } + + const openBanner = (url: string) => { + const isDeeplink = deeplinks.some(deeplink => url.startsWith(deeplink)); + if (isDeeplink) { + Linking.openURL(url); + return; + } + + const transformUrl = `subwallet://browser?url=${encodeURIComponent(url)}`; + Linking.openURL(transformUrl); + }; + + const onPressBanner = (item: CampaignBanner) => { + return () => { + if (item.data.action === 'open_url') { + const url = item.data.metadata?.url as string | undefined; + if (url) { + openBanner(url); + } + } + }; + }; + + return ( + <> + {banners.map(item => { + let allowedTokenSlug; + try { + allowedTokenSlug = JSON.parse(item.condition?.allowedTokenSlug); + } catch (error) { + allowedTokenSlug = null; + } + + if ( + !item.condition?.allowedTokenSlug || + (allowedTokenSlug.some((slug: string) => tokenGroupSlug.toLowerCase().includes(slug.toLowerCase())) && + !hiddenBanners?.includes(item.campaignId.toString())) + ) { + return ( + + +