Unverified Commit 8640340c authored by Hanwen Cheng's avatar Hanwen Cheng Committed by GitHub
Browse files

feat: instant derivation on PathList screen (#648)

* create basic functional screen

* remove rust related files

* use npm libraries

* Update native.ts

* remove redundant files

* use npm package

* fix android building

* fix unit test

* Update actions.yml

* update readme

* make the state change response to ui changes

* update pod

* complete path group and redesign derivation button

* add e2e test for quick derivation

* lint fixes

* update project settings ios
parent af4eacd4
Pipeline #100299 failed with stages
in 4 minutes and 25 seconds
......@@ -25,9 +25,6 @@ Any data transfer from or to the app happens using QR code. By doing so, the mos
- [Troubleshooting](https://github.com/paritytech/parity-signer/wiki/Troubleshooting)
- [Publishing](https://github.com/paritytech/parity-signer/wiki/Publishing)
## Changes from 4.3.1
From [4.3.1](https://github.com/paritytech/parity-signer/commit/ea5786c85661d9b176795b9386af640b3e73aff3) we use the latest prebuild NDK (r21) toolchains for building rust libraries for android, so that we do not need to build the standalone NDK toolchains manually. If you have built or develop Parity Signer before 4.3.1, please download the NDK r19 or newer[here](https://developer.android.com/ndk/downloads) and point the `NKD_HOME` environment variable to it with e.g. `export NDK_HOME=/path/to/latest/ndk`
## License
Parity-Signer is [GPL 3.0 licensed](LICENSE).
......@@ -15,12 +15,13 @@
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
16614F66487241CE933918B8 /* Roboto-Thin.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 020454D0D3C74A398EC7F440 /* Roboto-Thin.ttf */; };
292ABE352622044FAC06CA34 /* libPods-NativeSigner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AE69B5C6F754300917775AEE /* libPods-NativeSigner.a */; };
399D1B0E22DDDE1B00A815EB /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 399D1B0D22DDDE1B00A815EB /* JavaScriptCore.framework */; };
39B6F6432315B550009C3C05 /* main.jsbundle in Resources */ = {isa = PBXBuildFile; fileRef = 39B6F6102315B550009C3C05 /* main.jsbundle */; };
3C31DDCB4CD0465084344D5F /* Manifold-CF-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 624E6C0FF4A64A97A7D51BEF /* Manifold-CF-Bold.otf */; };
3D7A98D07DE443E381067D3A /* Roboto-BlackItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 183C9D1307934735A4129705 /* Roboto-BlackItalic.ttf */; };
423E02567C044AF6832B2388 /* Roboto-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 53880E8FF84C419EB11ACA5C /* Roboto-Light.ttf */; };
52657FFD709FC2E5B193CFAD /* libPods-NativeSigner-NativeSignerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 753C46F2D867128E8598123C /* libPods-NativeSigner-NativeSignerTests.a */; };
56B77A0725E1D858239E6C2D /* libPods-NativeSigner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BF612E0564E1D0A8F42DE8F8 /* libPods-NativeSigner.a */; };
5DC40D98E51D492C8FF692B5 /* Manifold-CF-Light.otf in Resources */ = {isa = PBXBuildFile; fileRef = 31AAF2CB51C04377BFC79634 /* Manifold-CF-Light.otf */; };
6701864923270B1100A14061 /* assets in Resources */ = {isa = PBXBuildFile; fileRef = 6701864823270B1100A14061 /* assets */; };
6779B94524741C7F00DFEFA9 /* RobotoMono-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 6779B93E24741C7F00DFEFA9 /* RobotoMono-Medium.ttf */; };
......@@ -33,7 +34,6 @@
AD0B6F7EACB74BA7A42D2A2E /* Manifold-CF-Demi-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = 5D4F46832A564A6C98432D76 /* Manifold-CF-Demi-Bold.otf */; };
B43B3542B9ED441AB8AFBA0B /* Roboto-Italic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 42D126E4D4D84C4784E2377B /* Roboto-Italic.ttf */; };
E501D58522AE41A9AF18340A /* Roboto-BoldItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 0A3530DA239B43579EF02112 /* Roboto-BoldItalic.ttf */; };
E92BB3A8755D02EC9D6CD268 /* libPods-NativeSigner-NativeSignerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 18F296AEC3AE8432715E8F88 /* libPods-NativeSigner-NativeSignerTests.a */; };
EDCE1EC0CA1249279F03F2E2 /* Roboto-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E3DA81F74A0847378E71E280 /* Roboto-Medium.ttf */; };
EE896FB251B94030AC713B6F /* Roboto-LightItalic.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 8C99AB759A004CEB88AC4455 /* Roboto-LightItalic.ttf */; };
F1569210427145DEBBB5B898 /* Manifold-CF-Extra-Bold.otf in Resources */ = {isa = PBXBuildFile; fileRef = F198D2DE15BC4461B2308E3C /* Manifold-CF-Extra-Bold.otf */; };
......@@ -96,6 +96,7 @@
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
00E356F21AD99517003FC87E /* NativeSignerTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NativeSignerTests.m; sourceTree = "<group>"; };
020454D0D3C74A398EC7F440 /* Roboto-Thin.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-Thin.ttf"; path = "../res/fonts/Roboto-Thin.ttf"; sourceTree = "<group>"; };
071A85F2701762EFFC65D751 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.debug.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.debug.xcconfig"; sourceTree = "<group>"; };
0A3530DA239B43579EF02112 /* Roboto-BoldItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-BoldItalic.ttf"; path = "../res/fonts/Roboto-BoldItalic.ttf"; sourceTree = "<group>"; };
13B07F961A680F5B00A75B9A /* NativeSigner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = NativeSigner.app; sourceTree = BUILT_PRODUCTS_DIR; };
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = NativeSigner/AppDelegate.h; sourceTree = "<group>"; };
......@@ -106,7 +107,6 @@
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = NativeSigner/main.m; sourceTree = "<group>"; };
15BC2D6C3FC64019985638C1 /* FontAwesome.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome.ttf"; sourceTree = "<group>"; };
183C9D1307934735A4129705 /* Roboto-BlackItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-BlackItalic.ttf"; path = "../res/fonts/Roboto-BlackItalic.ttf"; sourceTree = "<group>"; };
18F296AEC3AE8432715E8F88 /* libPods-NativeSigner-NativeSignerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NativeSigner-NativeSignerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
1F426F39208B7CC000CA43DB /* libsigner.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libsigner.a; path = ../rust/signer/libsigner.a; sourceTree = "<group>"; };
1F426F90208D31D200CA43DB /* signer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = signer.h; path = ../rust/signer/signer.h; sourceTree = "<group>"; };
1F426F9B208D358500CA43DB /* NativeSigner-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NativeSigner-Bridging-Header.h"; path = "NativeSigner/NativeSigner-Bridging-Header.h"; sourceTree = "<group>"; };
......@@ -131,26 +131,26 @@
6779B93E24741C7F00DFEFA9 /* RobotoMono-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "RobotoMono-Medium.ttf"; sourceTree = "<group>"; };
6784634824ACE7D0000990D6 /* Bridging.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Bridging.swift; sourceTree = "<group>"; };
67E3BEA2237C17A6007882FA /* RobotoMono-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "RobotoMono-Regular.ttf"; sourceTree = "<group>"; };
68BB8262708A96204FE27E60 /* Pods-NativeSigner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.debug.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.debug.xcconfig"; sourceTree = "<group>"; };
6A7AB3BD3C1A4E0EB3C4B3B6 /* 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>"; };
6C53A63D96B24FDD95AF1C97 /* Fontisto.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Fontisto.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Fontisto.ttf"; sourceTree = "<group>"; };
70D93F89DBA50048AFA9B100 /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig"; sourceTree = "<group>"; };
753C46F2D867128E8598123C /* libPods-NativeSigner-NativeSignerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NativeSigner-NativeSignerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
7733AB637FF54DE5B174F42C /* Zocial.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Zocial.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Zocial.ttf"; sourceTree = "<group>"; };
7E8EE10B76828584522F5DCF /* Pods-NativeSigner.githubactions.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.githubactions.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.githubactions.xcconfig"; sourceTree = "<group>"; };
84D1117E71B04C839F00F619 /* Ionicons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = Ionicons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/Ionicons.ttf"; sourceTree = "<group>"; };
894E2A1A52DC44C28E9F9A71 /* AntDesign.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = AntDesign.ttf; path = "../node_modules/react-native-vector-icons/Fonts/AntDesign.ttf"; sourceTree = "<group>"; };
8C99AB759A004CEB88AC4455 /* Roboto-LightItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-LightItalic.ttf"; path = "../res/fonts/Roboto-LightItalic.ttf"; sourceTree = "<group>"; };
91D53BBCAE6D418EA362A703 /* 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>"; };
99AC61BF1E3C4FE8B07077D3 /* RNRandomBytes.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNRandomBytes.xcodeproj; path = "../node_modules/react-native-randombytes/RNRandomBytes.xcodeproj"; sourceTree = "<group>"; };
A6CC56C25970E93507219B27 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.release.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.release.xcconfig"; sourceTree = "<group>"; };
AE69B5C6F754300917775AEE /* libPods-NativeSigner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NativeSigner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
B1486DEFAEAE9FC17BA74102 /* Pods-NativeSigner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.release.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.release.xcconfig"; sourceTree = "<group>"; };
BB0882DC34AE448DAA1E2320 /* RNCNetInfo.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNCNetInfo.xcodeproj; path = "../node_modules/@react-native-community/netinfo/ios/RNCNetInfo.xcodeproj"; sourceTree = "<group>"; };
BF612E0564E1D0A8F42DE8F8 /* libPods-NativeSigner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-NativeSigner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
C0205550495341279B513024 /* RNSVG.xcodeproj */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = "wrapper.pb-project"; name = RNSVG.xcodeproj; path = "../node_modules/react-native-svg/ios/RNSVG.xcodeproj"; sourceTree = "<group>"; };
C59DD8E61765677021FEEAD4 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.release.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.release.xcconfig"; sourceTree = "<group>"; };
CB5C4A7F0E8B4E4E98E06EFD /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = MaterialCommunityIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
CBBABF4680C9D450BB8A138E /* Pods-NativeSigner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.release.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.release.xcconfig"; sourceTree = "<group>"; };
D44E3C511D404074AF5AFDB9 /* libRNSVG.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRNSVG.a; sourceTree = "<group>"; };
D592A5F1000548E09C637958 /* Roboto-Bold.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-Bold.ttf"; path = "../res/fonts/Roboto-Bold.ttf"; sourceTree = "<group>"; };
DBBAB0B4CB231AF939897F65 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.debug.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.debug.xcconfig"; sourceTree = "<group>"; };
DDFA123E816A46BBB8DF60B6 /* libRCTCamera.a */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = archive.ar; path = libRCTCamera.a; sourceTree = "<group>"; };
DE0B0A644DFF9AF00AC9760F /* Pods-NativeSigner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.debug.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.debug.xcconfig"; sourceTree = "<group>"; };
E2C73A1D48444F90B25AB1C9 /* EvilIcons.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = EvilIcons.ttf; path = "../node_modules/react-native-vector-icons/Fonts/EvilIcons.ttf"; sourceTree = "<group>"; };
E3DA81F74A0847378E71E280 /* Roboto-Medium.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-Medium.ttf"; path = "../res/fonts/Roboto-Medium.ttf"; sourceTree = "<group>"; };
E759893EEAF44DD487B2401E /* FontAwesome5_Regular.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = FontAwesome5_Regular.ttf; path = "../node_modules/react-native-vector-icons/Fonts/FontAwesome5_Regular.ttf"; sourceTree = "<group>"; };
......@@ -158,8 +158,8 @@
EA252ACE6F044BD88BDCD173 /* Roboto-Black.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-Black.ttf"; path = "../res/fonts/Roboto-Black.ttf"; sourceTree = "<group>"; };
F198D2DE15BC4461B2308E3C /* Manifold-CF-Extra-Bold.otf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Manifold-CF-Extra-Bold.otf"; path = "../res/fonts/Manifold-CF-Extra-Bold.otf"; sourceTree = "<group>"; };
F2FB2DDD90964B3BB1FC813C /* 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>"; };
F72F92C95BB9952D2A10DA25 /* Pods-NativeSigner.githubactions.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner.githubactions.xcconfig"; path = "Target Support Files/Pods-NativeSigner/Pods-NativeSigner.githubactions.xcconfig"; sourceTree = "<group>"; };
FAE70C1AAEEA45159C8CB0EA /* Roboto-ThinItalic.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 9; includeInIndex = 0; lastKnownFileType = unknown; name = "Roboto-ThinItalic.ttf"; path = "../res/fonts/Roboto-ThinItalic.ttf"; sourceTree = "<group>"; };
FBB09FDC40F6752F3692873D /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig"; path = "Target Support Files/Pods-NativeSigner-NativeSignerTests/Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
......@@ -167,7 +167,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
E92BB3A8755D02EC9D6CD268 /* libPods-NativeSigner-NativeSignerTests.a in Frameworks */,
52657FFD709FC2E5B193CFAD /* libPods-NativeSigner-NativeSignerTests.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -176,7 +176,7 @@
buildActionMask = 2147483647;
files = (
399D1B0E22DDDE1B00A815EB /* JavaScriptCore.framework in Frameworks */,
292ABE352622044FAC06CA34 /* libPods-NativeSigner.a in Frameworks */,
56B77A0725E1D858239E6C2D /* libPods-NativeSigner.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
......@@ -233,8 +233,8 @@
399D1B0D22DDDE1B00A815EB /* JavaScriptCore.framework */,
1F426F39208B7CC000CA43DB /* libsigner.a */,
1F7FFA3B208B691700FF717A /* libresolv.tbd */,
AE69B5C6F754300917775AEE /* libPods-NativeSigner.a */,
18F296AEC3AE8432715E8F88 /* libPods-NativeSigner-NativeSignerTests.a */,
BF612E0564E1D0A8F42DE8F8 /* libPods-NativeSigner.a */,
753C46F2D867128E8598123C /* libPods-NativeSigner-NativeSignerTests.a */,
);
name = Frameworks;
sourceTree = "<group>";
......@@ -345,12 +345,12 @@
99E67DDEA1C0A1F7EACC69CB /* Pods */ = {
isa = PBXGroup;
children = (
DE0B0A644DFF9AF00AC9760F /* Pods-NativeSigner.debug.xcconfig */,
B1486DEFAEAE9FC17BA74102 /* Pods-NativeSigner.release.xcconfig */,
F72F92C95BB9952D2A10DA25 /* Pods-NativeSigner.githubactions.xcconfig */,
DBBAB0B4CB231AF939897F65 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */,
A6CC56C25970E93507219B27 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */,
70D93F89DBA50048AFA9B100 /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */,
68BB8262708A96204FE27E60 /* Pods-NativeSigner.debug.xcconfig */,
CBBABF4680C9D450BB8A138E /* Pods-NativeSigner.release.xcconfig */,
7E8EE10B76828584522F5DCF /* Pods-NativeSigner.githubactions.xcconfig */,
071A85F2701762EFFC65D751 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */,
C59DD8E61765677021FEEAD4 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */,
FBB09FDC40F6752F3692873D /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */,
);
path = Pods;
sourceTree = "<group>";
......@@ -362,11 +362,11 @@
isa = PBXNativeTarget;
buildConfigurationList = 00E357021AD99517003FC87E /* Build configuration list for PBXNativeTarget "NativeSignerTests" */;
buildPhases = (
828FAF0E9E9CF4648F397D68 /* [CP] Check Pods Manifest.lock */,
3EFFDD30D58354F3B3572559 /* [CP] Check Pods Manifest.lock */,
00E356EA1AD99517003FC87E /* Sources */,
00E356EB1AD99517003FC87E /* Frameworks */,
00E356EC1AD99517003FC87E /* Resources */,
ED7EFD575C9B9F4D39FA6DD3 /* [CP] Copy Pods Resources */,
C0762FFFA39FDBD2ABD2302B /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -382,12 +382,12 @@
isa = PBXNativeTarget;
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "NativeSigner" */;
buildPhases = (
EA84646F2F322509A9DC2C14 /* [CP] Check Pods Manifest.lock */,
9C0CFF1C92773E07B84E4745 /* [CP] Check Pods Manifest.lock */,
13B07F871A680F5B00A75B9A /* Sources */,
13B07F8C1A680F5B00A75B9A /* Frameworks */,
13B07F8E1A680F5B00A75B9A /* Resources */,
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
9F69C694699D4102D67697D9 /* [CP] Copy Pods Resources */,
A0435480639B6ADD5C8D1764 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -554,7 +554,7 @@
shellPath = /bin/sh;
shellScript = "export NODE_BINARY=node\nexport NODE_OPTIONS=\"--max_old_space_size=8192\"\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
};
828FAF0E9E9CF4648F397D68 /* [CP] Check Pods Manifest.lock */ = {
3EFFDD30D58354F3B3572559 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -576,7 +576,29 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9F69C694699D4102D67697D9 /* [CP] Copy Pods Resources */ = {
9C0CFF1C92773E07B84E4745 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-NativeSigner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
A0435480639B6ADD5C8D1764 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -624,29 +646,7 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-NativeSigner/Pods-NativeSigner-resources.sh\"\n";
showEnvVarsInLog = 0;
};
EA84646F2F322509A9DC2C14 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputFileListPaths = (
);
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-NativeSigner-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
ED7EFD575C9B9F4D39FA6DD3 /* [CP] Copy Pods Resources */ = {
C0762FFFA39FDBD2ABD2302B /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
......@@ -740,9 +740,9 @@
/* Begin XCBuildConfiguration section */
00E356F61AD99517003FC87E /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DBBAB0B4CB231AF939897F65 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */;
baseConfigurationReference = 071A85F2701762EFFC65D751 /* Pods-NativeSigner-NativeSignerTests.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
......@@ -773,9 +773,9 @@
};
00E356F71AD99517003FC87E /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = A6CC56C25970E93507219B27 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */;
baseConfigurationReference = C59DD8E61765677021FEEAD4 /* Pods-NativeSigner-NativeSignerTests.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
BUNDLE_LOADER = "$(TEST_HOST)";
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
......@@ -802,8 +802,9 @@
};
13B07F941A680F5B00A75B9A /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = DE0B0A644DFF9AF00AC9760F /* Pods-NativeSigner.debug.xcconfig */;
baseConfigurationReference = 68BB8262708A96204FE27E60 /* Pods-NativeSigner.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
......@@ -844,8 +845,9 @@
};
13B07F951A680F5B00A75B9A /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = B1486DEFAEAE9FC17BA74102 /* Pods-NativeSigner.release.xcconfig */;
baseConfigurationReference = CBBABF4680C9D450BB8A138E /* Pods-NativeSigner.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
......@@ -936,8 +938,9 @@
};
678810082450B99B00838601 /* GithubActions */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = F72F92C95BB9952D2A10DA25 /* Pods-NativeSigner.githubactions.xcconfig */;
baseConfigurationReference = 7E8EE10B76828584522F5DCF /* Pods-NativeSigner.githubactions.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 1;
......@@ -976,9 +979,9 @@
};
678810092450B99B00838601 /* GithubActions */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 70D93F89DBA50048AFA9B100 /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */;
baseConfigurationReference = FBB09FDC40F6752F3692873D /* Pods-NativeSigner-NativeSignerTests.githubactions.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
......@@ -1003,7 +1006,7 @@
83CBBA201A601CBA00E9B192 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
......@@ -1063,7 +1066,7 @@
83CBBA211A601CBA00E9B192 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
......
......@@ -247,7 +247,7 @@ PODS:
- React
- react-native-safe-area-context (0.7.3):
- React
- react-native-substrate-sign (1.0.2):
- react-native-substrate-sign (1.0.3):
- React
- React-RCTActionSheet (0.62.2):
- React-Core/RCTActionSheetHeaders (= 0.62.2)
......@@ -503,7 +503,7 @@ SPEC CHECKSUMS:
react-native-netinfo: 1b8691be19549f020d0757b40aca4f355cafeeec
react-native-randombytes: 3638d24759d67c68f6ccba60c52a7a8a8faa6a23
react-native-safe-area-context: e200d4433aba6b7e60b52da5f37af11f7a0b0392
react-native-substrate-sign: a56bdcb26819beeb7588c1175b6def28c03bce09
react-native-substrate-sign: 646f9915990e3930829d34dafaeb8d00825b02a2
React-RCTActionSheet: f41ea8a811aac770e0cc6e0ad6b270c644ea8b7c
React-RCTAnimation: 49ab98b1c1ff4445148b72a3d61554138565bad0
React-RCTBlob: a332773f0ebc413a0ce85942a55b064471587a71
......
......@@ -34,7 +34,6 @@ export default class Button extends React.PureComponent<{
title: string;
onPress: ButtonListener;
textStyles?: TextStyle;
buttonStyles?: ViewStyle;
aboveKeyboard?: boolean;
disabled?: boolean;
small?: boolean;
......@@ -51,13 +50,12 @@ export default class Button extends React.PureComponent<{
small,
textStyles,
onlyText,
buttonStyles,
testID,
style
} = this.props;
const finalTextStyles = [styles.buttonText, {}];
const finalButtonStyles = [styles.button, buttonStyles];
const finalButtonStyles = [styles.button, {}];
if (small) {
finalTextStyles.push({ fontSize: 14 });
......
// Copyright 2015-2020 Parity Technologies (UK) Ltd.
// This file is part of Parity.
// Parity is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// Parity is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with Parity. If not, see <http://www.gnu.org/licenses/>.
import { useNavigation } from '@react-navigation/native';
import { StackNavigationProp } from '@react-navigation/stack';
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import testIDs from '../../test/e2e/testIDs';
import PathCard from './PathCard';
import Separator from './Separator';
import colors from 'styles/colors';
import TouchableItem from 'components/TouchableItem';
import fontStyles from 'styles/fontStyles';
import {
AccountsStoreStateWithIdentity,
Identity,
PathGroup
} from 'types/identityTypes';
import {
isSubstrateNetworkParams,
SubstrateNetworkParams,
UnknownNetworkParams
} from 'types/networkSpecsTypes';
import { removeSlash } from 'utils/identitiesUtils';
import { useSeedRef } from 'utils/seedRefHooks';
import { unlockSeedPhrase } from 'utils/navigationHelpers';
import { alertPathDerivationError } from 'utils/alertUtils';
import { RootStackParamList } from 'types/routes';
type Props = {
accounts: AccountsStoreStateWithIdentity;
currentIdentity: Identity;
pathGroup: PathGroup;
networkParams: SubstrateNetworkParams | UnknownNetworkParams;
};
export default function PathGroupCard({
currentIdentity,
pathGroup,
networkParams,
accounts
}: Props): React.ReactElement {
const navigation = useNavigation<StackNavigationProp<RootStackParamList>>();
const paths = pathGroup.paths;
const { isSeedRefValid, substrateAddress } = useSeedRef(
currentIdentity.encryptedSeed
);
const _getFullPath = (index: number, isHardDerivation: boolean): string =>
`//${networkParams.pathId}${pathGroup.title}${
isHardDerivation ? '//' : '/'
}${index}`;
const _getNextIndex = (isHardDerivation: boolean): number => {
let index = 0;
while (paths.includes(_getFullPath(index, isHardDerivation))) {
index++;
}
return index;
};
const addDerivationPath = async (
isHardDerivation: boolean
): Promise<void> => {
if (!isSeedRefValid) {
await unlockSeedPhrase(navigation, isSeedRefValid);
navigation.goBack();
}
const nextIndex = _getNextIndex(isHardDerivation);
const nextPath = _getFullPath(nextIndex, isHardDerivation);
const name = removeSlash(`${pathGroup.title}${nextIndex}`);
try {
await accounts.deriveNewPath(
nextPath,
substrateAddress,
(networkParams as SubstrateNetworkParams).genesisHash,
name,
''
);
} catch (error) {
alertPathDerivationError(error.message);
}
};
const _deletePath = async (): Promise<void> => {
const targetPath = paths[paths.length - 1];
await accounts.deletePath(targetPath);
};
const headerTitle = removeSlash(pathGroup.title);
const headerCode = `//${networkParams.pathId}${pathGroup.title}`;
return (
<View key={`group${pathGroup.title}`} style={{ marginTop: 24 }}>
<Separator shadow={true} style={styles.separator} />
<View style={styles.header}>
<View style={styles.headerText}>
<View>
<Text style={fontStyles.t_prefix}>{headerTitle}</Text>
<Text style={fontStyles.t_codeS}>{headerCode}</Text>
</View>
</View>
{isSubstrateNetworkParams(networkParams) && (
<TouchableItem
onPress={(): any => addDerivationPath(true)}
style={styles.derivationButton}
testID={`${testIDs.PathsList.pathsGroup}${pathGroup.title}`}
>
<Text style={styles.derivationIcon}>+</Text>
<Text style={styles.derivationTextLabel}>{'new derivation'}</Text>
</TouchableItem>
)}
</View>
{paths.map(path => (
<PathCard
key={path}
testID={testIDs.PathsList.pathCard + path}
identity={currentIdentity}
path={path}
onPress={(): void => navigation.navigate('PathDetails', { path })}
/>
))}
</View>
);
}
const styles = StyleSheet.create({
derivationButton: {
alignItems: 'center',
backgroundColor: 'black',
height: 63,
justifyContent: 'center',
marginHorizontal: 0,
marginVertical: 0,
paddingHorizontal: 10
},
derivationIcon: {
...fontStyles.i_medium,
color: colors.text.main,
fontWeight: 'bold'
},
derivationTextLabel: {
...fontStyles.a_text,
color: colors.text.main
},
header: {
flexDirection: 'row',
height: 63,
paddingLeft: 16,
paddingRight: 0
},
headerText: {
flexGrow: 1,
marginVertical: 16
},
separator: {
height: 0,
marginVertical: 0
}
});
......@@ -48,7 +48,7 @@ export default class QRScannerAndDerivationTab extends React.PureComponent<{
style={styles.derivationButton}
testID={derivationTestID}
>
<Text style={styles.icon}>//</Text>
<Text style={styles.icon}>+</Text>
<Text style={styles.textLabel}>{title}</Text>
</TouchableItem>
</View>
......@@ -67,6 +67,7 @@ const styles = StyleSheet.create({
icon: {
...fontStyles.i_large,