Skip to content

Commit

Permalink
merge develop
Browse files Browse the repository at this point in the history
  • Loading branch information
banklesss committed Oct 24, 2024
2 parents 28bbd8f + 1bb2adc commit f3d2c55
Show file tree
Hide file tree
Showing 66 changed files with 1,874 additions and 186 deletions.
2 changes: 2 additions & 0 deletions apps/wallet-mobile/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ dependencies {
exclude group:'com.squareup.okhttp3', module:'okhttp'
}

implementation project(':react-native-notifications')

debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}")
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down
1 change: 1 addition & 0 deletions apps/wallet-mobile/android/app/src/dev/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:tools="http://schemas.android.com/tools">

<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>

<application
android:usesCleartextTraffic="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" android:maxSdkVersion="30"/>
<uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"/>
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<application android:name=".MainApplication" android:label="@string/app_name" android:icon="@mipmap/ic_launcher" android:roundIcon="@mipmap/ic_launcher_round" android:allowBackup="false" android:theme="@style/BootTheme" android:networkSecurityConfig="@xml/network_security_config">
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode" android:launchMode="singleTask" android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait" android:exported="true">
<intent-filter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import android.content.res.Configuration;
import expo.modules.ApplicationLifecycleDispatcher;
import expo.modules.ReactNativeHostWrapper;
import com.wix.reactnativenotifications.RNNotificationsPackage;

import android.app.Application;
import com.facebook.react.PackageList;
Expand Down
5 changes: 4 additions & 1 deletion apps/wallet-mobile/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@ include ':app'
includeBuild('../../../node_modules/react-native-gradle-plugin')

apply from: new File(["node", "--print", "require.resolve('expo/package.json')"].execute(null, rootDir).text.trim(), "../scripts/autolinking.gradle")
useExpoModules()
useExpoModules()

