Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

LL-8735 Discover Navigation #2160

Draft
wants to merge 13 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .babelrc

This file was deleted.

Binary file modified android/app/src/main/assets/fonts/Feather.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/Ionicons.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialCommunityIcons.ttf
Binary file not shown.
Binary file modified android/app/src/main/assets/fonts/MaterialIcons.ttf
Binary file not shown.
22 changes: 22 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
module.exports = {
presets: ["module:metro-react-native-babel-preset"],
plugins: [
[
"module-resolver",
{
root: ["./src"],
extensions: [
".ios.js",
".android.js",
".js",
".json",
".ts",
".tsx",
".ios.tsx",
".android.tsx",
],
},
],
"react-native-reanimated/plugin",
],
};
59 changes: 29 additions & 30 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PODS:
- CocoaAsyncSocket (7.6.5)
- djinni_objc (4.19.1)
- DoubleConversion (1.1.6)
- EXApplication (4.0.0):
- EXApplication (4.0.1):
- ExpoModulesCore
- EXBarCodeScanner (11.1.2):
- EXImageLoader
Expand All @@ -15,20 +15,20 @@ PODS:
- ExpoModulesCore
- EXConstants (12.1.3):
- ExpoModulesCore
- EXErrorRecovery (3.0.3):
- EXErrorRecovery (3.0.4):
- ExpoModulesCore
- EXFileSystem (13.0.3):
- ExpoModulesCore
- EXFont (10.0.3):
- EXFont (10.0.4):
- ExpoModulesCore
- EXImageLoader (3.0.0):
- ExpoModulesCore
- React-Core
- EXKeepAwake (10.0.0):
- EXKeepAwake (10.0.1):
- ExpoModulesCore
- Expo (43.0.1):
- Expo (43.0.4):
- ExpoModulesCore
- ExpoModulesCore (0.4.6):
- ExpoModulesCore (0.4.9):
- React-Core
- FBLazyVector (0.65.1)
- FBReactNativeSpec (0.65.1):
Expand Down Expand Up @@ -265,9 +265,9 @@ PODS:
- React
- react-native-locale (0.0.19):
- React
- react-native-netinfo (6.0.2):
- react-native-netinfo (6.2.1):
- React-Core
- react-native-pager-view (5.4.7):
- react-native-pager-view (5.4.9):
- React-Core
- react-native-randombytes (3.6.1):
- React-Core
Expand All @@ -284,7 +284,7 @@ PODS:
- React-Core
- react-native-version-number (0.3.6):
- React
- react-native-webview (11.14.0):
- react-native-webview (11.16.0):
- React-Core
- React-perflogger (0.65.1)
- React-RCTActionSheet (0.65.1):
Expand Down Expand Up @@ -374,7 +374,7 @@ PODS:
- React
- RNOS (1.2.6):
- React
- RNReanimated (2.2.2):
- RNReanimated (2.3.1):
- DoubleConversion
- FBLazyVector
- FBReactNativeSpec
Expand All @@ -400,15 +400,14 @@ PODS:
- React-RCTNetwork
- React-RCTSettings
- React-RCTText
- React-RCTVibration
- ReactCommon/turbomodule/core
- Yoga
- RNScreens (3.9.0):
- RNScreens (3.10.1):
- React-Core
- React-RCTImage
- RNSentry (3.1.1):
- RNSentry (3.2.10):
- React-Core
- Sentry (= 7.3.0)
- Sentry (= 7.7.0)
- RNShare (6.5.0):
- React-Core
- RNSVG (12.1.1):
Expand All @@ -421,9 +420,9 @@ PODS:
- SDWebImageWebPCoder (0.8.4):
- libwebp (~> 1.0)
- SDWebImage/Core (~> 5.10)
- Sentry (7.3.0):
- Sentry/Core (= 7.3.0)
- Sentry/Core (7.3.0)
- Sentry (7.7.0):
- Sentry/Core (= 7.7.0)
- Sentry/Core (7.7.0)
- TcpSockets (4.0.0):
- React
- Yoga (1.14.0)
Expand Down Expand Up @@ -681,17 +680,17 @@ SPEC CHECKSUMS:
CocoaAsyncSocket: 065fd1e645c7abab64f7a6a2007a48038fdc6a99
djinni_objc: 54ab066f337b37aceaba6d020b1e6964eead00ba
DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662
EXApplication: 0e15240e4d125b62f1cae48759ffbbd32b9286a6
EXApplication: bdc8dc27713235565da1029a34385229f31b8e08
EXBarCodeScanner: cc450529b9c5e02dd9e2498cc0dddf153f120dfe
EXCamera: 03d69135ceb6f5f18f37b63eddb63d7643b65c42
EXConstants: 6d585d93723b18d7a8c283591a335609e3bc153e
EXErrorRecovery: ac2622400a32be84604591f70d0efff416e4b9a2
EXErrorRecovery: deea88a01d38f8b1c1181b4e1d179b0ba0e4bb5b
EXFileSystem: 99aac7962c11c680681819dd9cbca24e20e5b1e7
EXFont: 2e1c6fe726d008a039db80df95f48b4921b7fe59
EXFont: 1fb13af43dc517c01c0ff21a6e32f9f9bf2ea602
EXImageLoader: 939451be6f7b731aaa6588920b90743f20121a4d
EXKeepAwake: 8aa32396a5972d26e75e538603aad0f032396503
Expo: cb542da0f7c8565a58231488066262f079eb1831
ExpoModulesCore: eea3472f70e921feb4dd24387662cbe0b67c9f8d
EXKeepAwake: b571c2ad8323b2fced6e907766e2549f75119471
Expo: 363a3f3c60d5a1d4f8badb29a869005487f2d9e4
ExpoModulesCore: e41ed0b72daeac74731816ad7997d639f0115a9d
FBLazyVector: 33c82491102f20ecddb6c6a2c273696ace3191e0
FBReactNativeSpec: df8f81d2a7541ee6755a047b398a5cb5a72acd0e
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
Expand All @@ -718,15 +717,15 @@ SPEC CHECKSUMS:
react-native-config: 72d948053a442779b3178fddd571e37f118ef606
react-native-fingerprint-scanner: ac6656f18c8e45a7459302b84da41a44ad96dbbe
react-native-locale: bd8edf0e51706d469af3e2fa568a8102213a3139
react-native-netinfo: 92e6e4476eb8bf6fc2d7c0a6ca0a1406f663d73a
react-native-pager-view: 741e7606ee2f6e399fc7da777f5519454a4b38c5
react-native-netinfo: 3d3769f0d65de15c83a9bf1346f8be71de5a24bf
react-native-pager-view: 3ee7d4c7697fb3ef788346e834a60cca97ed8540
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
react-native-safe-area-context: 584dc04881deb49474363f3be89e4ca0e854c057
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
react-native-text-input-mask: 36a546b378fadd2efe1b7484a859d34bc2c80395
react-native-udp: f0fbf5386c45af5523dc143a86afe2cbf29f764e
react-native-version-number: b415bbec6a13f2df62bf978e85bc0d699462f37f
react-native-webview: d70bc760daaa0e2667dec569b93014882565819c
react-native-webview: 28a8636d97ee641f2ee8f20492d7a6c269c1d703
React-perflogger: fd28ee1f2b5b150b00043f0301d96bd417fdc339
React-RCTActionSheet: 7f3fa0855c346aa5d7c60f9ced16e067db6d29fa
React-RCTAnimation: 2119a18ee26159004b001bc56404ca5dbaae6077
Expand All @@ -749,15 +748,15 @@ SPEC CHECKSUMS:
RNKeychain: f75b8c8b2f17d3b2aa1f25b4a0ac5b83d947ff8f
RNLibLedgerCore: 6d8a54abc2dc2ffa38c33fbb70d5247b97a0091e
RNOS: 6f2f9a70895bbbfbdad7196abd952e7b01d45027
RNReanimated: ad24db8af24e3fe1b5c462785bc3db8d5baae2ee
RNScreens: 4d79118be80f79fa1f4aa131909a1d6e86280af3
RNSentry: 49abc89b0190b4c8afe0fa5d065f98e36cb53233
RNReanimated: 629fedd82e9f6b9138421caa342f0a5ebd711cbe
RNScreens: 522705f2e5c9d27efb17f24aceb2bf8335bc7b8e
RNSentry: 04bb48bfdd435f5b218cf363f89e6419e9a2460c
RNShare: 047d42214f875d731bde73a2b67418638af85ad9
RNSVG: 551acb6562324b1d52a4e0758f7ca0ec234e278f
RNVectorIcons: 31cebfcf94e8cf8686eb5303ae0357da64d7a5a4
SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d
SDWebImageWebPCoder: f93010f3f6c031e2f8fb3081ca4ee6966c539815
Sentry: 9a4e621430e2dae4477d791f2f7e905720b6efbf
Sentry: e58e062056a061ae1145e22ad3dff6e506bff177
TcpSockets: 4ef55305239923b343ed0a378b1fac188b1373b0
Yoga: aa0cb45287ebe1004c02a13f279c55a95f1572f4
ZXingObjC: fdbb269f25dd2032da343e06f10224d62f537bdb
Expand Down
8 changes: 8 additions & 0 deletions ios/ledgerlivemobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@
2372D3D5180104DBED4E22EE /* libPods-ledgerlivemobile.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 31C4672E151A9F9D4A18DB00 /* libPods-ledgerlivemobile.a */; };
2A2FAB56B85E5D2BFF574A32 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 09BC9C5402323A57C5327727 /* ExpoModulesProvider.swift */; };
3407D5D9215D2AB800C9D40B /* NeededForBLE.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3407D5D8215D2AB800C9D40B /* NeededForBLE.swift */; };
4C949EE1F3844B259014064F /* Inter-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = D62898F7405B4A6996BEBC33 /* Inter-Medium.otf */; };
7930A1FF82816135F015ED1B /* libPods-ledgerlivemobileTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 854A3B027231E885CAD3722D /* libPods-ledgerlivemobileTests.a */; };
9B7ACA23F80A40489C69872B /* libRNAnalytics.a in Frameworks */ = {isa = PBXBuildFile; fileRef = EEF3655E56C24042B39DF4D3 /* libRNAnalytics.a */; };
AD6EE26071FA4673B5C89936 /* FontAwesome5_Pro_Brands.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 4BD106EA37CA467F9525D699 /* FontAwesome5_Pro_Brands.ttf */; };
AD7A77B84DF3487C812B091B /* FontAwesome5_Pro_Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 668E26194DD94B6D8F10D450 /* FontAwesome5_Pro_Regular.ttf */; };
B116B48438CB416C980DD0E7 /* Inter-SemiBold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F3993D7FF61549FE9270BC06 /* Inter-SemiBold.otf */; };
BC25CCBE6BEA4D62BE203C17 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 5F63C9E4AC284203A95B417E /* libz.tbd */; };
C7EBD81E6F2D4BEDB8C1F102 /* HMAlphaMono-Medium.otf in Resources */ = {isa = PBXBuildFile; fileRef = 20D0E84F30514AE5AF98A523 /* HMAlphaMono-Medium.otf */; };
CB46822924B04E80814C603E /* libPasscodeAuth.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 976AEE7A15C2428DB85E53B3 /* libPasscodeAuth.a */; };
D93C63AD261B4E7183B66B1C /* Inter-Regular.otf in Resources */ = {isa = PBXBuildFile; fileRef = 4C2397DC873B4F8E91B750A8 /* Inter-Regular.otf */; };
E466275BA70845F3AFE1D695 /* Inter-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = D91EB0620BDE4709B6F44620 /* Inter-Bold.otf */; };
Expand Down Expand Up @@ -56,6 +58,7 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ledgerlivemobile/main.m; sourceTree = "<group>"; };
13BEF41FFA9D4B06B1C8A8E1 /* libLottie.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libLottie.a; sourceTree = "<group>"; };
148B039A3EDE47A19A6BC6AE /* Feather.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Feather.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Feather.ttf"; sourceTree = "<group>"; };
20D0E84F30514AE5AF98A523 /* HMAlphaMono-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "HMAlphaMono-Medium.otf"; path = "../node_modules/@ledgerhq/native-ui/assets/fonts/alpha/HMAlphaMono-Medium.otf"; sourceTree = "<group>"; };
2402D074219C2E6600276138 /* ledgerlivemobile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = ledgerlivemobile.entitlements; path = ledgerlivemobile/ledgerlivemobile.entitlements; sourceTree = "<group>"; };
2433F86A66DB455E803650A5 /* Octicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Octicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Octicons.ttf"; sourceTree = "<group>"; };
2B8A443FFF9942B295210CA2 /* Entypo.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Entypo.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Entypo.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -92,6 +95,7 @@
CE7E1D553FBD49E0A85347D3 /* MuseoSans-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "MuseoSans-Bold.otf"; path = "../assets/fonts/MuseoSans-Bold.otf"; sourceTree = "<group>"; };
CEDB8CDC561E4D4BBA7A64CD /* MuseoSans-SemiBold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "MuseoSans-SemiBold.otf"; path = "../assets/fonts/MuseoSans-SemiBold.otf"; sourceTree = "<group>"; };
D249644B66FAECFBB42408A6 /* Pods-ledgerlivemobile.staging.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ledgerlivemobile.staging.xcconfig"; path = "Target Support Files/Pods-ledgerlivemobile/Pods-ledgerlivemobile.staging.xcconfig"; sourceTree = "<group>"; };
D62898F7405B4A6996BEBC33 /* Inter-Medium.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Medium.otf"; path = "../node_modules/@ledgerhq/native-ui/assets/fonts/inter/Inter-Medium.otf"; sourceTree = "<group>"; };
D66478ECD0864D09A3838EE2 /* Foundation.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Foundation.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Foundation.ttf"; sourceTree = "<group>"; };
D91EB0620BDE4709B6F44620 /* Inter-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Inter-Bold.otf"; path = "../assets/fonts/Inter-Bold.otf"; sourceTree = "<group>"; };
DB30501190A6488182047B5D /* SimpleLineIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = SimpleLineIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/SimpleLineIcons.ttf"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -221,6 +225,8 @@
6D891D99F1084D459DBF667F /* FontAwesome5_Pro_Light.ttf */,
668E26194DD94B6D8F10D450 /* FontAwesome5_Pro_Regular.ttf */,
991AA9919E4840DBB799E117 /* FontAwesome5_Pro_Solid.ttf */,
20D0E84F30514AE5AF98A523 /* HMAlphaMono-Medium.otf */,
D62898F7405B4A6996BEBC33 /* Inter-Medium.otf */,
);
name = Resources;
sourceTree = "<group>";
Expand Down Expand Up @@ -414,6 +420,8 @@
F99BEAC629E8441C83104922 /* FontAwesome5_Pro_Light.ttf in Resources */,
AD7A77B84DF3487C812B091B /* FontAwesome5_Pro_Regular.ttf in Resources */,
E55EFC09114D43B3AB041882 /* FontAwesome5_Pro_Solid.ttf in Resources */,
C7EBD81E6F2D4BEDB8C1F102 /* HMAlphaMono-Medium.otf in Resources */,
4C949EE1F3844B259014064F /* Inter-Medium.otf in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
6 changes: 3 additions & 3 deletions ios/ledgerlivemobile/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>NSCameraUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use the camera</string>
<string>The Ledger Live app needs access to your camera to scan QR codes</string>
<key>NSMicrophoneUsageDescription</key>
<string>Allow $(PRODUCT_NAME) to use the microphone</string>
<key>CFBundleURLTypes</key>
Expand Down Expand Up @@ -58,8 +58,6 @@
<string>Ledger Live needs to connect to your Ledger device to manage your crypto assets</string>
<key>NSBluetoothPeripheralUsageDescription</key>
<string>The Ledger Live app needs access device</string>
<key>NSCameraUsageDescription</key>
<string>The Ledger Live app needs access to your camera to scan QR codes</string>
<key>NSFaceIDUsageDescription</key>
<string>This app requires Face ID permission to authenticate using Face recognition.</string>
<key>UIAppFonts</key>
Expand Down Expand Up @@ -94,6 +92,8 @@
<string>FontAwesome5_Pro_Light.ttf</string>
<string>FontAwesome5_Pro_Regular.ttf</string>
<string>FontAwesome5_Pro_Solid.ttf</string>
<string>HMAlphaMono-Medium.otf</string>
<string>Inter-Medium.otf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
7 changes: 4 additions & 3 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
* @format
*/

