Compare commits
21
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e1a868fc0d | ||
|
|
4d3a564312 | ||
|
|
757b8ebcac | ||
|
|
5ff9097410 | ||
|
|
6fdb57a753 | ||
|
|
8d821c27cb | ||
|
|
3be9bd0bbb | ||
|
|
541e51b37b | ||
|
|
c3a62f080b | ||
|
|
5346dfec0f | ||
|
|
83e9f8f0fc | ||
|
|
691768b691 | ||
|
|
797578ae73 | ||
|
|
5f7081c30f | ||
|
|
8efbf7e43d | ||
|
|
97019fffee | ||
|
|
143410871b | ||
|
|
85382bbc28 | ||
|
|
389a730eff | ||
|
|
4cdbfb6cc6 | ||
|
|
8fe59a0998 |
@@ -255,7 +255,7 @@ status-go-ios: ##@status-go Compile status-go for iOS app
|
||||
|
||||
status-go-library: SHELL := /bin/sh
|
||||
status-go-library: ##@status-go Compile status-go for node-js
|
||||
unzip -j -o -d ./result/ status-go-library.zip
|
||||
nix/scripts/build.sh targets.status-go.library
|
||||
|
||||
#--------------
|
||||
# Watch, Build & Review changes
|
||||
|
||||
@@ -59,7 +59,7 @@ react {
|
||||
/**
|
||||
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
|
||||
*/
|
||||
def enableProguardInReleaseBuilds = false
|
||||
def enableProguardInReleaseBuilds = true
|
||||
|
||||
/**
|
||||
* The preferred build flavor of JavaScriptCore (JSC)
|
||||
@@ -233,6 +233,7 @@ android {
|
||||
}
|
||||
release {
|
||||
minifyEnabled enableProguardInReleaseBuilds
|
||||
shrinkResources enableProguardInReleaseBuilds
|
||||
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
|
||||
signingConfig null
|
||||
}
|
||||
@@ -240,10 +241,10 @@ android {
|
||||
initWith release
|
||||
applicationIdSuffix ".pr"
|
||||
versionNameSuffix ".pr"
|
||||
debuggable false
|
||||
debuggable false
|
||||
matchingFallbacks = ["release"]
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
// necessary to make react-native-config's code generation work
|
||||
resValue "string", "build_config_package", "im.status.ethereum"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -293,7 +294,7 @@ dependencies {
|
||||
implementation("com.github.status-im:function:0.0.1")
|
||||
implementation("com.facebook.fresco:fresco:2.5.0")
|
||||
implementation("com.facebook.fresco:animated-gif:2.5.0")
|
||||
implementation("com.squareup.okhttp3:okhttp-tls:4.9.2")
|
||||
implementation("com.squareup.okhttp3:okhttp-tls:4.11.0")
|
||||
implementation("com.google.prefab:cli:2.0.0")
|
||||
implementation("com.android.tools.build:aapt2:8.1.1-10154469")
|
||||
}
|
||||
|
||||
Vendored
+13
-1
@@ -58,6 +58,9 @@
|
||||
-keep interface okhttp3.** { *; }
|
||||
-dontwarn okhttp3.**
|
||||
|
||||
# to fix : java.security.KeyStoreException: BKS not found
|
||||
-keep class org.bouncycastle.** { *; }
|
||||
|
||||
# okio
|
||||
|
||||
-keep class sun.misc.Unsafe { *; }
|
||||
@@ -75,4 +78,13 @@
|
||||
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
|
||||
**[] $VALUES;
|
||||
public *;
|
||||
}
|
||||
}
|
||||
|
||||
# react-native-config
|
||||
# https://github.com/lugg/react-native-config?tab=readme-ov-file#problems-with-proguard
|
||||
-keep class im.status.ethereum.BuildConfig {*;}
|
||||
|
||||
# react-native-navigation
|
||||
# to fix : java.lang.ClassCastException: java.lang.Class cannot be cast to java.lang.reflect.ParameterizedType
|
||||
# at com.reactnativenavigation.views.element.animators.PropertyAnimatorCreator.getChildClass(Unknown Source:13)
|
||||
-keep class com.reactnativenavigation.** {*;}
|
||||
|
||||
+5
-5
@@ -1119,14 +1119,14 @@ PODS:
|
||||
- React
|
||||
- ReactNativeCameraKit (14.0.0-beta13):
|
||||
- React-Core
|
||||
- ReactNativeNavigation (7.38.3):
|
||||
- ReactNativeNavigation (7.39.0):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-CoreModules
|
||||
- React-RCTImage
|
||||
- React-RCTText
|
||||
- ReactNativeNavigation/Core (= 7.38.3)
|
||||
- ReactNativeNavigation/Core (7.38.3):
|
||||
- ReactNativeNavigation/Core (= 7.39.0)
|
||||
- ReactNativeNavigation/Core (7.39.0):
|
||||
- HMSegmentedControl
|
||||
- React-Core
|
||||
- React-CoreModules
|
||||
@@ -1484,7 +1484,7 @@ SPEC CHECKSUMS:
|
||||
FBLazyVector: 56e0e498dbb513b96c40bac6284729ba4e62672d
|
||||
FBReactNativeSpec: 146c741a3f40361f6bc13a4ba284678cbedb5881
|
||||
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
|
||||
glog: 530710e7949eb12c82670bd09e946becf50a3c2a
|
||||
glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2
|
||||
hermes-engine: 1d1835b2cc54c381909d94d1b3c8e0a2f1a94a0e
|
||||
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
|
||||
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
|
||||
@@ -1551,7 +1551,7 @@ SPEC CHECKSUMS:
|
||||
ReactCommon: 2947b0bffd82ea0e58ca7928881152d4c6dae9af
|
||||
ReactNativeAudioToolkit: de9610f323e855ac6574be8c99621f3d57c5df06
|
||||
ReactNativeCameraKit: d95d3e19c514526a234d9f93c6db7e7f10eef9ea
|
||||
ReactNativeNavigation: 46305e1026fa4cdcf0cfb3822932fc58d090668d
|
||||
ReactNativeNavigation: 679d8c8bf3b8ae98d285bce810964d10da85dbdb
|
||||
RNCAsyncStorage: c913ede1fa163a71cea118ed4670bbaaa4b511bb
|
||||
RNCClipboard: 60fed4b71560d7bfe40e9d35dea9762b024da86d
|
||||
RNCMaskedView: 71fc32d971f03b7f03d6ab6b86b730c4ee64f5b6
|
||||
|
||||
+13
@@ -75,4 +75,17 @@ class NetworkManager(private val reactContext: ReactApplicationContext) : ReactC
|
||||
utils.executeRunnableStatusGoMethod({ Statusgo.recover(rpcParams) }, callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun getConnectionStringForExportingKeypairsKeystores(configJSON: String, callback: Callback) {
|
||||
val jsonConfig = JSONObject(configJSON)
|
||||
val senderConfig = jsonConfig.getJSONObject("senderConfig")
|
||||
val keyUID = senderConfig.getString("loggedInKeyUid")
|
||||
val keyStorePath = utils.getKeyStorePath(keyUID)
|
||||
senderConfig.put("keystorePath", keyStorePath)
|
||||
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.getConnectionStringForExportingKeypairsKeystores(jsonConfig.toString()) },
|
||||
callback)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -106,4 +106,22 @@ RCT_EXPORT_METHOD(recover:(NSString *)message
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(getConnectionStringForExportingKeypairsKeystores:(NSString *)configJSON
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
|
||||
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *error;
|
||||
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
|
||||
NSMutableDictionary *senderConfig = configDict[@"senderConfig"];
|
||||
NSString *keyUID = senderConfig[@"loggedInKeyUid"];
|
||||
NSURL *multiaccountKeystoreDir = [Utils getKeyStoreDirForKeyUID:keyUID];
|
||||
NSString *keystoreDir = multiaccountKeystoreDir.path;
|
||||
|
||||
[senderConfig setValue:keystoreDir forKey:@"keystorePath"];
|
||||
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
|
||||
|
||||
NSString *result = StatusgoGetConnectionStringForExportingKeypairsKeystores(modifiedConfigJSON);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+123
-51
@@ -8454,20 +8454,16 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "commons-logging/commons-logging/1.3.1",
|
||||
"path": "commons-logging/commons-logging/1.3.2",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"commons-logging-1.3.1.pom": {
|
||||
"sha1": "4bfde82c8e291f8e31227a91e0c5e428ee113e2d",
|
||||
"sha256": "sha256-jeGLudCI4RAGLLIgVKx4DfW8A0njFzUbjtFuIH//s7g="
|
||||
"commons-logging-1.3.2.pom": {
|
||||
"sha1": "fcfa9f6e411771b8be9bee29e9d318867d3e1bc3",
|
||||
"sha256": "sha256-ZMFGqsSRjMPiHhMij1/kF4VZM7GBN0zML4me8eFWsm0="
|
||||
},
|
||||
"commons-logging-1.3.1-api.jar": {
|
||||
"sha1": "c8395db010f14b2643d838c66703ad7c9325ff3c",
|
||||
"sha256": "sha256-F+1DKWd0Dhql/EJKJGrawLoAamu/2pjKvGkoNRqOuFQ="
|
||||
},
|
||||
"commons-logging-1.3.1.jar": {
|
||||
"sha1": "8cff7dc1e492911f3dd7640ebfb60d6206a1dd40",
|
||||
"sha256": "sha256-lUB7tDN7rWuPsuZHpH+VIZmxUg7ztreTF9H+D8eQuPw="
|
||||
"commons-logging-1.3.2.jar": {
|
||||
"sha1": "3dc966156ef19d23c839715165435e582fafa753",
|
||||
"sha256": "sha256-a4WEJPUYAV8yv80Rg6Nz9Kgn1y0Ca2Ax2gyRzw6PNIk="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -12764,20 +12760,20 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okhttp3/okhttp-tls/4.9.2",
|
||||
"path": "com/squareup/okhttp3/okhttp-tls/4.11.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"okhttp-tls-4.9.2.pom": {
|
||||
"sha1": "dec05ee1b4de176f92a12361b1cc82eb7b45857d",
|
||||
"sha256": "sha256-pzMpEUHs6TYBsocbxdsl3laPLAqVohrGEBOkQdQbDBI="
|
||||
"okhttp-tls-4.11.0.pom": {
|
||||
"sha1": "93518ebb24213d6dcbde8e0c21913e40672f80c3",
|
||||
"sha256": "sha256-0SYiMcXxtb/bVe/7+SXas1/dWlNFEvhsSd3HIGY/IEg="
|
||||
},
|
||||
"okhttp-tls-4.9.2.jar": {
|
||||
"sha1": "2337dfb8b20de9cecd4ea36d54d15a3d85a3f385",
|
||||
"sha256": "sha256-W8xRWQAJ2M/xShfi7i3cQ6J1HOQZmdhiQaNG8JwiB34="
|
||||
"okhttp-tls-4.11.0.jar": {
|
||||
"sha1": "5ac74e5e234dc2d5cd434ac87df377858a2dcf40",
|
||||
"sha256": "sha256-SuTHCSwBeBhSRQabkSdGX9V8dkSF81ev7USlxIoFNf0="
|
||||
},
|
||||
"okhttp-tls-4.9.2.module": {
|
||||
"sha1": "d5ab02f5e49911694f95a23a0a93dd3de27f8dd1",
|
||||
"sha256": "sha256-s001IZvRHujsteSz3Qf0W+iym6Bep5z57dqRYcwlj9E="
|
||||
"okhttp-tls-4.11.0.module": {
|
||||
"sha1": "e790e6e5d0e88f9fc0c70df981e86daf29f411fa",
|
||||
"sha256": "sha256-2m5O5qfdybnUZusr5ScBAmsXms2wClyso08uXTdeSMI="
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -12850,6 +12846,25 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okhttp3/okhttp/4.11.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"okhttp-4.11.0.pom": {
|
||||
"sha1": "723ab52cf1ac14363cb36ab084b0af810c095bef",
|
||||
"sha256": "sha256-ei1Cezixfgdtpk7o0hAuZIiNyyOK7l4tukp3UslKP94="
|
||||
},
|
||||
"okhttp-4.11.0.jar": {
|
||||
"sha1": "436932d695b2c43f2c86b8111c596179cd133d56",
|
||||
"sha256": "sha256-7o9r1s0SVwE9dIMw9MoUdjip+8tS+ziNWsk89TQIdF0="
|
||||
},
|
||||
"okhttp-4.11.0.module": {
|
||||
"sha1": "db24464b688785ba9c5765df8b5508a9b8994b40",
|
||||
"sha256": "sha256-VnwltR13eWF0Q5GE11JBK6l+2f22X8cYQNvFVjvrj6g="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okhttp3/parent/3.9.1",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -12872,6 +12887,25 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-jvm/3.2.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"okio-jvm-3.2.0.pom": {
|
||||
"sha1": "749720d97fe3dc16e0d84a05628f4c818b375a85",
|
||||
"sha256": "sha256-XEUflKdr6oYbbvK/hOj1cgBUWWjIZVWr3+0Tx8otSJ0="
|
||||
},
|
||||
"okio-jvm-3.2.0.jar": {
|
||||
"sha1": "332d1c5dc82b0241cb1d35bb0901d28470cc89ca",
|
||||
"sha256": "sha256-tkK670xXAFXeTLPRZnsrFtztkB/4BmNFoGNpGqBgJaQ="
|
||||
},
|
||||
"okio-jvm-3.2.0.module": {
|
||||
"sha1": "09f966bc7d27d5151fa3367e637e098cf7cf4179",
|
||||
"sha256": "sha256-p3jzkIXtar/NaHESmGxjhapXrC2IQLIdlGs8IJXzDqQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-jvm/3.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -12891,25 +12925,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-metadata/2.8.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"okio-metadata-2.8.0.pom": {
|
||||
"sha1": "dc508270653b48fd92c98866c5f1ed6e3e033cad",
|
||||
"sha256": "sha256-v8xCxsWC2Zl4UgnmAs30RRoyZJrsbg7CaLdIhOA0QAg="
|
||||
},
|
||||
"okio-metadata-2.8.0.jar": {
|
||||
"sha1": "2a068c26cd04cbd7214ae6a4146c5f5424bdb393",
|
||||
"sha256": "sha256-99w4g86uLh/jQl4bVMXfKLiFfF/QA4G1If2mB5DylSw="
|
||||
},
|
||||
"okio-metadata-2.8.0.module": {
|
||||
"sha1": "a5b10ac12aa5f879996e516be24aaeb9b4459873",
|
||||
"sha256": "sha256-pO72Qb5eVGPSeJw8c2AfmpnzbhN3ygB+MPD+5ToFTNw="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio-parent/1.13.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -13026,6 +13041,29 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio/3.2.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"okio-3.2.0.pom": {
|
||||
"sha1": "85284557b21661be1c4983910fef4e35532e1e34",
|
||||
"sha256": "sha256-i0b1jZua6xF4Nh1YpoZfTa1mWTDF/3tV4LqmHvOpcqE="
|
||||
},
|
||||
"okio-3.2.0-all.jar": {
|
||||
"sha1": "22e2a4f865203033fc0f35fd5892a213d21a4710",
|
||||
"sha256": "sha256-Uf+6hylix9O+0SjfKbDeqz7qMfwjfAoMgVjcmQqEh44="
|
||||
},
|
||||
"okio-3.2.0.jar": {
|
||||
"sha1": "afd4b7185a6976c2ac6bfb7b126c257ee9b3e765",
|
||||
"sha256": "sha256-3KkyyyAptsniZ3D4fbCLFNSB/+gTGlnzaaI4XBG+Ti0="
|
||||
},
|
||||
"okio-3.2.0.module": {
|
||||
"sha1": "32c2edb224d6eeaee24f8086e3ac41b92138fadb",
|
||||
"sha256": "sha256-aB9c7BcN5FuVST6e5wWGjrNa34mO4G+W4i0ZclDBsQQ="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/squareup/okio/okio/3.9.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -15897,17 +15935,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/commons/commons-parent/67",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"commons-parent-67.pom": {
|
||||
"sha1": "761d110d7313f09bfc20ec1fb1f420da3314958e",
|
||||
"sha256": "sha256-UHrZeCzW5L8io0Eyk2TG2vqqAqsmswy8Z4XPsFlQZ1Y="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/commons/commons-parent/69",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -20025,6 +20052,21 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.10",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-jdk7-1.6.10.pom": {
|
||||
"sha1": "5da7f12df7646d63f35e8a894157143c93efceb4",
|
||||
"sha256": "sha256-YSIR/5MPW1LHJP92NBfVqigd1+AyXDs1yNGBIKao300="
|
||||
},
|
||||
"kotlin-stdlib-jdk7-1.6.10.jar": {
|
||||
"sha1": "e1c380673654a089c4f0c9f83d0ddfdc1efdb498",
|
||||
"sha256": "sha256-Ku3NxrabM731zCNbzqiOfPZgEUa7a83/2zErus174mE="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
@@ -20235,6 +20277,36 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.10",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-jdk8-1.6.10.pom": {
|
||||
"sha1": "9ad76ce2a9e0473c5d5d4ec01add1b061beb521d",
|
||||
"sha256": "sha256-Q6ZJ+nN7+zX6SvTm3jPi8IpdGRBNdYLqQNvNK2N5Csw="
|
||||
},
|
||||
"kotlin-stdlib-jdk8-1.6.10.jar": {
|
||||
"sha1": "e80fe6ac3c3573a80305f5ec43f86b829e8ab53d",
|
||||
"sha256": "sha256-FFbYLQOeow2EhbAykB9Su/B+fNvoux+HCK0yqFdMQc4="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.20",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
"files": {
|
||||
"kotlin-stdlib-jdk8-1.6.20.pom": {
|
||||
"sha1": "6207ba2d7a89316eafea7f135ef1fc17e41c424b",
|
||||
"sha256": "sha256-GEap+GBLC+HHGiEovb2diQJyAnlCf2ItK5pECsmjwwk="
|
||||
},
|
||||
"kotlin-stdlib-jdk8-1.6.20.jar": {
|
||||
"sha1": "dab8089bca6ac0e394c37281ea8cff2f99acd421",
|
||||
"sha256": "sha256-/asb8SDiteerbXiI6evAJOxrjKcpNhKWOV2rY0shNpU="
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.0",
|
||||
"repo": "https://repo.maven.apache.org/maven2",
|
||||
|
||||
@@ -597,12 +597,13 @@ com.google.test.platform:core-proto:0.0.2-dev
|
||||
com.ibm.icu:icu4j:53.1
|
||||
com.intellij:annotations:12.0
|
||||
com.parse.bolts:bolts-tasks:1.4.0
|
||||
com.squareup.okhttp3:okhttp-tls:4.9.2
|
||||
com.squareup.okhttp3:okhttp-tls:4.11.0
|
||||
com.squareup.okhttp3:okhttp-urlconnection:4.9.2
|
||||
com.squareup.okhttp3:okhttp:4.9.2
|
||||
com.squareup.okio:okio-metadata:2.8.0
|
||||
com.squareup.okio:okio:2.8.0
|
||||
com.squareup.okhttp3:okhttp:4.11.0
|
||||
com.squareup.okio:okio-jvm:3.2.0
|
||||
com.squareup.okio:okio:2.9.0
|
||||
com.squareup.okio:okio:3.2.0
|
||||
com.squareup:javapoet:1.8.0
|
||||
com.squareup:javapoet:1.10.0
|
||||
com.squareup:javapoet:1.13.0
|
||||
|
||||
@@ -528,7 +528,7 @@ https://repo.maven.apache.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.po
|
||||
https://repo.maven.apache.org/maven2/commons-io/commons-io/2.16.1/commons-io-2.16.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.2/commons-logging-1.2.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.1/commons-logging-1.3.1.pom
|
||||
https://repo.maven.apache.org/maven2/commons-logging/commons-logging/1.3.2/commons-logging-1.3.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/adobe/xmp/xmpcore/6.1.11/xmpcore-6.1.11.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/commons/0.9.6.0/commons-0.9.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/afollestad/material-dialogs/core/0.9.6.0/core-0.9.6.0.pom
|
||||
@@ -806,15 +806,16 @@ https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.8.0/javapoet-1.8.0.
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.10.0/javapoet-1.10.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javapoet/1.13.0/javapoet-1.13.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/javawriter/2.5.0/javawriter-2.5.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-tls/4.9.2/okhttp-tls-4.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-tls/4.11.0/okhttp-tls-4.11.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp-urlconnection/4.9.2/okhttp-urlconnection-4.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.9.1/okhttp-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/3.12.1/okhttp-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.9.2/okhttp-4.9.2.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/okhttp/4.11.0/okhttp-4.11.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.9.1/parent-3.9.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okhttp3/parent/3.12.1/parent-3.12.1.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.2.0/okio-jvm-3.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-jvm/3.9.0/okio-jvm-3.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-metadata/2.8.0/okio-metadata-2.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.13.0/okio-parent-1.13.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.15.0/okio-parent-1.15.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio-parent/1.17.4/okio-parent-1.17.4.pom
|
||||
@@ -823,6 +824,7 @@ https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.15.0/okio-1.15.0.p
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/1.17.4/okio-1.17.4.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.8.0/okio-2.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/2.9.0/okio-2.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.2.0/okio-3.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/squareup/okio/okio/3.9.0/okio-3.9.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.0/all-1.2.0.pom
|
||||
https://repo.maven.apache.org/maven2/com/sun/activation/all/1.2.1/all-1.2.1.pom
|
||||
@@ -1032,7 +1034,6 @@ https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/39/common
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/42/commons-parent-42.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/48/commons-parent-48.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/52/commons-parent-52.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/67/commons-parent-67.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/commons/commons-parent/69/commons-parent-69.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.1.1/httpclient-4.1.1.pom
|
||||
https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.2.6/httpclient-4.2.6.pom
|
||||
@@ -1300,6 +1301,7 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.30/kotlin-stdlib-jdk7-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.5.31/kotlin-stdlib-jdk7-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.0/kotlin-stdlib-jdk7-1.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.10/kotlin-stdlib-jdk7-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.6.20/kotlin-stdlib-jdk7-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.8.0/kotlin-stdlib-jdk7-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk7/1.8.20-RC2/kotlin-stdlib-jdk7-1.8.20-RC2.pom
|
||||
@@ -1314,6 +1316,8 @@ https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.30/kotlin-stdlib-jdk8-1.5.30.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.5.31/kotlin-stdlib-jdk8-1.5.31.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.0/kotlin-stdlib-jdk8-1.6.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.10/kotlin-stdlib-jdk8-1.6.10.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.6.20/kotlin-stdlib-jdk8-1.6.20.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.0/kotlin-stdlib-jdk8-1.8.0.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.20-RC2/kotlin-stdlib-jdk8-1.8.20-RC2.pom
|
||||
https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.8.21/kotlin-stdlib-jdk8-1.8.21.pom
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@
|
||||
"react-native-keychain": "8.1.2",
|
||||
"react-native-linear-gradient": "^2.8.0",
|
||||
"react-native-lottie-splash-screen": "^1.0.1",
|
||||
"react-native-navigation": "7.38.3",
|
||||
"react-native-navigation": "7.39.0",
|
||||
"react-native-orientation-locker": "^1.5.0",
|
||||
"react-native-permissions": "4.1.5",
|
||||
"react-native-reanimated": "3.6.1",
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# https://github.com/wix/react-native-navigation/issues/7819
|
||||
|
||||
--- ./node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter.kt
|
||||
+++ ./node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/topbar/button/ButtonPresenter-patched.kt
|
||||
@@ -194,8 +194,8 @@
|
||||
|
||||
class WixAccessibilityDelegateCompat: AccessibilityDelegateCompat(){
|
||||
override fun onInitializeAccessibilityNodeInfo(
|
||||
- host: View?,
|
||||
- info: AccessibilityNodeInfoCompat?
|
||||
+ host: View,
|
||||
+ info: AccessibilityNodeInfoCompat
|
||||
) {
|
||||
super.onInitializeAccessibilityNodeInfo(host, info)
|
||||
|
||||
@@ -216,4 +216,4 @@
|
||||
}
|
||||
|
||||
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
@@ -1,19 +0,0 @@
|
||||
# https://github.com/wix/react-native-navigation/issues/7819
|
||||
|
||||
--- ./node_modules/react-native-navigation/lib/android/app/build.gradle
|
||||
+++ ./node_modules/react-native-navigation/lib/android/app/build-patched.gradle
|
||||
@@ -62,11 +62,11 @@
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
- sourceCompatibility JavaVersion.VERSION_1_8
|
||||
- targetCompatibility JavaVersion.VERSION_1_8
|
||||
+ sourceCompatibility JavaVersion.VERSION_17
|
||||
+ targetCompatibility JavaVersion.VERSION_17
|
||||
}
|
||||
kotlinOptions {
|
||||
- jvmTarget = JavaVersion.VERSION_1_8
|
||||
+ jvmTarget = JavaVersion.VERSION_17
|
||||
}
|
||||
|
||||
flavorDimensions "RNN.reactNativeVersion"
|
||||
@@ -601,3 +601,11 @@
|
||||
(.createAccountFromMnemonicAndDeriveAccountsForPaths ^js (account-manager)
|
||||
(types/clj->json mnemonic)
|
||||
#(callback (types/json->clj %))))
|
||||
|
||||
(defn get-connection-string-for-exporting-keypairs-keystores
|
||||
"Generates connection string form status-go for the purpose of exporting keypairs and keystores on sender side"
|
||||
[config-json callback]
|
||||
(log/info "[native-module] Fetching Export Keypairs Connection String"
|
||||
{:fn :get-connection-string-for-exporting-keypairs-keystores
|
||||
:config-json config-json})
|
||||
(.getConnectionStringForExportingKeypairsKeystores ^js (network) config-json callback))
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
size 40
|
||||
customization-color (if (= type :primary) :blue nil)}}
|
||||
children]
|
||||
(when (string? children) (js/console.log "button - " children))
|
||||
(let [[pressed-state? set-pressed-state] (rn/use-state false)
|
||||
theme (quo.theme/use-theme)
|
||||
{:keys [icon-color background-color label-color border-color blur-type
|
||||
|
||||
@@ -181,6 +181,14 @@
|
||||
#(let [ret (handler)] (if (fn? ret) ret js/undefined))
|
||||
(get-js-deps deps))))
|
||||
|
||||
(defn use-layout-effect
|
||||
([handler]
|
||||
(use-layout-effect handler nil))
|
||||
([handler deps]
|
||||
(react/useLayoutEffect
|
||||
#(let [ret (handler)] (if (fn? ret) ret js/undefined))
|
||||
(get-js-deps deps))))
|
||||
|
||||
(defn use-mount
|
||||
[handler]
|
||||
(use-effect handler []))
|
||||
@@ -195,6 +203,35 @@
|
||||
([handler deps]
|
||||
(react/useCallback handler (get-js-deps deps))))
|
||||
|
||||
(defn use-fn-factory-factory
|
||||
"A dirty code translation from the form-2 solution `make-fn-factory`."
|
||||
[f]
|
||||
(let [*args1 (use-ref-atom nil)
|
||||
cached (use-ref-atom
|
||||
(fn [& args2]
|
||||
(apply f (concat @*args1 args2))))
|
||||
factory (use-ref-atom
|
||||
(fn factory
|
||||
[& args1]
|
||||
(reset! *args1 args1)
|
||||
@cached))]
|
||||
@factory))
|
||||
|
||||
(defn use-fn-factory
|
||||
[f & args]
|
||||
(let [factory (use-fn-factory-factory f)]
|
||||
(apply factory args)))
|
||||
|
||||
(defn make-fn-factory
|
||||
"Should be used in a form-2 component."
|
||||
[f]
|
||||
(let [*args1 (atom nil)
|
||||
cached (fn [& args2]
|
||||
(apply f (concat @*args1 args2)))]
|
||||
(fn [& args1]
|
||||
(reset! *args1 args1)
|
||||
cached)))
|
||||
|
||||
(defn use-memo
|
||||
[handler deps]
|
||||
(react/useMemo handler (get-js-deps deps)))
|
||||
|
||||
@@ -14,11 +14,11 @@
|
||||
[{:keys [on-press allow-multiple-presses? throttle-duration]} throttle-id]
|
||||
(if allow-multiple-presses?
|
||||
on-press
|
||||
(fn []
|
||||
(fn [event]
|
||||
(let [id @throttle-id]
|
||||
(when (and id (not (get @throttle id)))
|
||||
(swap! throttle assoc id true)
|
||||
(on-press)
|
||||
(on-press event)
|
||||
(js/setTimeout
|
||||
#(swap! throttle dissoc id)
|
||||
(or throttle-duration 500)))))))
|
||||
|
||||
@@ -3,32 +3,173 @@
|
||||
[quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[react-native.platform :as platform]
|
||||
[reagent.ratom]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.profile.contact.contact-request.style :as style]
|
||||
[status-im.contexts.profile.utils :as profile.utils]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn view
|
||||
;; ---
|
||||
|
||||
(def ^:private lookup-sentinel (js-obj))
|
||||
|
||||
(defn memo
|
||||
"Returns a memoized version of a referentially transparent function. The
|
||||
memoized version of the function keeps a cache of the mapping from arguments
|
||||
to results and, when calls with the same arguments are repeated often, has
|
||||
higher performance at the expense of higher memory use."
|
||||
[mem f]
|
||||
(fn [& args]
|
||||
(js/console.log "lookup")
|
||||
(let [v (get @mem args lookup-sentinel)]
|
||||
(if (identical? v lookup-sentinel)
|
||||
(let [ret (apply f args)]
|
||||
(js/console.log "swap")
|
||||
(swap! mem assoc args ret)
|
||||
ret)
|
||||
v))))
|
||||
|
||||
(defn make-snapshot-handler-factory
|
||||
[snapshot]
|
||||
(let [storage (rn/use-memo #(atom {}) [])
|
||||
capture (rn/use-memo #(atom snapshot) [])
|
||||
_update (rn/use-layout-effect
|
||||
(fn []
|
||||
(swap! capture (fn [_] snapshot)))
|
||||
snapshot)
|
||||
factory (rn/use-memo
|
||||
(fn []
|
||||
(fn [handler]
|
||||
((memo storage
|
||||
(fn [callback]
|
||||
(fn [event]
|
||||
(callback @capture event))))
|
||||
handler)))
|
||||
[storage capture])]
|
||||
{:factory factory
|
||||
:storage storage}))
|
||||
|
||||
(defn use-bind-snapshot
|
||||
[snapshot]
|
||||
(let [{:keys [factory storage]}
|
||||
(make-snapshot-handler-factory snapshot)]
|
||||
(rn/use-unmount (fn []
|
||||
(js/console.log "unmount bind-snapshot")
|
||||
(prn "unmount storage" storage)))
|
||||
factory))
|
||||
|
||||
;; ---
|
||||
|
||||
(defn on-message-submit
|
||||
[public-key message _event]
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(rf/dispatch [:contact.ui/send-contact-request public-key message])
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:id :send-contact-request
|
||||
:type :positive
|
||||
:text (i18n/label
|
||||
:t/contact-request-was-sent)}]))
|
||||
|
||||
(defn on-message-change
|
||||
[set-message full-name message-text]
|
||||
;; This is just an example tap to check that when full-name is recomputed,
|
||||
;; this function sees the most up-to-date value.
|
||||
(tap> [:on-message-change full-name message-text])
|
||||
(set-message message-text))
|
||||
|
||||
(defn use-event
|
||||
[f scope]
|
||||
(let [bind (use-bind-snapshot scope)]
|
||||
(bind f)))
|
||||
|
||||
(defn use-events
|
||||
[fs scope]
|
||||
(let [bind (use-bind-snapshot scope)]
|
||||
(->> fs
|
||||
(reduce-kv
|
||||
(fn [acc label f]
|
||||
(assoc acc label (bind f)))
|
||||
{}))))
|
||||
|
||||
(defn view--using-factory-with-form-2
|
||||
[]
|
||||
(let [on-change-factory (rn/make-fn-factory on-message-change)
|
||||
on-submit-factory (rn/make-fn-factory on-message-submit)]
|
||||
(fn []
|
||||
(let [{:keys [public-key customization-color]
|
||||
:as profile} (rf/sub [:contacts/current-contact])
|
||||
full-name (profile.utils/displayed-name profile)
|
||||
profile-picture (profile.utils/photo profile)
|
||||
input-ref (rn/use-ref-atom nil)
|
||||
[message set-message] (rn/use-state "")
|
||||
on-change (on-change-factory set-message full-name)
|
||||
on-submit (on-submit-factory public-key message)]
|
||||
(rn/use-mount
|
||||
(fn []
|
||||
(let [listener (.addListener rn/keyboard
|
||||
"keyboardDidHide"
|
||||
(fn [_event]
|
||||
(when (and platform/android? @input-ref)
|
||||
(.blur ^js @input-ref))))]
|
||||
#(.remove ^js listener))))
|
||||
[:<>
|
||||
[quo/drawer-top
|
||||
{:type :context-tag
|
||||
:context-tag-type :default
|
||||
:title (i18n/label :t/send-contact-request)
|
||||
:full-name full-name
|
||||
:profile-picture profile-picture
|
||||
:customization-color customization-color}]
|
||||
[quo/text {:style style/message-prompt-wrapper}
|
||||
(i18n/label :t/contact-request-message-prompt)]
|
||||
[rn/view {:style style/message-input-wrapper}
|
||||
[quo/input
|
||||
{:type :text
|
||||
:ref #(reset! input-ref %)
|
||||
:multiline? true
|
||||
:char-limit constants/contact-request-message-max-length
|
||||
:max-length constants/contact-request-message-max-length
|
||||
:placeholder (i18n/label :t/type-something)
|
||||
:auto-focus true
|
||||
:accessibility-label :contact-request-message
|
||||
:label (i18n/label :t/message)
|
||||
:on-change-text on-change
|
||||
:container-style {:flex-shrink 1}
|
||||
:input-container-style {:flex-shrink 1}}]]
|
||||
[quo/bottom-actions
|
||||
{:container-style {:style {:flex 1}}
|
||||
:actions :one-action
|
||||
:button-one-props {:disabled? (string/blank? message)
|
||||
:accessibility-label :send-contact-request
|
||||
:customization-color :purple
|
||||
:on-press on-submit}
|
||||
:button-one-label "Past Present Sub"}]
|
||||
[quo/bottom-actions
|
||||
{:container-style {:style {:flex 1}}
|
||||
:actions :two-actions
|
||||
:button-one-props {:accessibility-label :send-contact-request
|
||||
:customization-color :blue
|
||||
:on-press on-submit}
|
||||
:button-one-label "Snapshot"
|
||||
:button-two-props {:accessibility-label :test-button
|
||||
:customization-color :orange
|
||||
:on-press on-submit}
|
||||
:button-two-label "Sub"}]]))))
|
||||
|
||||
(defn view--using-factory-hook
|
||||
[]
|
||||
(let [{:keys [public-key customization-color]
|
||||
:as profile} (rf/sub [:contacts/current-contact])
|
||||
customization-color customization-color
|
||||
full-name (profile.utils/displayed-name profile)
|
||||
profile-picture (profile.utils/photo profile)
|
||||
input-ref (rn/use-ref-atom nil)
|
||||
[message set-message] (rn/use-state "")
|
||||
on-message-change (rn/use-callback #(set-message %))
|
||||
on-message-submit (rn/use-callback (fn []
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(rf/dispatch [:contact.ui/send-contact-request
|
||||
public-key message])
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:id :send-contact-request
|
||||
:type :positive
|
||||
:text (i18n/label
|
||||
:t/contact-request-was-sent)}]))
|
||||
[public-key message])]
|
||||
on-change (rn/use-fn-factory on-message-change set-message full-name)
|
||||
on-submit (rn/use-fn-factory on-message-submit public-key message)]
|
||||
;; `on-change` is always the same function instance, even if the arguments
|
||||
;; `set-message` and `full-name` change.
|
||||
(tap> {:hashes {:on-change (hash on-change)}})
|
||||
(rn/use-mount
|
||||
(fn []
|
||||
(let [listener (.addListener rn/keyboard
|
||||
@@ -58,7 +199,7 @@
|
||||
:auto-focus true
|
||||
:accessibility-label :contact-request-message
|
||||
:label (i18n/label :t/message)
|
||||
:on-change-text on-message-change
|
||||
:on-change-text on-change
|
||||
:container-style {:flex-shrink 1}
|
||||
:input-container-style {:flex-shrink 1}}]]
|
||||
[quo/bottom-actions
|
||||
@@ -66,7 +207,19 @@
|
||||
:actions :one-action
|
||||
:button-one-props {:disabled? (string/blank? message)
|
||||
:accessibility-label :send-contact-request
|
||||
:customization-color customization-color
|
||||
:on-press on-message-submit}
|
||||
:button-one-label (i18n/label :t/send-contact-request)}]]))
|
||||
:customization-color :purple
|
||||
:on-press on-submit}
|
||||
:button-one-label "Past Present Sub"}]
|
||||
[quo/bottom-actions
|
||||
{:container-style {:style {:flex 1}}
|
||||
:actions :two-actions
|
||||
:button-one-props {:accessibility-label :send-contact-request
|
||||
:customization-color :blue
|
||||
:on-press on-submit}
|
||||
:button-one-label "Snapshot"
|
||||
:button-two-props {:accessibility-label :test-button
|
||||
:customization-color :orange
|
||||
:on-press on-submit}
|
||||
:button-two-label "Sub"}]]))
|
||||
|
||||
(def view view--using-factory-hook)
|
||||
|
||||
@@ -1,8 +1,12 @@
|
||||
(ns status-im.contexts.settings.wallet.events
|
||||
(:require
|
||||
[native-module.core :as native-module]
|
||||
[status-im.contexts.syncing.utils :as sync-utils]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]
|
||||
[utils.transforms :as transforms]))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/rename-keypair-success
|
||||
@@ -30,3 +34,22 @@
|
||||
:on-error #(log/info "failed to rename keypair " %)}]]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/rename-keypair rename-keypair)
|
||||
|
||||
(defn get-key-pair-export-connection
|
||||
[{:keys [db]} [{:keys [sha3-pwd keypair-key-uid callback]}]]
|
||||
(let [key-uid (get-in db [:profile/profile :key-uid])
|
||||
config-map (transforms/clj->json {:senderConfig {:loggedInKeyUid key-uid
|
||||
:keystorePath ""
|
||||
:keypairsToExport [keypair-key-uid]
|
||||
:password (security/safe-unmask-data
|
||||
sha3-pwd)}
|
||||
:serverConfig {:timeout 0}})
|
||||
handle-connection (fn [response]
|
||||
(when (sync-utils/valid-connection-string? response)
|
||||
(callback response)
|
||||
(rf/dispatch [:hide-bottom-sheet])))]
|
||||
(native-module/get-connection-string-for-exporting-keypairs-keystores
|
||||
config-map
|
||||
handle-connection)))
|
||||
|
||||
(rf/reg-event-fx :wallet/get-key-pair-export-connection get-key-pair-export-connection)
|
||||
|
||||
@@ -7,13 +7,23 @@
|
||||
[data]
|
||||
(rf/dispatch [:open-modal :screen/settings.rename-keypair data]))
|
||||
|
||||
(defn on-show-qr
|
||||
[data]
|
||||
(rf/dispatch [:open-modal :screen/settings.encrypted-key-pair-qr data]))
|
||||
|
||||
(defn view
|
||||
[props data]
|
||||
[:<>
|
||||
[quo/drawer-top props]
|
||||
[quo/action-drawer
|
||||
[(when (= (:type props) :keypair)
|
||||
[{:icon :i/edit
|
||||
:accessibility-label :rename-key-pair
|
||||
:label (i18n/label :t/rename-key-pair)
|
||||
:on-press #(on-rename-request data)}])]]])
|
||||
(let [has-paired-device (rf/sub [:pairing/has-paired-devices])]
|
||||
[:<>
|
||||
[quo/drawer-top props]
|
||||
[quo/action-drawer
|
||||
[(when has-paired-device
|
||||
[{:icon :i/qr-code
|
||||
:accessibility-label :show-key-pr-qr
|
||||
:label (i18n/label :t/show-encrypted-qr-of-key-pairs)
|
||||
:on-press #(on-show-qr data)}])
|
||||
(when (= (:type props) :keypair)
|
||||
[{:icon :i/edit
|
||||
:accessibility-label :rename-key-pair
|
||||
:label (i18n/label :t/rename-key-pair)
|
||||
:on-press #(on-rename-request data)}])]]]))
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.countdown.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[quo.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.hooks :as hooks]
|
||||
[utils.datetime :as datetime]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(def code-valid-for-ms 120000)
|
||||
(def one-min-ms 60000)
|
||||
|
||||
(defn current-ms
|
||||
[]
|
||||
(* 1000 (js/Math.ceil (/ (datetime/timestamp) 1000))))
|
||||
|
||||
(defn view
|
||||
[on-clear]
|
||||
(let [[valid-for-ms set-valid-for-ms] (rn/use-state code-valid-for-ms)
|
||||
[timestamp set-timestamp] (rn/use-state current-ms)
|
||||
clock (rn/use-callback (fn []
|
||||
(let [remaining (- code-valid-for-ms
|
||||
(- (current-ms)
|
||||
timestamp))]
|
||||
(when (pos? remaining)
|
||||
(set-valid-for-ms remaining))
|
||||
(when (zero? remaining)
|
||||
(set-timestamp (current-ms))
|
||||
(set-valid-for-ms code-valid-for-ms)
|
||||
(on-clear))))
|
||||
[code-valid-for-ms])]
|
||||
(hooks/use-interval clock on-clear 1000)
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:style {:color (if (< valid-for-ms one-min-ms)
|
||||
colors/danger-60
|
||||
colors/white-opa-40)}}
|
||||
(i18n/label :t/valid-for-time {:valid-for (datetime/ms-to-duration valid-for-ms)})]))
|
||||
@@ -0,0 +1,46 @@
|
||||
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.style
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]
|
||||
[react-native.safe-area :as safe-area]))
|
||||
|
||||
(defn container-main
|
||||
[]
|
||||
{:background-color colors/neutral-95
|
||||
:padding-top (safe-area/get-top)
|
||||
:flex 1})
|
||||
|
||||
(def page-container
|
||||
{:margin-top 14
|
||||
:margin-horizontal 20})
|
||||
|
||||
(def title-container
|
||||
{:flex-direction :row
|
||||
:align-items :center
|
||||
:justify-content :space-between})
|
||||
|
||||
(def standard-auth
|
||||
{:margin-top 12
|
||||
:flex 1})
|
||||
|
||||
(def qr-container
|
||||
{:margin-top 12
|
||||
:background-color colors/white-opa-5
|
||||
:border-radius 20
|
||||
:flex 1
|
||||
:padding 12})
|
||||
|
||||
(def sub-text-container
|
||||
{:margin-bottom 8
|
||||
:justify-content :space-between
|
||||
:align-items :center
|
||||
:flex-direction :row})
|
||||
|
||||
(def valid-cs-container
|
||||
{:flex 1
|
||||
:margin 12})
|
||||
|
||||
(def warning-text
|
||||
{:margin-horizontal 16
|
||||
:margin-top 20
|
||||
:text-align :center
|
||||
:color colors/white-opa-70})
|
||||
@@ -0,0 +1,98 @@
|
||||
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[quo.foundations.colors :as colors]
|
||||
[react-native.clipboard :as clipboard]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.qr-codes.view :as qr-codes]
|
||||
[status-im.common.resources :as resources]
|
||||
[status-im.common.standard-authentication.core :as standard-auth]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.countdown.view :as countdown]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.style :as style]
|
||||
[status-im.contexts.syncing.utils :as sync-utils]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn navigate-back [] (rf/dispatch [:navigate-back]))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [{:keys [key-uid]} (rf/sub [:get-screen-params])
|
||||
{:keys [customization-color]} (rf/sub [:profile/profile-with-image])
|
||||
[code set-code] (rn/use-state nil)
|
||||
valid-connection-string? (rn/use-memo #(sync-utils/valid-connection-string? code) [code])
|
||||
validate-and-set-code (rn/use-callback (fn [connection-string]
|
||||
(when (sync-utils/valid-connection-string?
|
||||
connection-string)
|
||||
(set-code connection-string))))
|
||||
cleanup-clock (rn/use-callback #(set-code nil))
|
||||
on-auth-success (rn/use-callback (fn [entered-password]
|
||||
(rf/dispatch
|
||||
[:wallet/get-key-pair-export-connection
|
||||
{:sha3-pwd entered-password
|
||||
:keypair-key-uid key-uid
|
||||
:callback validate-and-set-code}]))
|
||||
[key-uid])]
|
||||
[rn/view {:style (style/container-main)}
|
||||
[rn/scroll-view
|
||||
[quo/page-nav
|
||||
{:type :no-title
|
||||
:icon-name :i/close
|
||||
:background :blur
|
||||
:on-press navigate-back}]
|
||||
[rn/view {:style style/page-container}
|
||||
[rn/view {:style style/title-container}
|
||||
[quo/text
|
||||
{:size :heading-1
|
||||
:weight :semi-bold
|
||||
:style {:color colors/white}}
|
||||
(i18n/label :t/encrypted-key-pairs)]]
|
||||
[rn/view {:style style/qr-container}
|
||||
(if valid-connection-string?
|
||||
[qr-codes/qr-code {:url code}]
|
||||
[rn/view {:style {:flex-direction :row}}
|
||||
[rn/image
|
||||
{:source (resources/get-image :qr-code)
|
||||
:style {:width "100%"
|
||||
:background-color colors/white-opa-70
|
||||
:border-radius 12
|
||||
:aspect-ratio 1}}]])
|
||||
(when valid-connection-string?
|
||||
[rn/view {:style style/valid-cs-container}
|
||||
[rn/view {:style style/sub-text-container}
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:style {:color colors/white-opa-40}}
|
||||
(i18n/label :t/encrypted-key-pairs-code)]
|
||||
[countdown/view cleanup-clock]]
|
||||
[quo/input
|
||||
{:default-value code
|
||||
:type :password
|
||||
:default-shown? true
|
||||
:editable false}]
|
||||
[quo/button
|
||||
{:on-press (fn []
|
||||
(clipboard/set-string code)
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :positive
|
||||
:text (i18n/label
|
||||
:t/sharing-copied-to-clipboard)}]))
|
||||
:type :grey
|
||||
:container-style {:margin-top 12}
|
||||
:icon-left :i/copy}
|
||||
(i18n/label :t/copy-qr)]])
|
||||
(when-not valid-connection-string?
|
||||
[rn/view {:style style/standard-auth}
|
||||
[standard-auth/slide-button
|
||||
{:blur? true
|
||||
:size :size-40
|
||||
:track-text (i18n/label :t/slide-to-reveal-qr-code)
|
||||
:customization-color customization-color
|
||||
:on-auth-success on-auth-success
|
||||
:auth-button-label (i18n/label :t/reveal-qr-code)
|
||||
:auth-button-icon-left :i/reveal}]])]]
|
||||
(when-not valid-connection-string?
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:style style/warning-text}
|
||||
(i18n/label :t/make-sure-no-camera-warning)])]]))
|
||||
@@ -57,6 +57,8 @@
|
||||
[status-im.contexts.profile.settings.screens.password.change-password.view :as change-password]
|
||||
[status-im.contexts.profile.settings.screens.password.view :as settings-password]
|
||||
[status-im.contexts.profile.settings.view :as settings]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.encrypted-qr.view :as
|
||||
encrypted-key-pair-qr]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.rename.view :as keypair-rename]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.view :as keypairs-and-accounts]
|
||||
[status-im.contexts.settings.wallet.network-settings.view :as network-settings]
|
||||
@@ -509,6 +511,10 @@
|
||||
:options (assoc options/dark-screen :sheet? true)
|
||||
:component keypair-rename/view}
|
||||
|
||||
{:name :screen/settings.encrypted-key-pair-qr
|
||||
:options options/transparent-screen-options
|
||||
:component encrypted-key-pair-qr/view}
|
||||
|
||||
{:name :screen/settings.saved-addresses
|
||||
:options options/transparent-modal-screen-options
|
||||
:component saved-addresses-settings/view}
|
||||
|
||||
@@ -28,3 +28,9 @@
|
||||
:<- [:syncing]
|
||||
(fn [syncing]
|
||||
(:pairing-status syncing)))
|
||||
|
||||
(re-frame/reg-sub
|
||||
:pairing/has-paired-devices
|
||||
:<- [:pairing/enabled-installations]
|
||||
(fn [installations]
|
||||
(> (count installations) 1)))
|
||||
|
||||
Binary file not shown.
@@ -524,6 +524,8 @@
|
||||
"enable": "Enable",
|
||||
"enable-notifications-sub-title": "Receive notifications about your new messages or wallet transactions",
|
||||
"encrypt-with-password": "Encrypt with password",
|
||||
"encrypted-key-pairs": "Encrypted key pairs",
|
||||
"encrypted-key-pairs-code": "Encrypted key pairs code",
|
||||
"ending-not-allowed": "{{ending}} ending is not allowed",
|
||||
"ends-with-space": "Cannot end with space",
|
||||
"ens-10-SNT": "10 SNT",
|
||||
@@ -939,6 +941,7 @@
|
||||
"main-wallet": "Main Wallet",
|
||||
"make-admin": "Make admin",
|
||||
"make-moderator": "Make moderator",
|
||||
"make-sure-no-camera-warning": "Make sure no camera or person can see this screen before revealing",
|
||||
"manage-keys-and-storage": "Manage keys and storage",
|
||||
"mark-as-read": "Mark as read",
|
||||
"mark-all-read": "Mark all read",
|
||||
@@ -1272,6 +1275,7 @@
|
||||
"reset-card-description": "This operation will reset card to initial state. It will erase all card data including private keys. Operation is not reversible.",
|
||||
"retry": "Retry",
|
||||
"reveal-sync-code": "Reveal sync code",
|
||||
"reveal-qr-code": "Reveal QR code",
|
||||
"revoke-access": "Revoke access",
|
||||
"save": "Save",
|
||||
"save-address": "Save address",
|
||||
@@ -1337,6 +1341,7 @@
|
||||
"show-more": "Show more",
|
||||
"show-qr": "Show QR code",
|
||||
"show-transaction-data": "Show transaction data",
|
||||
"show-encrypted-qr-of-key-pairs": "Show encrypted QR of key pairs on device",
|
||||
"sign-and-send": "Sign and send",
|
||||
"sign-in": "Sign in",
|
||||
"sign-message": "Sign Message",
|
||||
@@ -1970,6 +1975,7 @@
|
||||
"slide-to-request-to-join": "Slide to request to join",
|
||||
"slide-to-reveal-code": "Slide to reveal code",
|
||||
"slide-to-create-account": "Slide to create account",
|
||||
"slide-to-reveal-qr-code": "Slide to reveal QR code",
|
||||
"minimum-received": "Minimum received",
|
||||
"powered-by-paraswap": "Powered by Paraswap",
|
||||
"priority": "Priority",
|
||||
|
||||
@@ -9281,10 +9281,10 @@ react-native-lottie-splash-screen@^1.0.1:
|
||||
lottie-ios "3.2.3"
|
||||
lottie-react-native "^5.1.3"
|
||||
|
||||
react-native-navigation@7.38.3:
|
||||
version "7.38.3"
|
||||
resolved "https://registry.yarnpkg.com/react-native-navigation/-/react-native-navigation-7.38.3.tgz#ce1715bcf51a37296792e8f39ae8d1a4da3593a7"
|
||||
integrity sha512-KCelGUYcUe+UreiEofjG6lBf6ie9+1xvFr77+GbTVCPCsO2GkBOuy8R/B3eoZvobLhalcLMHzka/bN9BLGUeeQ==
|
||||
react-native-navigation@7.39.0:
|
||||
version "7.39.0"
|
||||
resolved "https://registry.yarnpkg.com/react-native-navigation/-/react-native-navigation-7.39.0.tgz#41655d5a822d53362dc1028e5d185d167f52f0bb"
|
||||
integrity sha512-7xc4aGp3v/Eeh8MgIjApoZEE0GuefiMRQh/wpa43t1l1v5hqxzYV9J6dMd5XLzSbIYnJ1ZLd0gCHR5WQdE4O2Q==
|
||||
dependencies:
|
||||
hoist-non-react-statics "3.x.x"
|
||||
lodash "4.17.x"
|
||||
|
||||
Reference in New Issue
Block a user