include ':react-native-notifications'
project(':react-native-notifications').projectDir = new File(rootProject.projectDir, '../../../node_modules/@jamsinclair/react-native-notifications/lib/android/app')
5 changes: 5 additions & 0 deletions apps/wallet-mobile/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,10 @@
],
"sdkVersion": "48.0.0",
"entryPoint": ".vscode/exponentIndex.js"
},
"ios": {
"infoPlist": {
"UIBackgroundModes": ["fetch", "remote-notification"]
}
}
}
2 changes: 1 addition & 1 deletion apps/wallet-mobile/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ require File.join(File.dirname(`node --print "require.resolve('expo/package.json
require_relative '../../../node_modules/react-native/scripts/react_native_pods'
require_relative '../../../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '13.0'
platform :ios, '14.0'
prepare_react_native_project!

# If you are using a `react-native-flipper` your iOS build will fail when `NO_FLIPPER=1` is set.
Expand Down
30 changes: 27 additions & 3 deletions apps/wallet-mobile/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ PODS:
- React-Core
- Expo (48.0.20):
- ExpoModulesCore
- ExpoBackgroundFetch (11.8.1):
- ExpoModulesCore
- ExpoBlur (12.9.2):
- ExpoModulesCore
- ExpoDevice (5.4.0):
Expand All @@ -43,6 +45,9 @@ PODS:
- ReactCommon/turbomodule/core
- ExpoSystemUI (2.2.1):
- ExpoModulesCore
- EXTaskManager (11.7.3):
- ExpoModulesCore
- UMAppLoader
- FBLazyVector (0.71.14)
- FBReactNativeSpec (0.71.14):
- RCT-Folly (= 2021.07.22.00)
Expand Down Expand Up @@ -354,13 +359,15 @@ PODS:
- react-native-config/App (= 1.5.1)
- react-native-config/App (1.5.1):
- React-Core
- react-native-haskell-shelley (6.1.0-beta.1):
- react-native-haskell-shelley (7.1.0):
- React
- react-native-message_signing-library (1.0.4):
- React
- react-native-mmkv (2.11.0):
- MMKV (>= 1.2.13)
- React-Core
- react-native-notifications (5.1.1):
- React-Core
- react-native-pager-view (6.2.0):
- React-Core
- react-native-quick-base64 (2.0.6):
Expand Down Expand Up @@ -537,6 +544,7 @@ PODS:
- Sentry/HybridSDK (8.9.3):
- SentryPrivate (= 8.9.3)
- SentryPrivate (8.9.3)
- UMAppLoader (4.5.1)
- Yoga (1.14.0)
- ZXingObjC/Core (3.6.9)
- ZXingObjC/OneD (3.6.9):
Expand All @@ -557,12 +565,14 @@ DEPENDENCIES:
- EXFont (from `../../../node_modules/expo-font/ios`)
- EXImageLoader (from `../../../node_modules/expo-image-loader/ios`)
- Expo (from `../../../node_modules/expo`)
- ExpoBackgroundFetch (from `../../../node_modules/expo-background-fetch/ios`)
- ExpoBlur (from `../../../node_modules/expo-blur/ios`)
- ExpoDevice (from `../../../node_modules/expo-device/ios`)
- ExpoImage (from `../../../node_modules/expo-image/ios`)
- ExpoKeepAwake (from `../../../node_modules/expo-keep-awake/ios`)
- ExpoModulesCore (from `../../../node_modules/expo-modules-core`)
- ExpoSystemUI (from `../../../node_modules/expo-system-ui/ios`)
- EXTaskManager (from `../../../node_modules/expo-task-manager/ios`)
- FBLazyVector (from `../../../node_modules/react-native/Libraries/FBLazyVector`)
- FBReactNativeSpec (from `../../../node_modules/react-native/React/FBReactNativeSpec`)
- glog (from `../../../node_modules/react-native/third-party-podspecs/glog.podspec`)
Expand Down Expand Up @@ -595,6 +605,7 @@ DEPENDENCIES:
- "react-native-haskell-shelley (from `../../../node_modules/@emurgo/csl-mobile-bridge`)"
- "react-native-message_signing-library (from `../../../node_modules/@emurgo/msl-mobile-bridge`)"
- react-native-mmkv (from `../../../node_modules/react-native-mmkv`)
- "react-native-notifications (from `../../../node_modules/@jamsinclair/react-native-notifications`)"
- react-native-pager-view (from `../../../node_modules/react-native-pager-view`)
- react-native-quick-base64 (from `../../../node_modules/react-native-quick-base64`)
- react-native-randombytes (from `../../../node_modules/react-native-randombytes`)
Expand Down Expand Up @@ -632,6 +643,7 @@ DEPENDENCIES:
- "RNSentry (from `../../../node_modules/@sentry/react-native`)"
- RNShare (from `../../../node_modules/react-native-share`)
- RNSVG (from `../../../node_modules/react-native-svg`)
- UMAppLoader (from `../../../node_modules/unimodules-app-loader/ios`)
- Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`)

SPEC REPOS:
Expand Down Expand Up @@ -678,6 +690,8 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/expo-image-loader/ios"
Expo:
:path: "../../../node_modules/expo"
ExpoBackgroundFetch:
:path: "../../../node_modules/expo-background-fetch/ios"
ExpoBlur:
:path: "../../../node_modules/expo-blur/ios"
ExpoDevice:
Expand All @@ -690,6 +704,8 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/expo-modules-core"
ExpoSystemUI:
:path: "../../../node_modules/expo-system-ui/ios"
EXTaskManager:
:path: "../../../node_modules/expo-task-manager/ios"
FBLazyVector:
:path: "../../../node_modules/react-native/Libraries/FBLazyVector"
FBReactNativeSpec:
Expand Down Expand Up @@ -750,6 +766,8 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/@emurgo/msl-mobile-bridge"
react-native-mmkv:
:path: "../../../node_modules/react-native-mmkv"
react-native-notifications:
:path: "../../../node_modules/@jamsinclair/react-native-notifications"
react-native-pager-view:
:path: "../../../node_modules/react-native-pager-view"
react-native-quick-base64:
Expand Down Expand Up @@ -824,6 +842,8 @@ EXTERNAL SOURCES:
:path: "../../../node_modules/react-native-share"
RNSVG:
:path: "../../../node_modules/react-native-svg"
UMAppLoader:
:path: "../../../node_modules/unimodules-app-loader/ios"
Yoga:
:path: "../../../node_modules/react-native/ReactCommon/yoga"

Expand All @@ -840,12 +860,14 @@ SPEC CHECKSUMS:
EXFont: 6ea3800df746be7233208d80fe379b8ed74f4272
EXImageLoader: fd053169a8ee932dd83bf1fe5487a50c26d27c2b
Expo: b7d2843b0a0027d0ce76121a63085764355a16ed
ExpoBackgroundFetch: 80d41ec15c6cce0bafb5d2326b8e85f42152eba7
ExpoBlur: e832d874bd94afc0645daddbd3162ec1ce172080
ExpoDevice: 1c1b0c9cad96c292c1de73948649cfd654b2b3c0
ExpoImage: bf714e0101812ccbbd1a4fdbfd34905feeefd9f5
ExpoKeepAwake: 69f5f627670d62318410392d03e0b5db0f85759a
ExpoModulesCore: 653958063a301098b541ae4dfed1ac0b98db607b
ExpoSystemUI: 0be5173ee2a7c01e9abc44f56d879a1eaaa16527
EXTaskManager: 07d427a5213dd275c13b6b6c07bba35a672e6698
FBLazyVector: 12ea01e587c9594e7b144e1bfc86ac4d9ac28fde
FBReactNativeSpec: faca7d16c37626ca5780a87adef703817722fe61
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
Expand Down Expand Up @@ -882,9 +904,10 @@ SPEC CHECKSUMS:
react-native-background-timer: 17ea5e06803401a379ebf1f20505b793ac44d0fe
react-native-ble-plx: f10240444452dfb2d2a13a0e4f58d7783e92d76e
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
react-native-haskell-shelley: f3eaa102ff7b60063a4aff8bd36d23cb4de49c2e
react-native-haskell-shelley: d69d9b9a7122067b9ee36b76c78c6436d4fc1aba
react-native-message_signing-library: 040317fed382be05d79e2ecbe5852d1a20ce68df
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
react-native-notifications: 985b8e492eeceeaf697aa3f08a1ad30b76a21d9f
react-native-pager-view: 0ccb8bf60e2ebd38b1f3669fa3650ecce81db2df
react-native-quick-base64: 62290829c619fbabca4c41cfec75ae759d08fc1c
react-native-randombytes: b6677f7d495c27e9ee0dbd77ebc97b3c59173729
Expand Down Expand Up @@ -928,9 +951,10 @@ SPEC CHECKSUMS:
SDWebImageWebPCoder: 295a6573c512f54ad2dd58098e64e17dcf008499
Sentry: 97161cac725da1ecbe77d1445bf8a61c1e5667f1
SentryPrivate: 9a76def09fb08f9501997b8df946e8097947b94f
UMAppLoader: 79d3ee6aa2447a1fe2e8b0d07acf2de106e55b58
Yoga: e71803b4c1fff832ccf9b92541e00f9b873119b9
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5

PODFILE CHECKSUM: 31f344d67f1a9c35e34eb202e3cdfeb4907367e8
PODFILE CHECKSUM: 09a3c8236b8655c1bc6f4dd9d56c009f5bdf0939

COCOAPODS: 1.15.2
2 changes: 2 additions & 0 deletions apps/wallet-mobile/ios/yoroi.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -846,6 +846,7 @@
ENVFILE = "$(PODS_ROOT)/../../.env";
INFOPLIST_FILE = yoroi/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Yoroi;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -890,6 +891,7 @@
ENVFILE = "$(PODS_ROOT)/../../.env.production";
INFOPLIST_FILE = yoroi/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = Yoroi;
IPHONEOS_DEPLOYMENT_TARGET = 15.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
15 changes: 15 additions & 0 deletions apps/wallet-mobile/ios/yoroi/AppDelegate.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#import <React/RCTLinkingManager.h>
#import "AppDelegate.h"
#import "RNBootSplash.h"
#import "RNNotifications.h"

#import <React/RCTBundleURLProvider.h>

Expand All @@ -16,6 +17,7 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
// react-native-bootsplash
UIView *rootView = self.window.rootViewController.view;
[RNBootSplash initWithStoryboard:@"BootSplash" rootView:rootView];
[RNNotifications startMonitorNotifications];

return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
Expand Down Expand Up @@ -53,4 +55,17 @@ - (BOOL)application:(UIApplication *)application continueUserActivity:(nonnull N
continueUserActivity:userActivity
restorationHandler:restorationHandler];
}

- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[RNNotifications didRegisterForRemoteNotificationsWithDeviceToken:deviceToken];
}

- (void)application:(UIApplication *)application didFailToRegisterForRemoteNotificationsWithError:(NSError *)error {
[RNNotifications didFailToRegisterForRemoteNotificationsWithError:error];
}

- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo fetchCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler {
[RNNotifications didReceiveBackgroundNotification:userInfo withCompletionHandler:completionHandler];
}

@end
4 changes: 4 additions & 0 deletions apps/wallet-mobile/ios/yoroi/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -107,5 +107,9 @@
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>UIBackgroundModes</key>
<array>
<string>fetch</string>
</array>
</dict>
</plist>
16 changes: 10 additions & 6 deletions apps/wallet-mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,20 +95,21 @@
"@cardano-foundation/ledgerjs-hw-app-cardano": "^7.1.3",
"@emurgo/cip14-js": "^3.0.1",
"@emurgo/cip4-js": "1.0.7",
"@emurgo/cross-csl-core": "^5.1.0-beta.1",
"@emurgo/cross-csl-mobile": "^5.1.0-beta.1",
"@emurgo/cross-csl-core": "^6.1.0",
"@emurgo/cross-csl-mobile": "^6.1.0",
"@emurgo/cross-msl-mobile": "^1.0.1",
"@emurgo/csl-mobile-bridge": "6.1.0-beta.1",
"@emurgo/csl-mobile-bridge": "^7.1.0",
"@emurgo/msl-mobile-bridge": "^1.0.4",
"@emurgo/react-native-hid": "5.15.8",
"@emurgo/yoroi-lib": "^1.2.1",
"@emurgo/yoroi-lib": "^2.0.0",
"@formatjs/intl-datetimeformat": "^6.7.0",
"@formatjs/intl-getcanonicallocales": "^2.1.0",
"@formatjs/intl-locale": "^3.2.1",
"@formatjs/intl-numberformat": "^8.4.1",
"@formatjs/intl-pluralrules": "^5.2.1",
"@formatjs/intl-relativetimeformat": "^11.2.1",
"@gorhom/bottom-sheet": "^4",
"@jamsinclair/react-native-notifications": "^5.1.1",
"@ledgerhq/react-native-hw-transport-ble": "6.27.3",
"@react-native-async-storage/async-storage": "^1.19.3",
"@react-native-community/clipboard": "^1.5.1",
Expand All @@ -131,6 +132,7 @@
"@yoroi/explorers": "^1.0.2",
"@yoroi/identicon": "^1.0.1",
"@yoroi/links": "^1.5.7",
"@yoroi/notifications": "^1.0.0",
"@yoroi/portfolio": "1.0.3",
"@yoroi/resolver": "^2.0.6",
"@yoroi/setup-wallet": "^1.0.1",
Expand All @@ -153,13 +155,15 @@
"crypto-random-string": "3.3.0",
"d3-shape": "^3.2.0",
"expo": ">=48.0.0-0 <49.0.0",
"expo-background-fetch": "^11.8.1",
"expo-barcode-scanner": "~12.3.2",
"expo-blur": "12.9.2",
"expo-camera": "^13.2.1",
"expo-device": "^5.4.0",
"expo-image": "1.3.0",
"expo-status-bar": "~1.4.4",
"expo-system-ui": "~2.2.1",
"expo-task-manager": "11.7.3",
"immer": "^10.0.2",
"jsc-android": "241213.1.0",
"lodash": "^4.17.21",
Expand Down Expand Up @@ -224,8 +228,8 @@
"@babel/preset-env": "^7.20.0",
"@babel/preset-react": "^7.16.7",
"@babel/runtime": "^7.20.0",
"@emurgo/cardano-serialization-lib-nodejs": "~12.1.0-beta.1",
"@emurgo/cross-csl-nodejs": "^5.1.0-beta.1",
"@emurgo/cardano-serialization-lib-nodejs": "^13.1.0",
"@emurgo/cross-csl-nodejs": "^6.1.0",
"@emurgo/cross-msl-nodejs": "^1.0.0",
"@formatjs/cli": "^6.1.0",
"@formatjs/ts-transformer": "^3.13.0",
Expand Down
6 changes: 6 additions & 0 deletions apps/wallet-mobile/src/AppNavigator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ import {
useShowDarkThemeAnnouncementScreen,
} from './features/Initialization/DarkThemeAnnouncement/DarkThemeAnnouncement'
import {useDeepLinkWatcher} from './features/Links/common/useDeepLinkWatcher'
import {useInitNotifications} from './features/Notifications/useCases/common/hooks'
import {NotificationsDevScreen} from './features/Notifications/useCases/NotificationsDevScreen'
import {SearchProvider} from './features/Search/SearchContext'
import {SetupWalletNavigator} from './features/SetupWallet/SetupWalletNavigator'
import {useHasWallets} from './features/WalletManager/common/hooks/useHasWallets'
import {useStatusBar} from './hooks/useStatusBar'
import {agreementDate} from './kernel/config'
import {features} from './kernel/features'
import {AppRoutes, defaultStackNavigationOptions} from './kernel/navigation'
import {WalletNavigator} from './WalletNavigator'

Expand All @@ -45,6 +48,7 @@ const navRef = React.createRef<NavigationContainerRef<ReactNavigation.RootParamL
const prefixes = [...supportedPrefixes]

export const AppNavigator = () => {
useInitNotifications({enabled: features.notifications})
useDeepLinkWatcher()
const strings = useStrings()
const [routeName, setRouteName] = React.useState<string>()
Expand Down Expand Up @@ -203,6 +207,8 @@ export const AppNavigator = () => {
<Stack.Screen name="storybook" component={StorybookScreen} />

<Stack.Screen name="playground" component={Playground} />

<Stack.Screen name="notifications" component={NotificationsDevScreen} />
</Stack.Group>
)}
</Stack.Navigator>
Expand Down
Loading

0 comments on commit f3d2c55

Please sign in to comment.