const defaultSourceExts = require('metro-config/src/defaults/defaults').sourceExts
const defaultSourceExts = require("metro-config/src/defaults/defaults")
.sourceExts;

module.exports = {
transformer: {
Expand All @@ -17,6 +18,6 @@ module.exports = {
}),
},
resolver: {
sourceExts: [...defaultSourceExts, 'cjs'],
}
sourceExts: [...defaultSourceExts, "cjs"],
},
};
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,9 @@
"@ledgerhq/errors": "6.10.0",
"@ledgerhq/hw-transport": "6.20.0",
"@ledgerhq/hw-transport-http": "6.20.0",
"@ledgerhq/live-common": "^21.26.0",
"@ledgerhq/live-common": "file:.yalc/@ledgerhq/live-common",
"@ledgerhq/logs": "6.10.0",
"@ledgerhq/native-ui": "0.6.3",
"@ledgerhq/react-native-hid": "6.21.0",
"@ledgerhq/react-native-hw-transport-ble": "6.20.0",
"@ledgerhq/react-native-ledger-core": "4.19.1",
Expand Down Expand Up @@ -167,7 +168,7 @@
"react-native-url-polyfill": "^1.3.0",
"react-native-vector-icons": "^8.1.0",
"react-native-version-number": "^0.3.6",
"react-native-webview": "^11.6.6",
"react-native-webview": "^11.16.0",
"react-redux": "7.2.6",
"readable-stream": "3.6.0",
"redux": "4.1.2",
Expand All @@ -179,6 +180,7 @@
"rxjs-compat": "^6.6.6",
"stream-browserify": "^3.0.0",
"string_decoder": "~1.3.0",
"styled-components": "^5.3.3",
"timers-browserify": "^2.0.12",
"tty-browserify": "0.0.1",
"url": "^0.11.0",
Expand All @@ -190,7 +192,12 @@
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"@react-native-community/eslint-config": "^2.0.0",
"@types/jest": "^27.0.2",
"@types/react": "^17.0.30",
"@types/react-native": "^0.65.8",
"@types/react-test-renderer": "^17.0.1",
"babel-jest": "^26.6.3",
"babel-plugin-module-resolver": "^4.1.0",
"detox": "^18.2.1",
"eslint": "7.32.0",
"eslint-config-airbnb": "^18.2.1",
Expand All @@ -217,6 +224,7 @@
"react-native-codegen": "^0.0.7",
"react-native-debugger-open": "^0.3.25",
"rn-nodeify": "10.3.0",
"typescript": "^4.4.4",
"ws": "^7.5.2",
"yarn-deduplicate": "^3.1.0"
},
Expand Down
6 changes: 5 additions & 1 deletion react-native.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
module.exports = {
dependencies: {},
assets: ["./assets/fonts/"],
assets: [
"./assets/fonts/",
"node_modules/@ledgerhq/native-ui/assets/fonts/alpha",
"node_modules/@ledgerhq/native-ui/assets/fonts/inter",
],
};
33 changes: 33 additions & 0 deletions src/StyleProvider.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import React, { useMemo } from "react";
import { ThemeProvider } from "styled-components/native";
import theme from "@ledgerhq/native-ui/styles/theme";
import { palettes } from "@ledgerhq/native-ui/styles";
import { lightTheme as light, darkTheme as dark } from "./colors";

const themes = { light, dark };

type Props = {
children: React.ReactNode;
selectedPalette: "light" | "dark";
};

export default function StyleProvider({
children,
selectedPalette,
}: Props): React.ReactElement {
const defaultTheme = themes[selectedPalette];
const t = useMemo(
() => ({
...theme,
colors: {
...defaultTheme.colors,
...palettes[selectedPalette],
palette: palettes[selectedPalette],
},
theme: selectedPalette,
}),
[defaultTheme.colors, selectedPalette],
);

return <ThemeProvider theme={t}>{children}</ThemeProvider>;
}
11 changes: 11 additions & 0 deletions src/actions/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,17 @@ export const setLastSeenDeviceInfo = (dmi: DeviceModelInfo) => ({
payload: dmi,
});

export const setPlatformAppLastOpened = (
platformAppId: string,
timestamp: number,
) => ({
type: "SET_PLATFORM_APP_LAST_OPENED",
payload: {
platformAppId,
timestamp,
},
});

type PortfolioRangeOption = {
key: PortfolioRange,
value: string,
Expand Down
Loading