Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b532b8e839 | ||
|
|
0bcef84f04 | ||
|
|
fde7f3df93 | ||
|
|
d43e8881ef | ||
|
|
75c8437cc5 | ||
|
|
f1310c7e6c | ||
|
|
d7530dfbee | ||
|
|
0d6bd9c15d | ||
|
|
2da6d9dffb | ||
|
|
879a4067e5 | ||
|
|
e1317f503f | ||
|
|
ec00ddf10e | ||
|
|
c0e10b7c6f | ||
|
|
da449bcd17 | ||
|
|
ab93088d93 | ||
|
|
b4a0e74a4a | ||
|
|
379ba87c16 | ||
|
|
901dddc603 | ||
|
|
9300377c6c | ||
|
|
9445363467 | ||
|
|
5bad8de886 | ||
|
|
577dc16188 | ||
|
|
00d288fb94 | ||
|
|
6ea39b5096 | ||
|
|
d7c66319aa | ||
|
|
5193f981f8 | ||
|
|
615ad2f02b | ||
|
|
0d6c553f3f | ||
|
|
55ec84a5c3 | ||
|
|
2c6ab52a1a | ||
|
|
93e2c31a8f | ||
|
|
541b2e0909 | ||
|
|
81cb058e29 | ||
|
|
24194fb34e | ||
|
|
039ad8d162 | ||
|
|
abc0da1f00 | ||
|
|
4ff73a8a6a | ||
|
|
86bbe2e8c7 | ||
|
|
aa159f53ef | ||
|
|
e04c7f449f | ||
|
|
dafab10582 | ||
|
|
c37a2a5d6f | ||
|
|
630be6685d | ||
|
|
36be518174 | ||
|
|
0e76e88a81 | ||
|
|
cb4ce20c98 | ||
|
|
c03d91bcb0 | ||
|
|
2ebe8fd4c9 | ||
|
|
382c810199 | ||
|
|
aa1a306294 | ||
|
|
2e61b56214 | ||
|
|
19be1382db | ||
|
|
5559599381 |
@@ -0,0 +1,21 @@
|
||||
(ns cljs.test
|
||||
(:require [clj-kondo.hooks-api :as hooks]))
|
||||
|
||||
(defn deftest
|
||||
"Verify test name passed to `cljs.test/deftest` is suffixed with -test and not
|
||||
prefixed with test-."
|
||||
[{:keys [node]}]
|
||||
(let [[_ test-name-node & _] (:children node)
|
||||
test-name (str (hooks/sexpr test-name-node))]
|
||||
(when (and (hooks/token-node? test-name-node)
|
||||
(or (not (re-find #"^.*-test$" test-name))
|
||||
(re-find #"^test-.*$" test-name)))
|
||||
(hooks/reg-finding! (assoc (meta test-name-node)
|
||||
:message "Test name should be suffixed with -test"
|
||||
:type :status-im.linter/inconsistent-test-name)))))
|
||||
|
||||
(comment
|
||||
;; Invalid
|
||||
(deftest {:node (hooks/parse-string "(deftest foo-tes (println :hello))")})
|
||||
(deftest {:node (hooks/parse-string "(deftest test-foo-test (println :hello))")})
|
||||
)
|
||||
@@ -4,5 +4,8 @@
|
||||
test-helpers.component/get-all-by-translation-text utils.i18n/label
|
||||
test-helpers.component/get-by-translation-text utils.i18n/label
|
||||
test-helpers.component/query-all-by-translation-text utils.i18n/label
|
||||
test-helpers.component/query-by-translation-text utils.i18n/label}}
|
||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
|
||||
test-helpers.component/query-by-translation-text utils.i18n/label
|
||||
|
||||
cljs.test/deftest cljs.test/deftest}}
|
||||
:linters {:status-im.linter/invalid-translation-keyword {:level :error}
|
||||
:status-im.linter/inconsistent-test-name {:level :error}}}
|
||||
|
||||
@@ -83,6 +83,9 @@ shim.js
|
||||
figwheel_server.log
|
||||
.nrepl-port
|
||||
|
||||
# FlowStorm (Clojure debugger)
|
||||
repl-client-debug
|
||||
|
||||
# Lein
|
||||
#
|
||||
.lein-failures
|
||||
|
||||
@@ -401,6 +401,17 @@ test-component: ##@test Run component tests once in NodeJS
|
||||
yarn shadow-cljs compile component-test && \
|
||||
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
|
||||
|
||||
# Reference: https://flow-storm.github.io/flow-storm-debugger/user_guide.html#_debugging_react_native_applications
|
||||
run-flow-storm: export SHADOW_CLJS_BUILD_ID := :mobile
|
||||
run-flow-storm: export TARGET := clojure
|
||||
run-flow-storm: export GDK_DPI_SCALE := 1.0
|
||||
run-flow-storm: ##@run Start FlowStorm debugger
|
||||
clj -Sforce -Sdeps '{:deps {com.github.jpmonettas/flow-storm-dbg {:mvn/version "3.7.5"}}}' \
|
||||
-X flow-storm.debugger.main/start-debugger \
|
||||
:port 7888 \
|
||||
:repl-type :shadow \
|
||||
:build-id $(SHADOW_CLJS_BUILD_ID)
|
||||
|
||||
#--------------
|
||||
# Other
|
||||
#--------------
|
||||
@@ -423,11 +434,13 @@ android-clean: ##@prepare Clean Gradle state
|
||||
rm -rf ~/.gradle
|
||||
|
||||
|
||||
android-ports: export FLOWSTORM_PORT := 7722
|
||||
android-ports: export TARGET := android-sdk
|
||||
android-ports: ##@other Add proxies to Android Device/Simulator
|
||||
adb reverse tcp:8081 tcp:8081 && \
|
||||
adb reverse tcp:3449 tcp:3449 && \
|
||||
adb reverse tcp:4567 tcp:4567 && \
|
||||
adb reverse tcp:$(FLOWSTORM_PORT) tcp:$(FLOWSTORM_PORT) && \
|
||||
adb forward tcp:5561 tcp:5561
|
||||
|
||||
android-devices: export TARGET := android-sdk
|
||||
|
||||
@@ -123,7 +123,6 @@ pipeline {
|
||||
post {
|
||||
always { script {
|
||||
nix.shell('nix-store --optimize', pure: false)
|
||||
nix.shell('nix/scripts/clean.sh', pure: false)
|
||||
} }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,6 +20,39 @@ A server will be started at http://localhost:4567. It might show "not connected"
|
||||
|
||||
More details about re-frisk are on the [project page](https://github.com/flexsurfer/re-frisk).
|
||||
|
||||
## Debugging with FlowStorm
|
||||
|
||||
[FlowStorm](http://www.flow-storm.org/) is a free and open-source time-travel
|
||||
debugger for Clojure and ClojureScript. It is capable of recording almost any
|
||||
code execution path in the Status' mobile app.
|
||||
|
||||
FlowStorm is independent of editor/IDE, but a tighter [integration with
|
||||
Emacs](https://github.com/jpmonettas/cider-storm) is available.
|
||||
|
||||
If you are developing with Android, run `make android-ports` first. If you are
|
||||
behind a firewall, allow TCP traffic on port `7722`, then:
|
||||
|
||||
```bash
|
||||
make run-flow-storm
|
||||
```
|
||||
|
||||
You will know FlowStorm is correctly running if you see the status bar with
|
||||
green `REPL` and `RUNTIME` indicators.
|
||||
|
||||
With FlowStorm running, you can now add `#trace` on any top-level form, reload
|
||||
the code, or evaluate the traced form in the REPL, and FlowStorm will start
|
||||
recording data. Avoid `#rtrace` (with `r`) because it can cause massive spikes
|
||||
in CPU which will make the app hang and you might need to forcefully kill
|
||||
processes.
|
||||
|
||||
```clojure
|
||||
#trace ; => Add this line to tell FlowStorm to instrument the function.
|
||||
(defn say-hello []
|
||||
(str "Hello world"))
|
||||
```
|
||||
|
||||
There are other ways to debug, but this is a good start.
|
||||
|
||||
## Enabling debug logs
|
||||
Calls to `log/debug` will not be printed to the console by default. It can be enabled under "Advanced settings" in the app:
|
||||
|
||||
|
||||
@@ -82,6 +82,8 @@
|
||||
<string>Photos access is required to give you the ability to save images.</string>
|
||||
<key>NSPhotoLibraryUsageDescription</key>
|
||||
<string>Photos access is required to give you the ability to send images.</string>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>Status uses Media Library to save and send Images. The Media Library module internally requires permissions to Apple Music</string>
|
||||
<key>UIAppFonts</key>
|
||||
<array>
|
||||
<string>Inter-Bold.otf</string>
|
||||
|
||||
@@ -26,8 +26,6 @@
|
||||
<string>A00000080400010301</string>
|
||||
<string>A000000151000000</string>
|
||||
</array>
|
||||
<key>NSAppleMusicUsageDescription</key>
|
||||
<string>Play audio messages</string>
|
||||
<key>NFCReaderUsageDescription</key>
|
||||
<string>Enable Keycard</string>
|
||||
</dict>
|
||||
|
||||
+12
@@ -88,4 +88,16 @@ class NetworkManager(private val reactContext: ReactApplicationContext) : ReactC
|
||||
callback)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun inputConnectionStringForImportingKeypairsKeystores(connectionString: String, configJSON: String, callback: Callback) {
|
||||
val jsonConfig = JSONObject(configJSON)
|
||||
val receiverConfig = jsonConfig.getJSONObject("receiverConfig")
|
||||
val keyStorePath = utils.pathCombine(utils.getNoBackupDirectory(), "/keystore")
|
||||
receiverConfig.put("keystorePath", keyStorePath)
|
||||
|
||||
utils.executeRunnableStatusGoMethod(
|
||||
{ Statusgo.inputConnectionStringForImportingKeypairsKeystores(connectionString, jsonConfig.toString()) },
|
||||
callback
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -124,4 +124,23 @@ RCT_EXPORT_METHOD(getConnectionStringForExportingKeypairsKeystores:(NSString *)c
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(inputConnectionStringForImportingKeypairsKeystores:(NSString *)cs
|
||||
configJSON:(NSString *)configJSON
|
||||
callback:(RCTResponseSenderBlock)callback) {
|
||||
|
||||
NSData *configData = [configJSON dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSError *error;
|
||||
NSMutableDictionary *configDict = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:&error];
|
||||
NSMutableDictionary *receiverConfig = configDict[@"receiverConfig"];
|
||||
NSFileManager *fileManager = [NSFileManager defaultManager];
|
||||
NSURL *rootUrl =[[fileManager URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask] lastObject];
|
||||
NSURL *multiaccountKeystoreDir = [rootUrl URLByAppendingPathComponent:@"keystore"];
|
||||
NSString *keystoreDir = multiaccountKeystoreDir.path;
|
||||
|
||||
[receiverConfig setValue:keystoreDir forKey:@"keystorePath"];
|
||||
NSString *modifiedConfigJSON = [Utils jsonStringWithPrettyPrint:NO fromDictionary:configDict];
|
||||
NSString *result = StatusgoInputConnectionStringForImportingKeypairsKeystores(cs, modifiedConfigJSON);
|
||||
callback(@[result]);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+486
-27
@@ -1,4 +1,13 @@
|
||||
[
|
||||
{
|
||||
"path": "aopalliance/aopalliance/1.0/aopalliance-1.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "0235ba8b489512805ac13a8f9ea77a1ca5ebe3e8",
|
||||
"sha256": "023a6xwv1kd9c4dq9jrsbvvj6398hgbr302w7h8kzkgd1xkyrp8a"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "args4j/args4j/2.33/args4j-2.33",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -90,29 +99,20 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "cider/cider-nrepl/0.44.0/cider-nrepl-0.44.0",
|
||||
"path": "cider/cider-nrepl/0.31.0/cider-nrepl-0.31.0",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "c3d3a729beaa728d0ee6a3678a48c880b6bc95f1",
|
||||
"sha256": "0klcppvydxlx9ji376mvz40yv3s7awq6p9yd57wigpfy4m2yv0w6"
|
||||
"sha1": "1f28a4a834a7a46cf24def971b1a705a6795c73a",
|
||||
"sha256": "0h4pyzy8rzzh567khvimw2cs8jr640kqxgaxvbfx1s5yfp56fka2"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "cider/orchard/0.21.0/orchard-0.21.0",
|
||||
"path": "cider/piggieback/0.4.1/piggieback-0.4.1",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "073617f16a132c7f20608d971244753d4e704129",
|
||||
"sha256": "1n2afbyhw9x9kvfna4m4x6n6pwjiqsqcayql644bw2932i1isrkj"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "cider/piggieback/0.5.2/piggieback-0.5.2",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "ecfd5c286a85db3f059e75c37fca5722d9e26f79",
|
||||
"sha256": "1ps9yf3cxmlm447hqkidjb5xry90n0wl3jk0jn28fagq31lzylkl"
|
||||
"sha1": "0a02a3e2ecd7a126ab60d8a44793342f20ced79b",
|
||||
"sha256": "142vl5np33akcrnn6pksi0rjfsmmi528villxsj6cwcndvybiw4m"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -161,6 +161,42 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/cognitect/aws/api/0.8.612/api-0.8.612",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "6bf53a6a318693e086bec6246a63b193f981b386",
|
||||
"sha256": "174csbi2whfqqw1pnna1a7pxwfa3q39marrs0sqjrwsvzqkwakvl"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/cognitect/aws/endpoints/1.1.12.321/endpoints-1.1.12.321",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "3bec2d7c7fe3b22b709e3ef8244d8f34406f3a8d",
|
||||
"sha256": "18mz7n8f07ki35h5v7v60rw9fh02fayda9l9cfa7bjy7w4a1yl1f"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/cognitect/aws/s3/822.2.1145.0/s3-822.2.1145.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "0c4d7c1bc3baa4a05c7ebdf6b672259f56a16d7e",
|
||||
"sha256": "0fhgikpn4ns494gaq1y8gch95silx1snvkg1n62ysnf1zyk42ckh"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/cognitect/http-client/1.0.115/http-client-1.0.115",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "1a84a105c286d00557cc6c3e96932e40439b387a",
|
||||
"sha256": "0k2dnyx4jywgzfizz9i9yb2v04cvzbqvyhyp2nv1pll0blv8h38v"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/cognitect/transit-clj/1.0.329/transit-clj-1.0.329",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -233,6 +269,24 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/github/jpmonettas/flow-storm-inst/3.7.5/flow-storm-inst-3.7.5",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "c76d1e07f3914d3f1c669d1aadc469037e7cff00",
|
||||
"sha256": "0xzygzibqslhsl90zxfm6k2izmvzrm5wixrb0xzfcihf9bwn9nya"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/github/jpmonettas/hansel/0.1.78/hansel-0.1.78",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "a4d916f9882f748201003880d2ee440e448b912f",
|
||||
"sha256": "0d3x5pab6p4mykmxhspz17w4zwcp52g7gmzma3vqsn4ym24xr5qm"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -305,6 +359,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/inject/guice/4.2.2/guice-4.2.2-no_aop",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "fa13659f9128f4c011c8e1d06f137083b4876377",
|
||||
"sha256": "1zxg79l9jv86ar71pmw3abr43dgrgjz2hwbzifrx5909hsr5ykqg"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -503,6 +566,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "io/github/clojure/tools.build/0.9.4/tools.build-0.9.4",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "5d0a9ffeae76e1afa5b14ecaf6faffadea77dffd",
|
||||
"sha256": "1vivf7p05f30bcsiqn175df9vlxfvfpyx0z1snnfgin5mf6nhniq"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "io/methvin/directory-watcher/0.17.1/directory-watcher-0.17.1",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -530,6 +602,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "934c04d3cfef185a8008e7bf34331b79730a9d43",
|
||||
"sha256": "16xbi6mz75r1maw116njab6ln7hm9mhwrxshav4msmfdbccsajz0"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "javax/annotation/jsr250-api/1.0/jsr250-api-1.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -539,6 +620,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "javax/inject/javax.inject/1/javax.inject-1",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "6975da39a7040257bd51d21a231b76c915872d38 /home/maven/repository-staging/to-ibiblio/maven2/javax/inject/javax.inject/1/javax.inject-1.jar",
|
||||
"sha256": "1zz7gnahy2352345411rjlhsf64ikkc6z49dqcv1cj0clm271iwi"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "javax/servlet/servlet-api/2.5/servlet-api-2.5",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -584,15 +674,6 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "mx/cider/logjam/0.1.1/logjam-0.1.1",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "0e9a1c08d4e80e46be8ed8b8cb894bef5e56f39d",
|
||||
"sha256": "1p6hnacyfjn365r0li639lf9fnqpgx1cs7jz7066cn566wjw46az"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "net/cgrand/macrovich/0.2.1/macrovich-0.2.1",
|
||||
"host": "https://repo.clojars.org",
|
||||
@@ -621,11 +702,11 @@
|
||||
},
|
||||
|
||||
{
|
||||
"path": "nrepl/nrepl/1.1.0/nrepl-1.1.0",
|
||||
"path": "nrepl/nrepl/1.0.0/nrepl-1.0.0",
|
||||
"host": "https://repo.clojars.org",
|
||||
"jar": {
|
||||
"sha1": "69f138d4a778c199e5d72446ca25998222ba0862",
|
||||
"sha256": "0n29xczgwpqv98vz36sdic98mf07dmzhjawlxd63p2s2zafkp1ss"
|
||||
"sha1": "f47774c43493efdc879d36b95ebd67ea0d9c890a",
|
||||
"sha256": "1fx5ssmixgqmklliw0ng8fjz41kkhys56x8dbwv9yqrfzws9f2x3"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -656,6 +737,204 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "c6842c86792ff03b9f1d1fe2aab8dc23aa6c6f0e",
|
||||
"sha256": "0kp9qwqmqp45axxddf9h8ai9yap2j86dl4il366py0vc902dj6fr"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "e5f6cae5ca7ecaac1ec2827a9e2d65ae2869cada",
|
||||
"sha256": "0hzp3vrxbnyc6w86v671wp0zchb634rgrwwcc00m0skcarm05sbg"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "7f2e0c573eaa7a74bac2e89b359e1f73d92a0a1d",
|
||||
"sha256": "0hmi3c0p5a2m2v53i0fqmdqm3677q2fz6n6ydpwi16j9ih4fvfiw"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "1637b7e8fc392e389752e79b827b883629285626",
|
||||
"sha256": "0ar5p715427zbqdl6bvkkr926s7xmp9vpc93m1v15qsgyp3a88ny"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-builder-support/3.8.6/maven-builder-support-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "4d22a3faa8880efef2e960bb8a00c2a0b351c46a",
|
||||
"sha256": "1kll3ln7mx7mvbnc8s718fadcc1qckz7nxgqcfg0723fyd9rfg9x"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-core/3.8.6/maven-core-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "f945f1f19452214d360d453d9357275313f1cfd9",
|
||||
"sha256": "1qaqyrxr1b2sz6d6amllynxw8c6cviydy1k8pi6ghlalipd515a3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-model/3.8.6/maven-model-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "8ad31867c493c63ac60a3fa42356a72d20f8457b",
|
||||
"sha256": "1c129h6n5daibjksa652ywbzji0fy4pd53qwk46bvsp7s326v60k"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-model-builder/3.8.6/maven-model-builder-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "8323a726c657becbffc8ea807970935dde3e3903",
|
||||
"sha256": "1fyf717l3aa1jzwq0qss2i4d1m1rrpg6chq0sw6fr5319vmp98sw"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-plugin-api/3.8.6/maven-plugin-api-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "4138e2e9b39f364902ac263888feb7b2407a298e",
|
||||
"sha256": "02ppxjnx9zly3dq7hwvh3x7jsmapirhsfznl9grid7r185h7yc9c"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-repository-metadata/3.8.6/maven-repository-metadata-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "c60a7640e1b829e60f8791b5edf3cf56a6556aca",
|
||||
"sha256": "1zgasjbx3k0l3k7x2m2bkjsbgwnp5z3ywa4d8vmp46x85xk1y3m7"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-resolver-provider/3.8.6/maven-resolver-provider-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "c6dadedc9f6b5c1c02d0a93afd1857460b0f501d",
|
||||
"sha256": "1a9ymv2hy7509hgib75g95my1xh6i9l7pjzzl14l3a3b6kqapcgv"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-settings/3.8.6/maven-settings-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "9ba5114c6c61c66fbc6b93c73085dc5b15585524",
|
||||
"sha256": "0qcakn4g2h68s4s8blllw2889bhiqs8cr5056ywj8i954yhyzp36"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/maven-settings-builder/3.8.6/maven-settings-builder-3.8.6",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "e5c92138dffd1f9e5454cd8224cf8e18253b1803",
|
||||
"sha256": "1f44w8kz8v8k8an2n3i6lk48pb6sgjal6lcprzywash5qn4khnar"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-api/1.8.2/maven-resolver-api-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "af6c5d8660e3c127c3987c385069d301848800a2",
|
||||
"sha256": "0pziii8ys35i4zi0sxw652pd04d2chr3hilpagf0qqpnah2qdf7n"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-connector-basic/1.8.2/maven-resolver-connector-basic-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "013b77ee054cd269a7e14667419d202799db18a2",
|
||||
"sha256": "0w7im7wimjlzsdnvwsfvbji2i9sjaqc9xydb86qk3l3mg3cg2cbn"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-impl/1.8.2/maven-resolver-impl-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "5f08b1e7d0bc89d8254cd46881a5e228c98303df",
|
||||
"sha256": "0slzdrhjhxl41lghrg3b0cxj07zqmmgkf5kqh1g5hksbplyy00n7"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-named-locks/1.8.2/maven-resolver-named-locks-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "6d81987c220cdb9672f15a1f2ee3e4ba9f80d50f",
|
||||
"sha256": "1wf3xzv4xd7d21km0328s519kivaw1953mc33yq0mpdyarwhb6il"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-spi/1.8.2/maven-resolver-spi-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "0d0768a341173c2ef88e8dbcab2f30ebfe7ef526",
|
||||
"sha256": "111vahiwcbaa28w98ksy8q3r23m7gdkqrr4bpy2jxd3vrazaq0d3"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-transport-file/1.8.2/maven-resolver-transport-file-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "b9a7004de9850fe9dcff8325c3d51ef4e387ef70",
|
||||
"sha256": "0li1332vq03w11wdbni52qgkl2k6qdhskmfsdycqdqh9xm7c3f4c"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-transport-http/1.8.2/maven-resolver-transport-http-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "dbc0b6f022c51857fb801ba135c30af056b4c071",
|
||||
"sha256": "0q0hhvwwfilzkvrza6czv4qhvcjh9shxaych2yah0nd6kvmlslsh"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/resolver/maven-resolver-util/1.8.2/maven-resolver-util-1.8.2",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "cfb9b2e4c71d2a819aa4519800c9687c74b71584",
|
||||
"sha256": "0jkvz7z07qsyp4i8p36n6zb53vmkh765fj4d3q7p8rbhnc601k52"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "f87a61adb1e12a00dcc6cc6005a51e693aa7c4ac",
|
||||
"sha256": "1nkdvyywfzbpd2ikpcrqb3zbz71rxc9gdqzsp0j0s172l32xj9br"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/babashka/sci/0.8.41/sci-0.8.41",
|
||||
"host": "https://repo.clojars.org",
|
||||
@@ -746,6 +1025,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/data.int-map/1.2.1/data.int-map-1.2.1",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "9e7e4e17329ecd46e92384d9e8475d77800d204e",
|
||||
"sha256": "055ip8l2y9004cydzz4i08p1ihlm5dz5fpknrln87ds9z9i5hiqh"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/data.json/2.4.0/data.json-2.4.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -764,6 +1052,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/data.xml/0.2.0-alpha8/data.xml-0.2.0-alpha8",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "c3dd8907b0a63a67082bc3091e304d9e1676d4b0",
|
||||
"sha256": "159spfgsn0grlfszzybycyrg6apmv2622aqgc5nc6m7ndm7hrcdm"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -782,6 +1079,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/java.classpath/1.0.0/java.classpath-1.0.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "015d06d1b304ac23104333bc8492a11bcc2e87e4",
|
||||
"sha256": "0vvxzv3vagwhx3zw4w30xhz2kxf1zbggnhn75kymqpja6080wkn1"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -836,6 +1142,24 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/tools.deps/0.17.1297/tools.deps-0.17.1297",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "7f27f66575190ddd5a343a77bba6911b0b4ec620",
|
||||
"sha256": "0mlf7k0s26v4dx25hmix79002ghzar7jynnvcm9pcp56dsg4k78n"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/tools.gitlibs/2.5.190/tools.gitlibs-2.5.190",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "f300f872ac84711ba6df61cbba923c515c289068",
|
||||
"sha256": "1i3jqzgfqiysy7np21gwrds32aay6a5p1xfnc3xp1jv30nnqd4bs"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/tools.logging/1.2.4/tools.logging-1.2.4",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -854,6 +1178,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/tools.namespace/1.4.4/tools.namespace-1.4.4",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "ba1078e3fe6ebc33119a7c09722afa9f708aef1f",
|
||||
"sha256": "01b3v2mii51krravn2rh1b9ysg9ph0mlb9c2dfbv0k6mckynhy04"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/clojure/tools.reader/1.3.7/tools.reader-1.3.7",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -863,6 +1196,114 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "425ea8e534716b4bff1ea90f39bd76be951d651b",
|
||||
"sha256": "0fi0x8dq1skmxy8w7yhij7kshxig592k31zxmlgddzwyb9f1nzws"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-classworlds/2.6.0/plexus-classworlds-2.6.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "8587e80fcb38e70b70fae8d5914b6376bfad6259",
|
||||
"sha256": "0j9m9zbw152gdqvigwh2l922z4nrxzbdbgky86f7qy4zqig7rxsj"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "2f2147a6cc6a119a1b51a96f31d45c557f6244b9",
|
||||
"sha256": "1b5c6ay7nbphafqs6h7apars9xis0j06011685cgkg5mx5y63qxx"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "25b919c664b79795ccde0ede5cee0fd68b544197",
|
||||
"sha256": "0qi633bwjwwaadmsrzjg6i0abpxkkz7xzg34llz112bqw4n43ddk"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "f89c5080614ffd0764e49861895dbedde1b47237",
|
||||
"sha256": "1szwmkvlw8jf4fcvprfwicc85gy4l81v1055vmv02y2c1jb3jcc7"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "9b41b2b76b1bfe3774411fe22f5868058a9fc822",
|
||||
"sha256": "0aig48q1jihh02l2glj8wp1qi74a6llvkf9fklj4z2aspv6hymsb"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/jetty/jetty-client/9.4.48.v20220622/jetty-client-9.4.48.v20220622",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "fc2e953a7030045e1ca467d57e200856a170848e",
|
||||
"sha256": "058x9p1k8r5miwyn2za86nz27mbnmnk956crfmi2jsyk004zx2bz"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/jetty/jetty-http/9.4.48.v20220622/jetty-http-9.4.48.v20220622",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "8cb235e70bda0c5e97a41e7ee0ea33ee7f5bcc6a",
|
||||
"sha256": "0phpz22cj5n8950pdbb97fwbmr4f4l8h8lvh0kg8ya159j0196f9"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/jetty/jetty-io/9.4.48.v20220622/jetty-io-9.4.48.v20220622",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "b09b55209d0a304e542f779750a01f6914dc55e7",
|
||||
"sha256": "0iwb1d3a18yl2x6sbawi2cl5k6d24gmx2rmj1fks01c96jh60bsd"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/jetty/jetty-util/9.4.48.v20220622/jetty-util-9.4.48.v20220622",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "7efc06f7ec0ff33d8c219bcc8c7415280c103669",
|
||||
"sha256": "11rbr3mayczff851l34ccbmkpi71dzy2havrqalvxd54ki2gvji4"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "d4265dd4f0f1d7a06d80df5a5f475d5ff9c17140",
|
||||
"sha256": "04ys5z436vd2m8ipn5fifmwbvpcif7250k9sc2yx5qfwph8416f5"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "d71996bb2e536f966b3b70e647067fff3b73d32f",
|
||||
"sha256": "1157yqjxvr24wpgy4zi4mnjpm3jjlmcmrmd7ywh6z0khdl4n2k3y"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -872,6 +1313,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/java-websocket/Java-WebSocket/1.5.3/Java-WebSocket-1.5.3",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "9c26b6a6e732a1242db576a50dc3a12e446e2717",
|
||||
"sha256": "0gvsbr49lr8ylv4k8gsnd9wyfc4gs5wr15klrmnyfmxnr4fw4vsd"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/jboss/logging/jboss-logging/3.4.3.Final/jboss-logging-3.4.3.Final",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
@@ -935,6 +1385,15 @@
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/jcl-over-slf4j/1.7.36/jcl-over-slf4j-1.7.36",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
"jar": {
|
||||
"sha1": "d877e195a05aca4a2f1ad2ff14bfec1393af4b5e",
|
||||
"sha256": "15ci04f0g0avrfih736hb6pg1jsfx5ciy4jx6qbjqxr3sa7wlmxb"
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
"path": "org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9",
|
||||
"host": "https://repo1.maven.org/maven2",
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
aopalliance/aopalliance/1.0/aopalliance-1.0.jar
|
||||
args4j/args4j/2.33/args4j-2.33.jar
|
||||
babashka/fs/0.2.16/fs-0.2.16.jar
|
||||
bidi/bidi/2.1.6/bidi-2.1.6.jar
|
||||
@@ -8,14 +9,17 @@ borkdude/edamame/1.3.23/edamame-1.3.23.jar
|
||||
borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar
|
||||
camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3.jar
|
||||
cheshire/cheshire/5.11.0/cheshire-5.11.0.jar
|
||||
cider/cider-nrepl/0.44.0/cider-nrepl-0.44.0.jar
|
||||
cider/orchard/0.21.0/orchard-0.21.0.jar
|
||||
cider/piggieback/0.5.2/piggieback-0.5.2.jar
|
||||
cider/cider-nrepl/0.31.0/cider-nrepl-0.31.0.jar
|
||||
cider/piggieback/0.4.1/piggieback-0.4.1.jar
|
||||
clj-kondo/clj-kondo/2024.03.13/clj-kondo-2024.03.13.jar
|
||||
cljs-bean/cljs-bean/1.9.0/cljs-bean-1.9.0.jar
|
||||
clout/clout/2.1.2/clout-2.1.2.jar
|
||||
com/andrewmcveigh/cljs-time/0.5.2/cljs-time-0.5.2.jar
|
||||
com/bhauman/cljs-test-display/0.1.1/cljs-test-display-0.1.1.jar
|
||||
com/cognitect/aws/api/0.8.612/api-0.8.612.jar
|
||||
com/cognitect/aws/endpoints/1.1.12.321/endpoints-1.1.12.321.jar
|
||||
com/cognitect/aws/s3/822.2.1145.0/s3-822.2.1145.0.jar
|
||||
com/cognitect/http-client/1.0.115/http-client-1.0.115.jar
|
||||
com/cognitect/transit-clj/1.0.329/transit-clj-1.0.329.jar
|
||||
com/cognitect/transit-cljs/0.8.280/transit-cljs-0.8.280.jar
|
||||
com/cognitect/transit-java/1.0.362/transit-java-1.0.362.jar
|
||||
@@ -24,6 +28,8 @@ com/fasterxml/jackson/core/jackson-core/2.13.3/jackson-core-2.13.3.jar
|
||||
com/fasterxml/jackson/dataformat/jackson-dataformat-cbor/2.13.3/jackson-dataformat-cbor-2.13.3.jar
|
||||
com/fasterxml/jackson/dataformat/jackson-dataformat-smile/2.13.3/jackson-dataformat-smile-2.13.3.jar
|
||||
com/github/javaparser/javaparser-core/3.25.3/javaparser-core-3.25.3.jar
|
||||
com/github/jpmonettas/flow-storm-inst/3.7.5/flow-storm-inst-3.7.5.jar
|
||||
com/github/jpmonettas/hansel/0.1.78/hansel-0.1.78.jar
|
||||
com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6.jar
|
||||
com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
|
||||
com/google/code/gson/gson/2.9.1/gson-2.9.1.jar
|
||||
@@ -32,6 +38,7 @@ com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.1
|
||||
com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar
|
||||
com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar
|
||||
com/google/guava/listenablefuture/9999.0-empty-to-avoid-conflict-with-guava/listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar
|
||||
com/google/inject/guice/4.2.2/guice-4.2.2-no_aop.jar
|
||||
com/google/j2objc/j2objc-annotations/1.3/j2objc-annotations-1.3.jar
|
||||
com/google/javascript/closure-compiler-unshaded/v20230802/closure-compiler-unshaded-v20230802.jar
|
||||
com/google/protobuf/protobuf-java/3.21.12/protobuf-java-3.21.12.jar
|
||||
@@ -54,23 +61,47 @@ hiccup/hiccup/1.0.5/hiccup-1.0.5.jar
|
||||
http-kit/http-kit/2.2.0/http-kit-2.2.0.jar
|
||||
instaparse/instaparse/1.4.0/instaparse-1.4.0.jar
|
||||
io/aviso/pretty/1.4.4/pretty-1.4.4.jar
|
||||
io/github/clojure/tools.build/0.9.4/tools.build-0.9.4.jar
|
||||
io/methvin/directory-watcher/0.17.1/directory-watcher-0.17.1.jar
|
||||
io/replikativ/datalog-parser/0.2.25/datalog-parser-0.2.25.jar
|
||||
io/undertow/undertow-core/2.3.10.Final/undertow-core-2.3.10.Final.jar
|
||||
javax/annotation/javax.annotation-api/1.3.2/javax.annotation-api-1.3.2.jar
|
||||
javax/annotation/jsr250-api/1.0/jsr250-api-1.0.jar
|
||||
javax/inject/javax.inject/1/javax.inject-1.jar
|
||||
javax/servlet/servlet-api/2.5/servlet-api-2.5.jar
|
||||
javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
|
||||
medley/medley/0.8.2/medley-0.8.2.jar
|
||||
metosin/malli/0.13.0/malli-0.13.0.jar
|
||||
mvxcvi/arrangement/2.1.0/arrangement-2.1.0.jar
|
||||
mx/cider/logjam/0.1.1/logjam-0.1.1.jar
|
||||
net/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar
|
||||
net/java/dev/jna/jna/5.12.1/jna-5.12.1.jar
|
||||
nrepl/bencode/1.1.0/bencode-1.1.0.jar
|
||||
nrepl/nrepl/1.1.0/nrepl-1.1.0.jar
|
||||
nrepl/nrepl/1.0.0/nrepl-1.0.0.jar
|
||||
nubank/matcher-combinators/3.8.8/matcher-combinators-3.8.8.jar
|
||||
org/apache/ant/ant/1.10.11/ant-1.10.11.jar
|
||||
org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11.jar
|
||||
org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar
|
||||
org/apache/httpcomponents/httpclient/4.5.13/httpclient-4.5.13.jar
|
||||
org/apache/httpcomponents/httpcore/4.4.15/httpcore-4.4.15.jar
|
||||
org/apache/maven/maven-artifact/3.8.6/maven-artifact-3.8.6.jar
|
||||
org/apache/maven/maven-builder-support/3.8.6/maven-builder-support-3.8.6.jar
|
||||
org/apache/maven/maven-core/3.8.6/maven-core-3.8.6.jar
|
||||
org/apache/maven/maven-model/3.8.6/maven-model-3.8.6.jar
|
||||
org/apache/maven/maven-model-builder/3.8.6/maven-model-builder-3.8.6.jar
|
||||
org/apache/maven/maven-plugin-api/3.8.6/maven-plugin-api-3.8.6.jar
|
||||
org/apache/maven/maven-repository-metadata/3.8.6/maven-repository-metadata-3.8.6.jar
|
||||
org/apache/maven/maven-resolver-provider/3.8.6/maven-resolver-provider-3.8.6.jar
|
||||
org/apache/maven/maven-settings/3.8.6/maven-settings-3.8.6.jar
|
||||
org/apache/maven/maven-settings-builder/3.8.6/maven-settings-builder-3.8.6.jar
|
||||
org/apache/maven/resolver/maven-resolver-api/1.8.2/maven-resolver-api-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-connector-basic/1.8.2/maven-resolver-connector-basic-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-impl/1.8.2/maven-resolver-impl-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-named-locks/1.8.2/maven-resolver-named-locks-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-spi/1.8.2/maven-resolver-spi-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-transport-file/1.8.2/maven-resolver-transport-file-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-transport-http/1.8.2/maven-resolver-transport-http-1.8.2.jar
|
||||
org/apache/maven/resolver/maven-resolver-util/1.8.2/maven-resolver-util-1.8.2.jar
|
||||
org/apache/maven/shared/maven-shared-utils/3.3.4/maven-shared-utils-3.3.4.jar
|
||||
org/babashka/sci/0.8.41/sci-0.8.41.jar
|
||||
org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar
|
||||
org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar
|
||||
@@ -81,20 +112,39 @@ org/clojure/core.cache/1.0.225/core.cache-1.0.225.jar
|
||||
org/clojure/core.memoize/1.0.253/core.memoize-1.0.253.jar
|
||||
org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2.jar
|
||||
org/clojure/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar
|
||||
org/clojure/data.int-map/1.2.1/data.int-map-1.2.1.jar
|
||||
org/clojure/data.json/2.4.0/data.json-2.4.0.jar
|
||||
org/clojure/data.priority-map/1.1.0/data.priority-map-1.1.0.jar
|
||||
org/clojure/data.xml/0.2.0-alpha8/data.xml-0.2.0-alpha8.jar
|
||||
org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541.jar
|
||||
org/clojure/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541.jar
|
||||
org/clojure/java.classpath/1.0.0/java.classpath-1.0.0.jar
|
||||
org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0.jar
|
||||
org/clojure/spec.alpha/0.3.218/spec.alpha-0.3.218.jar
|
||||
org/clojure/test.check/1.1.1/test.check-1.1.1.jar
|
||||
org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0.jar
|
||||
org/clojure/tools.analyzer.jvm/1.2.2/tools.analyzer.jvm-1.2.2.jar
|
||||
org/clojure/tools.cli/1.0.206/tools.cli-1.0.206.jar
|
||||
org/clojure/tools.deps/0.17.1297/tools.deps-0.17.1297.jar
|
||||
org/clojure/tools.gitlibs/2.5.190/tools.gitlibs-2.5.190.jar
|
||||
org/clojure/tools.logging/1.2.4/tools.logging-1.2.4.jar
|
||||
org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar
|
||||
org/clojure/tools.namespace/1.4.4/tools.namespace-1.4.4.jar
|
||||
org/clojure/tools.reader/1.3.7/tools.reader-1.3.7.jar
|
||||
org/codehaus/plexus/plexus-cipher/2.0/plexus-cipher-2.0.jar
|
||||
org/codehaus/plexus/plexus-classworlds/2.6.0/plexus-classworlds-2.6.0.jar
|
||||
org/codehaus/plexus/plexus-component-annotations/2.1.0/plexus-component-annotations-2.1.0.jar
|
||||
org/codehaus/plexus/plexus-interpolation/1.26/plexus-interpolation-1.26.jar
|
||||
org/codehaus/plexus/plexus-sec-dispatcher/2.0/plexus-sec-dispatcher-2.0.jar
|
||||
org/codehaus/plexus/plexus-utils/3.3.1/plexus-utils-3.3.1.jar
|
||||
org/eclipse/jetty/jetty-client/9.4.48.v20220622/jetty-client-9.4.48.v20220622.jar
|
||||
org/eclipse/jetty/jetty-http/9.4.48.v20220622/jetty-http-9.4.48.v20220622.jar
|
||||
org/eclipse/jetty/jetty-io/9.4.48.v20220622/jetty-io-9.4.48.v20220622.jar
|
||||
org/eclipse/jetty/jetty-util/9.4.48.v20220622/jetty-util-9.4.48.v20220622.jar
|
||||
org/eclipse/sisu/org.eclipse.sisu.inject/0.3.5/org.eclipse.sisu.inject-0.3.5.jar
|
||||
org/eclipse/sisu/org.eclipse.sisu.plexus/0.3.5/org.eclipse.sisu.plexus-0.3.5.jar
|
||||
org/javassist/javassist/3.18.1-GA/javassist-3.18.1-GA.jar
|
||||
org/java-websocket/Java-WebSocket/1.5.3/Java-WebSocket-1.5.3.jar
|
||||
org/jboss/logging/jboss-logging/3.4.3.Final/jboss-logging-3.4.3.Final.jar
|
||||
org/jboss/threads/jboss-threads/3.5.0.Final/jboss-threads-3.5.0.Final.jar
|
||||
org/jboss/xnio/xnio-api/3.8.8.Final/xnio-api-3.8.8.Final.jar
|
||||
@@ -102,6 +152,7 @@ org/jboss/xnio/xnio-nio/3.8.8.Final/xnio-nio-3.8.8.Final.jar
|
||||
org/jspecify/jspecify/0.2.0/jspecify-0.2.0.jar
|
||||
org/msgpack/msgpack/0.6.12/msgpack-0.6.12.jar
|
||||
org/ow2/asm/asm/9.4/asm-9.4.jar
|
||||
org/slf4j/jcl-over-slf4j/1.7.36/jcl-over-slf4j-1.7.36.jar
|
||||
org/slf4j/slf4j-api/2.0.9/slf4j-api-2.0.9.jar
|
||||
org/slf4j/slf4j-nop/2.0.9/slf4j-nop-2.0.9.jar
|
||||
org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final.jar
|
||||
|
||||
+3
-3
@@ -59,10 +59,10 @@ in {
|
||||
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
||||
versions = ["15.1" "15.2" "15.3"];
|
||||
};
|
||||
go = super.go_1_20;
|
||||
go = super.go_1_21;
|
||||
clang = super.clang_15;
|
||||
buildGoPackage = super.buildGo120Package;
|
||||
buildGoModule = super.buildGo120Module;
|
||||
buildGoPackage = super.buildGo121Package;
|
||||
buildGoModule = super.buildGo121Module;
|
||||
gomobile = (super.gomobile.overrideAttrs (old: {
|
||||
patches = [
|
||||
(self.fetchurl { # https://github.com/golang/mobile/pull/84
|
||||
|
||||
@@ -62,7 +62,7 @@ findByRegex() {
|
||||
|
||||
# list of store entries to delete
|
||||
declare -a found
|
||||
|
||||
|
||||
# for each entry find the source and derivation
|
||||
for mainPath in ${drvPaths}; do
|
||||
findRelated "${mainPath}"
|
||||
@@ -87,7 +87,7 @@ nixResultPath="${1}"
|
||||
if [[ -n "${nixResultPath}" ]]; then
|
||||
# if provided we can narrow down what to clean based on result path
|
||||
toDelete=$(findByResult "${nixResultPath}")
|
||||
else
|
||||
else
|
||||
# use regular expression that should match all status-mobile build artifacts
|
||||
toDelete=$(findByRegex '.*-status-(mobile|go)-(shell|source|build|patched-npm-gradle-modules).*')
|
||||
fi
|
||||
|
||||
@@ -15,6 +15,10 @@ buildGoPackage {
|
||||
# TODO: try removing when go is upgraded to 1.22
|
||||
GODEBUG = "netdns=cgo+2";
|
||||
|
||||
# Since go 1.21 status-go compiled library includes references to cgo runtime.
|
||||
# FIXME: Remove this when go 1.23 or later versions fix this madness.
|
||||
allowGoReference = true;
|
||||
|
||||
preBuild = ''
|
||||
pushd go/src/$goPackagePath
|
||||
go run cmd/library/*.go > $NIX_BUILD_TOP/main.go
|
||||
|
||||
+2
-1
@@ -99,7 +99,8 @@
|
||||
"prettier": "^2.8.8",
|
||||
"process": "0.11.10",
|
||||
"react-test-renderer": "18.1.0",
|
||||
"shadow-cljs": "2.26.2"
|
||||
"shadow-cljs": "2.26.2",
|
||||
"websocket": "^1.0.35"
|
||||
},
|
||||
"binary": {
|
||||
"module_name": "status_nodejs_addon",
|
||||
|
||||
@@ -0,0 +1,345 @@
|
||||
Last updated: 2023-09-22
|
||||
|
||||
1. Introduction
|
||||
|
||||
1.1 Who we are
|
||||
|
||||
Status is developing a set of open source projects that use peer-to-peer technologies to help people transact securely, communicate freely, and organise with confidence. Anyone participating in these projects helps to build technology and tools that empowers people to advance their own sovereign communities.
|
||||
|
||||
Whenever “Status” or “we” or “us” or any similar variation, are used in these terms of use (referred to as, just “terms”), we are referring to Status Research & Development GmbH, a Swiss company with its registered office at Baarerstrasse 10, Zug, Switzerland, and includes its “representatives”, which means Status’ affiliates, directors, officers, employees, agents and any other representatives of Status. For the purposes of these terms, “representatives” also includes Status core contributors without prejudice to the other legal categories mentioned.
|
||||
|
||||
Status does not provide any services, such as financial services, to users of Status Software or any third party. Status is not an intermediary, agent, advisor, or custodian, and does not owe you any fiduciary duty.
|
||||
|
||||
1.2 About these terms
|
||||
|
||||
These terms are a contract between you and Status and apply to your use of Status Software. The term “Status Software” as used herein means a software developed by Status and is composed of a secure messaging tool, a crypto wallet, and a Web 3 browser integrated together.
|
||||
|
||||
Please read these terms carefully before using Status Software. By installing or using Status Software on any device, you agree to these terms. If you do not agree, you should not install or use Status Software.
|
||||
|
||||
We would like to draw your attention to certain parts of these terms which are summarised here for your convenience and we ask that you refer to the corresponding provisions below:
|
||||
|
||||
- You are solely responsible for the use of Status Software
|
||||
You are ultimately solely responsible for the use of Status Software. Throughout these terms, we have indicated where you are solely responsible in relation to your use of Status Software, for example, your use of the Wallet, securing your seed phrase and private keys (including backups) and the content you may create and submit through Status Software.
|
||||
|
||||
- Third party services and Web 3
|
||||
When using Status Software, you may access or use Third Party Services or interact with Web 3. We note that Status does not control or operate any of these Third Party Services or Web 3 and that there may be applicable terms and conditions which you should refer to if you choose to interact with them.
|
||||
|
||||
- Acceptable use of Status Software
|
||||
Status adheres to a number of Principles which are reflected in the design and development of Status Software. We ask that you use Status Software in a way that promotes and aligns with the Status Principles, particularly not acting or using Status Software in manner as set out in the relevant provision below.
|
||||
|
||||
- Risks
|
||||
The use of Status Software is not without risk. You should understand the risks involved and how they may affect you. We have listed a number of risks in these terms, such as from your use of the Wallet, the novel and experimental nature of Web 3, the unpredictable and volatile nature of Digital Assets and potential legal, and regulatory and tax implications. The risks listed in these terms are not exhaustive and ultimately, you are solely responsible for evaluating the risks and deciding whether or not to use Status Software.
|
||||
|
||||
- Indemnity
|
||||
You provide Status a broad indemnity from and against any and all claims, damages and expenses, including attorneys’ fees, arising from or related to your use of Status Software.
|
||||
|
||||
- Release and limitation of liability
|
||||
You not only release Status’ liability on a number of items, but also agree that Status’ aggregate liability is limited to EUR 100 (one hundred Euros) or to the maximum extent permitted by law.
|
||||
|
||||
- Arbitration
|
||||
If a dispute arises between you and Status, we will seek to first solve it amicably with you before proceeding to the use of an arbitration administered by the Swiss Chambers’ Arbitration Institution.
|
||||
|
||||
|
||||
2. About Status Software
|
||||
|
||||
2.1 What is Status Software
|
||||
|
||||
At Status, we strive to develop open source software that can serve as a secure communication tool that helps to uphold human rights. Status Software is specifically designed to facilitate the free flow of information, protect the right to private, secure communications and promote the sovereignty of individuals.
|
||||
|
||||
Status Software is composed of a secure messaging tool, a crypto wallet, and a Web 3 browser integrated together. The software developed by Status in this regard is simply called “Status Software” and you can find more details about its development on Status’ GitHub page.
|
||||
|
||||
Status Software is open source client software that is designed to be user-friendly and can be installed or run in a web browser on your local desktop or mobile device. You can use Status Software to interact with and participate in Web 3 protocols, applications and peer to peer networks (referred to in these terms collectively, as “Web 3”). Please note that Status Software is not a blockchain protocol, or a blockchain network, a platform or a web-based platform.
|
||||
|
||||
Status develops Status Software and makes it available for you to run in a web browser or for your local use on your desktop or mobile device. This means that you are solely responsible for your activity and any potential risk or loss you may incur through using the Status Software as further detailed below in these terms.
|
||||
|
||||
2.1.1 Wallet
|
||||
|
||||
Status Software includes a crypto wallet. We will refer to such wallet functionality in these terms as “Wallet”.
|
||||
|
||||
The Wallet is your own personal crypto wallet. This type of wallet is sometimes also called “non-custodial”, “self-custodial” or “self-hosted”, which means you are in complete control of the crypto tokens (the “Digital Assets”) in the Wallet. Status will never have access to or control over your seed phrase, private keys or Digital Assets in your Wallet given its design.
|
||||
|
||||
Using the Wallet, you are able to send, receive and store Digital Assets and connect to and interact with third-party services that enable the exchange of Digital Assets for fiat currency and Web 3, including certain blockchain bridges and decentralised exchanges.
|
||||
|
||||
The Wallet contains the latest security standards, anti-phishing mechanisms and locally generated and stored public and private keys to ensure that your Digital Assets are secured to the highest standards.
|
||||
|
||||
When generating an account, a randomisation process is started on your own device that generates a key pair. Status does not have visibility of or access to your private keys. You are solely responsible for storing and securing your seed phrase and private keys, and creating, storing and securing their backups. If you fail to maintain the appropriate security measures of your private keys, it may result in you losing access to your Wallet and control of any Digital Assets in your Wallet. If you lose or forget your seed phrase or private keys, Status will not be able to help you recover or replace them and further, Status will not be able to assist you with the recovery of your Digital Assets.
|
||||
|
||||
In order to further enhance the security of storing your private keys, you may also choose to store your keys on a keycard, such as the Status Keycard.
|
||||
|
||||
2.1.2 Messaging
|
||||
|
||||
Status Software includes messaging functionality that enables secure communication between users. We will refer to the messaging functionality of Status Software and the Status Community Spaces collectively in these terms, as “Messaging”.
|
||||
|
||||
Messaging uses an open source, peer-to-peer protocol with end-to-end encryption and metadata suppression to protect your messages from third parties (including Status). End-to-end encryption means that only the sender and recipient of a message can read its contents, and no one else. Peer-to-peer communication is accomplished using the Waku peer-to-peer messaging protocol, which relies on a distributed network of nodes instead of a centralised server. This means that there is no central party or server from which messages can be intercepted, modified or blocked. Learn more about Waku and how it works on Waku’s relevant website.
|
||||
|
||||
Within Messaging, you will also be able to participate in Status Community Spaces. This feature allows users to create their own token-gated communities where you can create group chats and engage with your communities, while leveraging the possibilities, functionality and benefits of blockchain technology. You will also be able to create (and join) open and public communities on Status Software that are accessible to other users. We note that content in these open and public communities will be accessible to all other users of Status Software. Nonetheless, all content will still be protected by the same end-to-end encryption utilised in Status Software.
|
||||
|
||||
2.1.2 Web 3 browser
|
||||
|
||||
Status Software also includes a Web 3 browser through which you may access and interact with Web 3, exchanges, marketplaces, games and more. We will refer to the Web 3 browser in these terms as the “Web 3 Browser”.
|
||||
|
||||
|
||||
3. Privacy
|
||||
|
||||
Status uses an open source, peer-to-peer protocol with end-to-end encryption and metadata suppression, which by design, means that Status (and any third party) is unable to and does not collect, store, own, control or have any visibility or means of access to your identity, Wallet, browsing information, any user private keys, Digital Assets, messages, content, history of interactions, transactions, user accounts or any other user information.
|
||||
|
||||
Therefore, Status does not (and cannot) monetise any users’ data or content, such as messages or browser information and Status does have any interest in doing so.
|
||||
|
||||
When generating an account on Status Software, you will have the option to utilise your phone number and certain social media handles such as your Twitter account, to generate an account. While this information is not shared with Status and Status has no access to it, third party service providers may receive it to authenticate your ownership of such accounts. Using your phone number or social media handle, such as on X (formerly known as Twitter), will allow you to find your contacts who are also using Status Software and it will help your contacts to find you. This will allow them to discover and potentially interact with you, if you accept their request to connect, so that you can start building up your network of contacts on Status Software. Please note that this is not required for you to access or utilise Status Software, and you can always choose to generate an account anonymously without utilising your phone number or social media handle.
|
||||
|
||||
In addition, you may opt in to submit certain technical information (also referred to as telemetry) to assist Status with the development of the Status Software, particularly to measure message reliability and bandwidth usage. In any event this technical information is anonymised by Status Software and also protected by end-to-end encryption. We note that even anonymised data can be vulnerable to being potentially compromised, such as by correlation attacks. You should opt in to submit this technical information only if you are willing to accept these risks.
|
||||
|
||||
You acknowledge that an inherent feature of Web 3 is its transparency, particularly in the context of blockchain networks. This means that your public key and wallet address will be visible to others when you engage in transactions on such networks and that third parties may be able to (and for the avoidance of doubt, not through the use of Status Software) connect your public key and wallet address to your identity and determine the Digital Assets you own in your Wallet. You should also be aware that entries on blockchain networks are practically immutable, which means that they generally cannot be deleted or modified by anyone, including Status, even if the transaction turns out to have been made in error or otherwise.
|
||||
|
||||
If you use third party services offered through Status Software, your privacy may not be protected and you will be subject to the privacy terms and conditions of such third parties. Please refer to our full terms regarding third party services below.
|
||||
|
||||
|
||||
Learn more about how we protect your data on Status Software by reading the Status Privacy Statement and relevant security page on the Status website.
|
||||
|
||||
|
||||
4. Using third party services and interacting with Web 3
|
||||
|
||||
When using Status Software, you may access or use third party products, services or tools (“Third Party Services”) and interact with Web 3. Status Software is only one means of interacting with these Third Party Services and Web 3 and you can independently utilise other means and tools to do so as well.
|
||||
|
||||
Your interactions with Web 3 could include many aspects, such as interacting with smart contracts that reside on blockchain networks, for example to swap Digital Assets or use (crypto) bridges, or deploying your own smart contracts through Status Community Spaces. You may also interact with and participate in peer-to-peer networks which could vary in their level of decentralisation, ranging from more centralised networks controlled by a single party to networks governed by decentralised communities.
|
||||
|
||||
You acknowledge when you use Third Party Services or interact with Web 3, that Status does not control or operate any Third Party Service or Web 3. These are products, services or tools that are respectively provided by others or may be operating autonomously, and not by Status.
|
||||
|
||||
Please note that when you use Third Party Services or interact with Web 3 that there may be applicable terms and conditions, including privacy policies which govern your use of Third Party Services or interaction with Web 3. In case of interactions with Web 3, such as decentralised exchanges, there may be in some cases no applicable terms and conditions, and the relevant software code will govern your interactions.
|
||||
|
||||
Please also note that bridges are used to move tokens from one blockchain network to another. When you use a bridge, for example in the course of sending or bridging tokens, Status utilises an algorithm that aims to determine the lowest service fee which the user may incur at the time of a bridge’s use. This algorithm relies on information extracted directly from the relevant blockchain networks. Status is not responsible for the accuracy and correctness of any information that these algorithms may extract from such networks
|
||||
|
||||
You are solely responsible for your use of Third Party Services and your interactions with Web 3. If you have any technical issues or other issues with any of these Third Party Services or Web 3, you should contact the relevant third party or appropriate point of contact directly (if any).
|
||||
|
||||
In principle, Status does not provide any advice, recommendation, support or endorse Third Party Services you may use or any aspect of Web 3 that you may interact with through Status Software. Their integration or availability through Status Software does not imply any support or endorsement by Status. Status may also receive a fee from certain third parties who provide the Third Party Services.
|
||||
|
||||
Please also note that Status participates in the development of other open source projects that utilise peer-to-peer technologies, which you can find more details about on Status’ GitHub page.
|
||||
|
||||
|
||||
5. Nodes
|
||||
|
||||
The use of Status Software on your device will turn it into a node that supports the Waku network.
|
||||
|
||||
In general, by participating in or interacting with Web 3 networks, you may choose or be required to operate a node or perform other functions in support of such a network. Status is not responsible for the operation or functioning of such nodes.
|
||||
|
||||
|
||||
6. Security
|
||||
|
||||
Although security is a top priority for us and many functions of Status Software are privacy-mode by default, we cannot guarantee the full security of Status Software and we are not responsible for alerting you to potential security risks. We intend to continuously update the security measures of Status Software and we will from time to time post updates on the security of Status Software through our communication channels.
|
||||
|
||||
|
||||
7. Content
|
||||
|
||||
At Status, we believe in the sovereignty of individuals and we stand for the cause of personal liberty. We aim to promote social, political, and economic freedoms through Status Software, which is built on the principles of the free flow of information and censorship resistance. Through Status Software, particularly when using Messenger and Status Community Spaces, you will be able to create and interact with various content. We consider content to include anything you (or any other user) create, post, distribute or exchange through Status Software (as well as any future functions that may be added to Status Software), whether its text, links, GIFs, emoji, photos or any other media formats.
|
||||
|
||||
You are solely responsible for any content that you create, post, distribute or submit, messages you exchange or any other activity you may engage in related to your content on or through Status Software and any harm or liability that may result from such content.
|
||||
|
||||
You represent and warrant in respect of such content that:
|
||||
1. your creation, posting, distribution or submission of content does not infringe on any intellectual property or other proprietary rights of any third party; and
|
||||
2. you are the creator and owner or that you have the necessary permissions to create, post, distribute or submit such content through Status Software.
|
||||
|
||||
You acknowledge that Status has no means of monitoring, moderating, removing, modifying or regulating users’ content or activity. Status is further unable to and is not responsible for verifying the accuracy or reliability of such content or activity. While you use Status Software, you may view content that:
|
||||
1. could be offensive, indecent, or otherwise objectionable;
|
||||
2. contains technical inaccuracies, typographical mistakes, and other errors; or
|
||||
3. could violate others’ rights, including but not limited to privacy, publicity, intellectual property, or other proprietary rights.
|
||||
|
||||
|
||||
8. Acceptable use of Status software
|
||||
|
||||
8.1 Adherence to Status Principles
|
||||
|
||||
One of Status’ goals is the widespread adoption of the decentralised web while also staying true to our Principles. These terms are designed to reflect our Principles, while providing important legal protections for Status and setting out guidelines and terms for the Status Software community of users. We ask that you use Status Software in a way that promotes and aligns with the Status Principles.
|
||||
|
||||
8.2 Limitation on certain uses of and acts in Status Software
|
||||
|
||||
You shall not, nor try to, encourage or assist others using Status Software to:
|
||||
1. gain or try to gain unauthorised access to Status Software;
|
||||
2. interfere with or disrupt the integrity, safety, security, availability or performance of Status Software;
|
||||
3. generate accounts on Status Software through unauthorised means;
|
||||
4. install or transmit on or through Status Software, any viruses, worms, malware, Trojan horses, or other harmful or destructive code or content;
|
||||
5. use spam, data mining, or other unsolicited promotional methods, machine generated content, or unethical or unwanted commercial content;
|
||||
6. engage in phishing, spoofing, or similar fraudulent acts;
|
||||
7. knowingly spread misinformation or impersonate another person or legal entity;
|
||||
8. incite, commit or threaten, harm or engage in illegal or inappropriate conduct including stalking, bullying, harassment, intimidation or abuse another individual or group;
|
||||
9. engage in or organise child sexual exploitation of any kind;
|
||||
10. use Status Software, if you are subject to sanctions, or otherwise designated on a list of prohibited or restricted parties as maintained by, the United Nations, the European Union or any of its member states or the Singaporean, Swiss or US government, or intend to interact or transact with such parties;
|
||||
11. violate, misappropriate or infringe the rights of Status, other users of Status Software, or any other third parties in any way, including but not limited to privacy, publicity, intellectual property, confidentiality, property or other rights;
|
||||
12. engage in any activity through Status Software that may be in violation of applicable law, rules or regulations in your jurisdiction;
|
||||
13. interfere, disrupt, negatively affect, or inhibit other users from their use of Status Software; or
|
||||
14. engage in any attack, hack, denial-of-service attack, interference, or exploit of any smart contract in connection with use of Status Software.
|
||||
|
||||
|
||||
9. Fees
|
||||
|
||||
When you use Status Software to interact with Third Party Services or Web 3, you may incur costs and may have to pay various fees, such as service fees, transfer fees, transaction fees, swap fees, bridge fees or network fees. You will be solely liable for any such fees, costs and expenses. Status has no control over and is unable to influence these fees in any manner.
|
||||
|
||||
|
||||
10. Intellectual property and branding
|
||||
|
||||
10.1 Status develops open source software
|
||||
|
||||
We want everyone to benefit from Status Software, so we made it available under free and open source licences. This means that anyone can use, share, and modify the source code, as long as they follow the terms of the applicable licence. We believe in permission-less participation, which means that everyone has the right to participate in the development of our software. The applicable licences can be found on Status’ GitHub page.
|
||||
|
||||
10.2 Respect the Status brand
|
||||
|
||||
Status (and its affiliates as the case may be) owns all the rights to Status brand, including copyrights, domains, trade dress (look and feel), design rights and themes, trademarks, logos, graphics, and other intellectual property. These terms do not grant you any rights to use the Status brand or its intellectual property.
|
||||
|
||||
We love to see creative work from the Status community, but please let us know in advance and in writing if you want to use trademarks, logos, or graphics or modify them from our standard colours and designs. If you write articles, blogs, create websites, or talk about Status, please make sure it is clear that you are not speaking for, on behalf of, or under endorsement by Status.
|
||||
|
||||
To request permission to use our copyrighted material or trademarks or any other intellectual property, such as logos, please contact: marketing@status.im. If we grant you permission, you must follow our guidelines and instructions for using our intellectual property.
|
||||
|
||||
|
||||
11. Risks
|
||||
|
||||
Before you use Status Software, you should understand the risks involved and how they may affect you. The risks listed below are not intended to be exhaustive and may not reflect all the potential risks you could be exposed to from using Status Software.
|
||||
|
||||
You are solely responsible for evaluating the risks and deciding whether or not to use Status Software. By using Status Software, you agree to accept all of the risks identified below, as well as any other risks that a reasonable person should have been aware about. Status is not responsible for notifying you on an ongoing basis about any changes in the risks associated with using Status Software.
|
||||
|
||||
11.1 Wallet
|
||||
|
||||
By using the Wallet, you represent that you have a sufficient understanding about crypto wallets and Digital Assets.
|
||||
|
||||
You acknowledge that Digital Assets stored in the Wallet are at risk of loss due to various factors, including but not limited to: theft, hacking (or other cyber-attacks), malware, technical or human error. You further acknowledge that transactions made through the Wallet are final and cannot be reversed by anyone, including Status. You are solely responsible for the transactions you undertake using Status Software, including verifying the accuracy and legitimacy of your transactions before confirming and proceeding with them.
|
||||
|
||||
Status is not a service provider or an intermediary or custodian. We do not store, control, custody, transfer, or handle any users’ funds or Digital Assets. Transactions are processed by validators, nodes, miners, and other participants on the Web 3 network (and not by Status). We do not have visibility of and cannot interfere with, modify, stop, block, change, reverse, or refund any transactions.
|
||||
|
||||
11.2 Novel and experimental nature of Web 3
|
||||
|
||||
You acknowledge that there are inherent risks related to Web 3, arising from its novel and experimental nature. These risks include but are not limited to security risks (such as hacking and malware or other cyber-attacks, unauthorised access to your Wallet, attacks on blockchain networks, among others), technical risks (such as software errors, vulnerabilities or bugs) or operational risks related to Digital Assets, smart contracts, use of certain services, such as (crypto) bridges and swaps or other aspects and functionalities of Web 3.
|
||||
|
||||
The technology underlying Web 3 is also novel and experimental, as for the most part, it is based on still unproven, emerging and complex technologies, such as blockchain networks, that are developed or operated by third parties and distributed across a series of unaffiliated nodes across the world. As such, these changes and development in this technology may adversely affect your use of Web 3 and even Status Software. It is your sole responsibility to monitor such changes and the potential impact on your use of Web 3 and Status Software.
|
||||
|
||||
Given the novel and experimental nature of Web 3, the laws, rules and regulations, or their interpretation, may change and develop in a manner which could adversely affect your ability to interact with any aspect of Web 3, including deploying smart contracts, as well as creating, using, distributing or purchasing Digital Assets. These rules and regulations vary significantly in maturity across jurisdictions, but are for the most part, still in the early stages of development and may rapidly evolve and as such, their potential impact is subject to significant uncertainty. This could result in adverse consequences to you that may include criminal or civil penalties, including fines. It is your sole responsibility to ensure that you comply with all applicable laws, rules and regulations, including but not limited to, cryptocurrencies, financial markets, securities and anti-money laundering.
|
||||
|
||||
Web 3 is also decentralised to varying degrees and this may lead to a lack of predictability, accountability, or control over Web 3. There is no guarantee that the protocols and networks will function as expected. Changes may occur suddenly, like forks, which may affect Status Software and your experience of using Status Software. Status may decide not to support a forked network in its sole discretion.
|
||||
|
||||
11.3 Unpredictable and volatile nature of Digital Assets
|
||||
|
||||
With Status Software, you can interact with and transact in Digital Assets and their markets. You acknowledge that these markets and Digital Assets are often highly unpredictable and volatile due to multiple factors, such as supply and demand, changes in technology, the regulatory environment, political, natural and economic events in a jurisdiction, and price speculation. In addition, the underlying factors that determine the price of a Digital Asset are often opaque and could be subject to speculation and market manipulation. This means that the value of Digital Assets can be lost in part or in full and you should not interact with Digital Assets unless you have the necessary advice, knowledge, expertise or risk appetite.
|
||||
|
||||
11.4 Potential legal, regulatory and tax implications
|
||||
|
||||
You acknowledge that there may be legal and regulatory implications applicable to you while using Status Software and interacting with Web 3 and that may also adversely impact your use of Status Software.
|
||||
|
||||
You are solely responsible for evaluating the legal and regulatory implications and taking appropriate actions, which could include obtaining any necessary licences, permits or approvals. Additionally, you are solely responsible for any tax implications, such as the payment of any taxes, resulting from your activities conducted through Status Software, including any transactions in Digital Assets.
|
||||
|
||||
|
||||
12. Disclaimers
|
||||
|
||||
Status Software is provided on an “as is” basis. Status does not make any express or implied representations or warranties in relation to Status Software. This includes warranties of merchantability, fitness for use or for a particular purpose, and non-infringement of any copyright or intellectual property rights. In particular, Status makes no representations or warranties:
|
||||
1. about the completeness, accuracy, utility, reliability, suitability or availability of any information provided by Status;
|
||||
2. that Status Software will be operational, secure, safe or free from failures, disruptions, unauthorised access, bugs, errors, or delays, viruses, malicious code or any other technical or security issues;
|
||||
3. regarding the completeness, accuracy, legality, utility, suitability, availability, functionality, timeliness or security of Web 3 or any Third Party Services;
|
||||
4. regarding the value, utility or legality of any Digital Asset;
|
||||
5. regarding the completeness, accuracy, legality, utility, suitability, functionality, security or availability of any smart contract that you may interact with or deploy; or
|
||||
6. regarding the completeness, accuracy, legality, utility, reliability, suitability or availability of any user content.
|
||||
|
||||
|
||||
13. Releases you should read closely
|
||||
|
||||
You release Status from all liability related to any claim, cause of action, controversy, dispute, loss, or damages, known or unknown, related to, arising from, or in any way connected with your use of Status Software. This includes, but is not limited to:
|
||||
1. user error, such as forgotten passwords, incorrectly constructed transactions, or mistyped wallet addresses;
|
||||
2. your inability to access your Wallet or the Digital Assets held in within it, for any reason, such as the loss of your seed phrase or private keys;
|
||||
3. your transactions or transfers of Digital Assets from and to your Wallet;
|
||||
4. any loss of value (in part or full) of your Digital Assets held in your Wallet;
|
||||
5. the failure of your hardware, software, or Internet connection;
|
||||
6. unauthorised access to your account, or your data on or through the Status Software, including any loss of data (such as your wallet address, private key and seed phrase);
|
||||
7. technical or operational errors in or related to Status Software, including underlying code or its functionalities, as well as the code of smart contracts you may deploy;
|
||||
8. any modification, suspension or discontinuance of Status Software or any feature or functionality of Status Software;
|
||||
9. your use of any Third Party Service or aspect of Web 3, including smart contracts and Digital Assets, as well as your interaction with such Third Party Service or Web 3;
|
||||
10. your content or other users’ content;
|
||||
11. any unauthorised third party activities, including without limitation the use of viruses, phishing, brute forcing, or other means of attack against Status Software; and
|
||||
12. any risks identified in these terms or any that a reasonable person should have been aware of in relation to using Status Software.
|
||||
|
||||
|
||||
14. Limitation of liability
|
||||
|
||||
Status will not be held liable to you under any contract, negligence, strict liability, or other legal or equitable theory for any lost profits, cost of procurement for substitute services, or any special, incidental, or consequential damages related to, arising from, or in any way connected with these terms, Status, your use of Status Software, particularly where Status has indicated that it is not responsible. This includes without limitation, your use of SNT or other Digital Assets (creating, distributing, transacting in or otherwise) even if Status has been advised of the possibility of such damages.
|
||||
In any event, Status’ aggregate liability for any claims is limited to EUR 100 (one hundred Euros). This limitation of liability will apply to the extent permitted by applicable law.
|
||||
|
||||
|
||||
15. Indemnity
|
||||
|
||||
You shall indemnify and hold harmless Status from and against any and all claims, damages and expenses, including attorneys’ fees, arising from or related to your use of Status Software. This includes, but is not limited to:
|
||||
1. your breach or alleged breach of these terms;
|
||||
2. any content you create, post, distribute or submit, messages you exchange or any other activity you may engage in related to your content on or through Status Software;
|
||||
3. your use, including any of your activities on or through, Status Software;
|
||||
4. your violation of any laws, rules or regulations;
|
||||
5. your harm to or violation of the rights of any third party, including any privacy, intellectual property, publicity, confidentiality, property or any other rights;
|
||||
6. your use of Third Party Services or any aspect of Web 3; or
|
||||
7. any misrepresentation or fraudulent statements made by you.
|
||||
|
||||
|
||||
16. Restricted jurisdictions
|
||||
|
||||
Status is a Swiss company which makes Status Software available through third party platforms, such as third party app stores, which enables global distribution to potential users.
|
||||
|
||||
You acknowledge that Status Software is not intended for use or distribution in any jurisdiction where such use or distribution of software that is similar or identical to Status Software is prohibited or restricted in any way. Your use of Status Software does not and will not subject Status to such jurisdiction under any circumstance, particularly if there are any prohibitions or restrictions on the use of such software. Status reserves the right to limit the availability of Status Software in any jurisdiction.
|
||||
|
||||
Status does not conduct any business activities (i.e. activities undertaken for the purpose of earning a profit) within the United States of America, District of Columbia, Puerto Rico, the U.S. Virgin Islands, and all other U.S. territories and possessions, as well as all Swiss embargoed countries.
|
||||
|
||||
|
||||
17. Materials provided are solely for informational purposes
|
||||
|
||||
Status provides materials and other information through Status Software for informational purposes only and they may not always be entirely accurate, complete, or current and may also include inaccuracies or typographical errors. You are solely responsible for verifying their adequacy, completeness and accuracy and any reliance you place on such information is at your own risk, including any decisions or actions you may take in this respect. Status is not liable for any loss resulting from your action (or inaction) and decisions based on these materials or any other information.
|
||||
|
||||
You should always conduct your own research and seek independent professional advice if necessary. The materials and other information that Status may provide through Status Software does not constitute financial, legal, tax, or other advice and should not be treated as such.
|
||||
|
||||
Additionally, Status is not responsible for any information, content, or services contained on any third party websites accessible or linked through the Status Software. By linking such third party websites, Status does not represent or imply that it endorses or supports such third party websites or content therein, or that it believes such third party websites and content therein to be accurate, useful or non-harmful. Status has no control over such third party websites and will not be liable for your use of or activities on any third party websites accessed through Status Software. The terms and conditions, including privacy policies, of such third party websites govern your use of their websites.If you access such third party websites through Status Software, it is at your own risk and you are solely responsible for your activities on such third party websites.
|
||||
|
||||
|
||||
18. Governing law and dispute resolution
|
||||
|
||||
18.1 Governing law
|
||||
|
||||
Swiss law governs these terms and any disputes between you and Status, whether in court or arbitration, without regard to conflict of laws provisions.
|
||||
|
||||
18.2 Dispute resolution
|
||||
|
||||
In these terms, “dispute” has the broadest meaning enforceable by law and includes any claim you make against Status or controversy you may have in relation to these terms, with Status or your use of Status Software.
|
||||
|
||||
We prefer arbitration over litigation as we believe it meets our Principle of resolving disputes in the most efficient and cost effective manner. You are bound by the following arbitration clause, which waives your right to litigation and to be heard by a judge. Please note that a court review of an arbitration award is limited. You also waive all your rights to a jury trial (if any) in any and all jurisdictions.
|
||||
|
||||
If a (potential) dispute arises, you must first use your reasonable efforts to resolve it amicably with Status by reaching out to Status’ legal team at legal@status.im. If these efforts do not result in a resolution of such dispute, you shall then send to legal@status.im a written notice of dispute setting out (i) the nature of the dispute, and the claim you are making; and (ii) the remedy you are seeking.
|
||||
|
||||
If you and Status are unable to further resolve this dispute within sixty (60) calendar days of Status receiving this notice of dispute, then any such dispute will be referred to and finally resolved by you and Status through an arbitration administered by the Swiss Chambers’ Arbitration Institution in accordance with the Swiss Rules of International Arbitration for the time being in force, which rules are deemed to be incorporated herein by reference. The arbitral decision may be enforced in any court. The arbitration will be held in Zug, Switzerland, and may be conducted via video conference virtual/online methods if possible. The tribunal will consist of one arbitrator, and all proceedings as well as communications between the parties will be kept confidential. The language of the arbitration will be in English. Payment of all relevant fees in respect of the arbitration, including filing, administration and arbitrator fees will be in accordance with the Swiss Rules of International Arbitration.
|
||||
|
||||
Regardless of any applicable statute of limitations, you must bring any claims within one year after the claim arose or the time when you should have reasonably known about the claim. You also waive the right to participate in a class action lawsuit or a classwide arbitration against Status.
|
||||
|
||||
|
||||
19. What happens if you stop using Status Software
|
||||
|
||||
If, at any time, you no longer agree to these terms, you must immediately stop using Status Software and uninstall it from all your devices. You acknowledge that even after uninstalling Status Software from all your devices, messages (including content) you have sent may still remain on the recipient’s device, blockchain transactions you have may still be recorded on the blockchain, and any smart contracts you have deployed to a blockchain may still remain deployed.
|
||||
|
||||
Even after you have stopped using Status Software, all provisions of these terms which by their nature should survive termination shall survive termination. These provisions include, but are not limited to, warranty disclaimers, indemnity, limitations of liability, dispute resolution, and governing law.
|
||||
|
||||
|
||||
20. General provisions
|
||||
|
||||
20.1 Entire agreement
|
||||
|
||||
These terms, including the underlying open source licences governing the Status Software, cover the entire agreement between you and Status regarding the Status Software. If these terms are considered an offer by Status, acceptance is expressly limited to these terms. Any failure by Status to exercise or enforce any right or provision of these terms will not constitute our waiver of such right or provision.
|
||||
|
||||
20.2 Severability
|
||||
|
||||
If any section of these terms is determined to be unlawful, void, or unenforceable, the unenforceable portion will be deemed to be severed from these terms. Such determination shall not affect the validity and enforceability of any other remaining provisions.
|
||||
|
||||
20.3 Captions and headings
|
||||
|
||||
The captions and headings identifying sections and subsections of these terms are for reference only and do not define, modify, expand, limit, or affect the interpretation of any provisions of these terms. Any illustrative graphics and links to websites are provided for your information and education, and, unless otherwise specifically indicated, they are not included in or part of these terms.
|
||||
|
||||
20.4 Changes to Status Software and terms
|
||||
|
||||
20.4.1 Changes to Status Software
|
||||
|
||||
Status Software is an open source, community-driven project. Users can both request and contribute to feature or functionality development by contacting us directly. Status may change or discontinue some or all features and functionality on Status Software at any time in our sole discretion, including features or support for certain devices. We will not be liable to you or any third party for any modification, suspension, or discontinuation of any features or functionality of Status Software. Any and all new functions added to Status Software are also subject to these terms.
|
||||
|
||||
20.4.2 Notice of changes to the terms
|
||||
|
||||
We reserve the right to modify or replace any part of these terms at any time and in our sole discretion. You are solely responsible for checking Status Software, or the relevant location where these terms are published, periodically for any changes. Your continued use of Status Software following changes to these terms means that you have accepted those changes. If you do not accept such changes, then you must immediately stop using Status Software and uninstall it from your devices.
|
||||
|
||||
20.5 Contact us
|
||||
|
||||
If you have any questions about these terms, please contact us at legal@status.im or through the appropriate means of communication indicated on Status’ website.
|
||||
|
||||
This document is CC-BY-SA.
|
||||
+5
-1
@@ -13,6 +13,7 @@
|
||||
[funcool/promesa "11.0.678"]
|
||||
|
||||
;; Dev dependencies
|
||||
[com.github.jpmonettas/flow-storm-inst "3.7.5"]
|
||||
[refactor-nrepl "3.9.1"]
|
||||
[cider/cider-nrepl "0.31.0"]
|
||||
[cider/piggieback "0.4.1"]
|
||||
@@ -53,7 +54,10 @@
|
||||
:dev {:devtools {:before-load-async status-im.setup.hot-reload/before-reload
|
||||
:after-load-async status-im.setup.hot-reload/reload
|
||||
:build-notify status-im.setup.hot-reload/build-notify
|
||||
:preloads [re-frisk-remote.preload
|
||||
:preloads [;; The official recommendation is to
|
||||
;; load the debugger preload first.
|
||||
flow-storm.api
|
||||
re-frisk-remote.preload
|
||||
status-im.setup.schema-preload
|
||||
;; In order to use component test helpers in the REPL we
|
||||
;; need to preload namespaces that are not normally required
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require
|
||||
["eth-phishing-detect" :as eth-phishing-detect]
|
||||
[clojure.string :as string]
|
||||
legacy.status-im.browser.effects
|
||||
[legacy.status-im.browser.permissions :as browser.permissions]
|
||||
[legacy.status-im.browser.webview-ref :as webview-ref]
|
||||
[legacy.status-im.ethereum.ens :as ens]
|
||||
@@ -11,7 +12,6 @@
|
||||
[legacy.status-im.utils.random :as random]
|
||||
[native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
[react-native.core :as react]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.common.json-rpc.events :as json-rpc]
|
||||
[status-im.common.universal-links :as links]
|
||||
@@ -315,8 +315,7 @@
|
||||
(navigation/change-tab :browser-stack)
|
||||
(update-browser browser)
|
||||
(resolve-url nil))
|
||||
(do (.openURL ^js react/linking (url/normalize-url url))
|
||||
nil)))))
|
||||
{:linking/open-url url}))))
|
||||
|
||||
(rf/defn open-existing-browser
|
||||
"Opens an existing browser with it's history"
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
(ns legacy.status-im.browser.effects
|
||||
(:require [clojure.string :as string]
|
||||
[react-native.core :as react]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.url :as url]))
|
||||
|
||||
(rf/reg-fx
|
||||
:linking/open-url
|
||||
(fn [url]
|
||||
(when (not (string/blank? url))
|
||||
(.openURL ^js react/linking (url/normalize-url url)))))
|
||||
@@ -106,7 +106,7 @@
|
||||
(get-in result [:db :pagination-info chat-id :cursor-clock-value])))
|
||||
(is (= cursor (get-in result [:db :pagination-info chat-id :cursor]))))))))))
|
||||
|
||||
(deftest message-loaded?
|
||||
(deftest message-loaded?-test
|
||||
(testing "it returns false when it's not in loaded message"
|
||||
(is
|
||||
(not
|
||||
@@ -117,7 +117,7 @@
|
||||
"a"
|
||||
"message-id"))))
|
||||
|
||||
(deftest earlier-than-deleted-at?
|
||||
(deftest earlier-than-deleted-at?-test
|
||||
(testing "it returns true when the clock-value is the same as the deleted-clock-value in chat"
|
||||
(is (#'legacy.status-im.chat.models.message/earlier-than-deleted-at?
|
||||
{:chats {"a" {:deleted-at-clock-value 1}}}
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
(def from
|
||||
"0x0424a68f89ba5fcd5e0640c1e1f591d561fa4125ca4e2a43592bc4123eca10ce064e522c254bb83079ba404327f6eafc01ec90a1444331fe769d3f3a7f90b0dde1")
|
||||
|
||||
(deftest message<-rpc
|
||||
(deftest message<-rpc-test
|
||||
(testing "message from RPC"
|
||||
(let [expected {:message-id message-id
|
||||
:content {:chat-id chat-id
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.ethereum.mnemonic :as mnemonic]))
|
||||
|
||||
(deftest valid-length?
|
||||
(deftest valid-length?-test
|
||||
(is (not (mnemonic/valid-length? "rate rate")))
|
||||
(is (not (mnemonic/valid-length? (string/join " " (repeat 13 "rate")))))
|
||||
(is (not (mnemonic/valid-length? (string/join " " (repeat 16 "rate")))))
|
||||
@@ -14,19 +14,19 @@
|
||||
(is (mnemonic/valid-length? (string/join " " (repeat 21 "rate"))))
|
||||
(is (mnemonic/valid-length? (string/join " " (repeat 24 "rate")))))
|
||||
|
||||
(deftest valid-words?
|
||||
(deftest valid-words?-test
|
||||
(is (not (mnemonic/valid-words? "rate! rate")))
|
||||
(is (not (mnemonic/valid-words? "rate rate rate rate rate rate rate rate rate rate rate rate?")))
|
||||
(is (mnemonic/valid-words? "rate rate rate rate rate rate rate rate rate rate rate rate")))
|
||||
|
||||
(deftest passphrase->words?
|
||||
(deftest passphrase->words?-test
|
||||
(is (= ["one" "two" "three" "for" "five" "six" "seven" "height" "nine" "ten" "eleven" "twelve"]
|
||||
(mnemonic/passphrase->words "one two three for five six seven height nine ten eleven twelve"))
|
||||
(= ["one" "two" "three" "for" "five" "six" "seven" "height" "nine" "ten" "eleven" "twelve"]
|
||||
(mnemonic/passphrase->words
|
||||
" one two three for five six seven height nine ten eleven twelve "))))
|
||||
|
||||
(deftest status-generate-phrase?
|
||||
(deftest status-generate-phrase?-test
|
||||
(is (mnemonic/status-generated-phrase?
|
||||
"game buzz method pretty olympic fat quit display velvet unveil marine crater"))
|
||||
(is (not (mnemonic/status-generated-phrase?
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[clojure.test :refer-macros [deftest is testing]]
|
||||
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]))
|
||||
|
||||
(deftest test-multiaccount-update
|
||||
(deftest multiaccount-update-test
|
||||
;;TODO this test case actually shows that we are doing a needless rpc call when
|
||||
;;there is no changes, but it is an edge case that shouldn't really happen
|
||||
(let [efx (multiaccounts.update/multiaccount-update
|
||||
@@ -15,7 +15,7 @@
|
||||
(is (json-rpc "settings_saveSetting"))
|
||||
(is (= (get-in efx [:db :profile/profile]) {:not-empty "would throw an error if was empty"}))))
|
||||
|
||||
(deftest test-clean-seed-phrase
|
||||
(deftest clean-seed-phrase-test
|
||||
(let [efx (multiaccounts.update/clean-seed-phrase
|
||||
{:db {:profile/profile {:mnemonic "lalalala"}}}
|
||||
{})
|
||||
@@ -23,7 +23,7 @@
|
||||
(is (json-rpc "settings_saveSetting"))
|
||||
(is (nil? (get-in efx [:db :profile/profile :mnemonic])))))
|
||||
|
||||
(deftest test-update-multiaccount-account-name
|
||||
(deftest update-multiaccount-account-name-test
|
||||
(let [cofx {:db {:profile/profile {:key-uid 1
|
||||
:name "name"
|
||||
:preferred-name "preferred-name"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[cljs.test :refer-macros [deftest is]]
|
||||
[legacy.status-im.utils.random :as random]))
|
||||
|
||||
(deftest test-seeded-rand-int
|
||||
(deftest seeded-rand-int-test
|
||||
;try with one seed
|
||||
(let [seed 0
|
||||
gen (random/rand-gen seed)]
|
||||
@@ -40,7 +40,7 @@
|
||||
(is (= (random/seeded-rand-int gen 10) 7))
|
||||
(is (= (random/seeded-rand-int gen 10) 8))))
|
||||
|
||||
(deftest test-seeded-rand-int-boundaries
|
||||
(deftest seeded-rand-int-boundaries-test
|
||||
(let [seed "6ec565f4fec866a54761524f603cf037e20c2bfa"
|
||||
n 10
|
||||
gen (random/rand-gen seed)
|
||||
@@ -53,7 +53,7 @@
|
||||
;calls got us the same number.
|
||||
(is (> (count sample) 1))))
|
||||
|
||||
(deftest test-seeded-rand-nth
|
||||
(deftest seeded-rand-nth-test
|
||||
(let [seed "6ec565f4fec866a54761524f603cf037e20c2bfa"
|
||||
gen (random/rand-gen seed)
|
||||
coll [:a :b :c :d :e :f :g]]
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.utils.signing-phrase.core :refer [generate]]))
|
||||
|
||||
(deftest test-generate
|
||||
(deftest generate-test
|
||||
(doseq [_ (range 30)]
|
||||
(let [result (generate)]
|
||||
(is (not (string/starts-with? result " ")))
|
||||
|
||||
+44
-17
@@ -359,9 +359,11 @@
|
||||
|
||||
(defn sign-message
|
||||
"NOTE: beware, the password in rpcParams has to be sha3 hashed"
|
||||
[rpcParams callback]
|
||||
(log/debug "[native-module] sign-message")
|
||||
(.signMessage ^js (encryption) rpcParams callback))
|
||||
([rpcParams]
|
||||
(native-utils/promisify-native-module-call sign-message rpcParams))
|
||||
([rpcParams callback]
|
||||
(log/debug "[native-module] sign-message")
|
||||
(.signMessage ^js (encryption) rpcParams callback)))
|
||||
|
||||
(defn recover-message
|
||||
[rpcParams callback]
|
||||
@@ -376,15 +378,19 @@
|
||||
|
||||
(defn sign-typed-data
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data")
|
||||
(.signTypedData ^js (encryption) data account hashed-password callback))
|
||||
([data account hashed-password]
|
||||
(native-utils/promisify-native-module-call sign-typed-data data account hashed-password))
|
||||
([data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data")
|
||||
(.signTypedData ^js (encryption) data account hashed-password callback)))
|
||||
|
||||
(defn sign-typed-data-v4
|
||||
"NOTE: beware, the password has to be sha3 hashed"
|
||||
[data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data-v4")
|
||||
(.signTypedDataV4 ^js (encryption) data account hashed-password callback))
|
||||
([data account hashed-password]
|
||||
(native-utils/promisify-native-module-call sign-typed-data-v4 data account hashed-password))
|
||||
([data account hashed-password callback]
|
||||
(log/debug "[native-module] sign-typed-data-v4")
|
||||
(.signTypedDataV4 ^js (encryption) data account hashed-password callback)))
|
||||
|
||||
(defn send-logs
|
||||
[dbJson js-logs callback]
|
||||
@@ -521,9 +527,11 @@
|
||||
|
||||
(defn validate-mnemonic
|
||||
"Validate that a mnemonic conforms to BIP39 dictionary/checksum standards"
|
||||
[mnemonic callback]
|
||||
(log/debug "[native-module] validate-mnemonic")
|
||||
(.validateMnemonic ^js (utils) mnemonic callback))
|
||||
([mnemonic]
|
||||
(native-utils/promisify-native-module-call validate-mnemonic mnemonic))
|
||||
([mnemonic callback]
|
||||
(log/debug "[native-module] validate-mnemonic")
|
||||
(.validateMnemonic ^js (utils) mnemonic callback)))
|
||||
|
||||
(defn delete-multiaccount
|
||||
"Delete multiaccount from database, deletes multiaccount's database and
|
||||
@@ -604,8 +612,27 @@
|
||||
|
||||
(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))
|
||||
([config-json]
|
||||
(native-utils/promisify-native-module-call get-connection-string-for-exporting-keypairs-keystores
|
||||
config-json))
|
||||
([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)))
|
||||
|
||||
(defn input-connection-string-for-importing-keypairs-keystores
|
||||
"Provides connection string to status-go for the purpose of importing keypairs and keystores on the receiver side"
|
||||
([connection-string config-json]
|
||||
(native-utils/promisify-native-module-call input-connection-string-for-importing-keypairs-keystores
|
||||
connection-string
|
||||
config-json))
|
||||
([connection-string config-json callback]
|
||||
(log/info "[native-module] Sending Import Keypairs Connection String"
|
||||
{:fn :input-connection-string-for-importing-keypairs-keystores
|
||||
:config-json config-json
|
||||
:connection-string connection-string})
|
||||
(.inputConnectionStringForImportingKeypairsKeystores ^js (network)
|
||||
connection-string
|
||||
config-json
|
||||
callback)))
|
||||
|
||||
@@ -44,14 +44,14 @@
|
||||
:monospace? - boolean (default: false) - use monospace font
|
||||
:lowercase? - boolean (default: false) - lowercase text
|
||||
:neutral? - boolean (default: false) - use neutral colors variant"
|
||||
[{:keys [full-name customization-color size monospace? lowercase? neutral?]
|
||||
[{:keys [full-name customization-color size monospace? lowercase? neutral? container-style]
|
||||
:or {size biggest-possible}}]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
circle-size (:size (size properties))
|
||||
small? (check-if-size-small size)
|
||||
initials (utils.string/get-initials full-name (if small? 1 2))]
|
||||
[rn/view
|
||||
{:style (style/container circle-size customization-color neutral? theme)}
|
||||
{:style (merge (style/container circle-size customization-color neutral? theme) container-style)}
|
||||
[text/text
|
||||
{:accessibility-label :wallet-user-avatar
|
||||
:size (:font-size (size properties))
|
||||
|
||||
@@ -79,8 +79,7 @@
|
||||
|
||||
(defn- context-tag-subtitle
|
||||
[{:keys [context-tag-type context icon community-logo community-name account-name emoji
|
||||
customization-color
|
||||
full-name profile-picture]}]
|
||||
customization-color full-name profile-picture blur?]}]
|
||||
(let [tag-type (or context-tag-type :account)]
|
||||
[rn/view
|
||||
{:accessibility-label :context-tag-wrapper
|
||||
@@ -97,7 +96,8 @@
|
||||
:profile-picture profile-picture
|
||||
:full-name full-name
|
||||
:context context
|
||||
:icon icon}]]))
|
||||
:icon icon
|
||||
:blur? blur?}]]))
|
||||
|
||||
(defn- description-subtitle
|
||||
[{:keys [theme blur? description]}]
|
||||
@@ -142,7 +142,8 @@
|
||||
:profile-picture profile-picture
|
||||
:full-name full-name
|
||||
:context context
|
||||
:icon icon}]
|
||||
:icon icon
|
||||
:blur? blur?}]
|
||||
|
||||
(and (not= :label type) description)
|
||||
[description-subtitle
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[cljs.test :refer-macros [deftest is testing]]
|
||||
[quo.components.graph.utils :as utils]))
|
||||
|
||||
(deftest find-highest-value
|
||||
(deftest find-highest-value-test
|
||||
(testing "Find highest value with a single map"
|
||||
(let [data [{:value 5}]]
|
||||
(is (= (utils/find-highest-value data) 5))))
|
||||
@@ -24,7 +24,7 @@
|
||||
(let [data (vec (for [num (range 1000)] {:value num}))]
|
||||
(is (= (utils/find-highest-value data) 999)))))
|
||||
|
||||
(deftest find-lowest-value
|
||||
(deftest find-lowest-value-test
|
||||
(testing "Find lowest value with a single map"
|
||||
(let [data [{:value 5}]]
|
||||
(is (= (utils/find-lowest-value data) 5))))
|
||||
@@ -45,7 +45,7 @@
|
||||
(let [data (vec (for [num (range 1000)] {:value num}))]
|
||||
(is (= (utils/find-lowest-value data) 0)))))
|
||||
|
||||
(deftest downsample-data
|
||||
(deftest downsample-data-test
|
||||
(testing "Downsampling is applied correctly when needed"
|
||||
(let [input-data [1 2 3 4 5 6 7 8 9 10]
|
||||
max-array-size 5
|
||||
@@ -77,7 +77,7 @@
|
||||
; 1000
|
||||
(is (= (utils/downsample-data large-data max-array-size) expected-output)))))
|
||||
|
||||
(deftest format-compact-number
|
||||
(deftest format-compact-number-test
|
||||
(testing "Format a whole number less than 1000"
|
||||
(is (= (utils/format-compact-number 567) "567")))
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
(testing "Format a number in trillions"
|
||||
(is (= (utils/format-compact-number 1234567890000) "1.23T"))))
|
||||
|
||||
(deftest calculate-x-axis-labels
|
||||
(deftest calculate-x-axis-labels-test
|
||||
(testing "Calculate x-axis labels with a small array and fewer elements"
|
||||
(let [data [{:date "2023-01-01"} {:date "2023-01-02"} {:date "2023-01-03"} {:date "2023-01-04"}]]
|
||||
(is (= (utils/calculate-x-axis-labels data 2) '("2023-01-01" "2023-01-03")))))
|
||||
@@ -123,7 +123,7 @@
|
||||
(let [data (vec (for [i (range 10)] {:date (str "2023-01-0" (inc i))}))]
|
||||
(is (= (utils/calculate-x-axis-labels data 1) '("2023-01-01"))))))
|
||||
|
||||
(deftest calculate-y-axis-labels
|
||||
(deftest calculate-y-axis-labels-test
|
||||
(testing "Calculate y-axis labels with positive values"
|
||||
(is (= (utils/calculate-y-axis-labels 0 10 5) ["0" "10" "20" "30" "40" "50"])))
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
(testing "Calculate y-axis labels with large step value and number of steps"
|
||||
(is (= (utils/calculate-y-axis-labels 100 1000 3) ["100" "1.1k" "2.1k" "3.1k"]))))
|
||||
|
||||
(deftest calculate-rounded-max
|
||||
(deftest calculate-rounded-max-test
|
||||
(testing "Calculate rounded max with a whole number"
|
||||
(is (= (utils/calculate-rounded-max 100) 108)))
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
(testing "Calculate rounded max with a large number"
|
||||
(is (= (utils/calculate-rounded-max 1000) 1052))))
|
||||
|
||||
(deftest calculate-rounded-min
|
||||
(deftest calculate-rounded-min-test
|
||||
(testing "Calculate rounded min with a whole number"
|
||||
(is (= (utils/calculate-rounded-min 157) 100)))
|
||||
|
||||
|
||||
@@ -28,6 +28,19 @@
|
||||
:border colors/danger-50-opa-10
|
||||
:icon colors/danger-50
|
||||
:text colors/danger-50}
|
||||
:close-button colors/white}
|
||||
:shell {:default {:bg colors/white-opa-5
|
||||
:border colors/white-opa-10
|
||||
:icon colors/white-opa-70
|
||||
:text colors/white}
|
||||
:informative {:bg colors/primary-50-opa-5
|
||||
:border colors/primary-50-opa-10
|
||||
:icon colors/primary-50
|
||||
:text colors/white}
|
||||
:error {:bg colors/danger-50-opa-5
|
||||
:border colors/danger-50-opa-10
|
||||
:icon colors/danger-50
|
||||
:text colors/danger-50}
|
||||
:close-button colors/white}})
|
||||
|
||||
(defn get-color
|
||||
|
||||
@@ -53,11 +53,11 @@
|
||||
:button-label string
|
||||
:on-button-press function
|
||||
:on-close function"
|
||||
[{:keys [type closed? icon style button-label
|
||||
[{:keys [type closed? blur? icon style button-label
|
||||
on-button-press on-close no-icon-color? icon-size]}
|
||||
message]
|
||||
(when-not closed?
|
||||
(let [theme (quo.theme/use-theme)
|
||||
(let [theme (if blur? :shell (quo.theme/use-theme))
|
||||
include-button? (not (string/blank? button-label))]
|
||||
[rn/view
|
||||
{:accessibility-label :information-box
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
(defn recovery-phrase-input
|
||||
[{:keys [customization-color blur? on-focus on-blur mark-errors?
|
||||
error-pred-current-word error-pred-written-words word-limit
|
||||
container-style placeholder-text-color]
|
||||
container-style placeholder-text-color on-input-ref]
|
||||
:or {customization-color :blue
|
||||
word-limit ##Inf
|
||||
error-pred-current-word (constantly false)
|
||||
@@ -60,7 +60,8 @@
|
||||
extra-props (apply dissoc props custom-props)]
|
||||
[rn/view {:style (style/container container-style)}
|
||||
[rn/text-input
|
||||
(merge {:accessibility-label :recovery-phrase-input
|
||||
(merge {:ref on-input-ref
|
||||
:accessibility-label :recovery-phrase-input
|
||||
:style (style/input theme)
|
||||
:placeholder-text-color (or placeholder-text-color
|
||||
(style/placeholder-color state theme blur?))
|
||||
|
||||
@@ -7,8 +7,8 @@
|
||||
{:dapp {:avatar nil
|
||||
:name "Coingecko"
|
||||
:value "coingecko.com"}
|
||||
:accessibility-label "dapp-coingecko"
|
||||
:state :default
|
||||
:action :icon
|
||||
:blur? false
|
||||
:customization-color :blue})
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
(h/is-truthy (h/get-by-text (:value (:dapp props)))))
|
||||
(h/test "on-press event"
|
||||
(let [mock-fn (h/mock-fn)]
|
||||
(h/render [dapp/view (assoc props :on-press-icon mock-fn)])
|
||||
(h/fire-event :press (h/get-by-test-id "dapp-component-icon"))
|
||||
(h/render [dapp/view (assoc props :on-press mock-fn)])
|
||||
(h/fire-event :press (h/get-by-label-text "dapp-coingecko"))
|
||||
(h/was-called mock-fn))))
|
||||
|
||||
@@ -1,24 +1,24 @@
|
||||
(ns quo.components.list-items.dapp.view
|
||||
(:require
|
||||
[quo.components.icon :as icons]
|
||||
[quo.components.list-items.dapp.style :as style]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]))
|
||||
|
||||
(defn view
|
||||
[{:keys [dapp action on-press on-press-icon] :as props}]
|
||||
[{:keys [dapp on-press right-component accessibility-label] :as props}]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
[pressed? set-pressed] (rn/use-state false)
|
||||
on-press-in (rn/use-callback #(set-pressed true))
|
||||
on-press-out (rn/use-callback #(set-pressed false))]
|
||||
[rn/pressable
|
||||
{:style (style/container (assoc props :pressed? pressed?))
|
||||
:on-press on-press
|
||||
:on-press-in on-press-in
|
||||
:on-press-out on-press-out}
|
||||
{:style (style/container (assoc props :pressed? pressed?))
|
||||
:accessibility-label accessibility-label
|
||||
:on-press (when on-press
|
||||
(fn [] (on-press dapp)))
|
||||
:on-press-in on-press-in
|
||||
:on-press-out on-press-out}
|
||||
[rn/view {:style style/container-info}
|
||||
[fast-image/fast-image
|
||||
{:source (:avatar dapp)
|
||||
@@ -34,13 +34,5 @@
|
||||
:size :paragraph-2
|
||||
:style (style/style-text-value theme)}
|
||||
(:value dapp)]]]
|
||||
(when (= action :icon)
|
||||
[rn/pressable
|
||||
{:on-press on-press-icon
|
||||
:testID "dapp-component-icon"}
|
||||
[icons/icon :i/options
|
||||
{:color (colors/theme-colors
|
||||
colors/neutral-50
|
||||
colors/neutral-40
|
||||
theme)
|
||||
:accessibility-label :icon}]])]))
|
||||
(when right-component
|
||||
[right-component dapp])]))
|
||||
|
||||
@@ -4,10 +4,10 @@
|
||||
[quo.components.icon :as icon]
|
||||
[quo.components.list-items.saved-address.style :as style]
|
||||
[quo.components.markdown.text :as text]
|
||||
[quo.components.wallet.address-text.view :as address-text]
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme :as quo.theme]
|
||||
[react-native.core :as rn]
|
||||
[utils.address :as address]))
|
||||
[react-native.core :as rn]))
|
||||
|
||||
(defn- left-container
|
||||
[{:keys [blur? name ens address customization-color]}]
|
||||
@@ -23,15 +23,19 @@
|
||||
:size :paragraph-1
|
||||
:style style/name-text}
|
||||
name]
|
||||
[text/text {:size :paragraph-2}
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :monospace
|
||||
:style (style/account-address blur? theme)}
|
||||
(or ens (address/get-shortened-key address))]]]]))
|
||||
(if ens
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:weight :monospace
|
||||
:style (style/account-address blur? theme)} ens]
|
||||
[address-text/view
|
||||
{:address address
|
||||
:full-address? true
|
||||
:format :short
|
||||
:blur? blur?}])]]))
|
||||
|
||||
(defn view
|
||||
[{:keys [blur? user-props active-state? customization-color on-press on-options-press]
|
||||
[{:keys [blur? user-props active-state? customization-color on-press on-options-press container-style]
|
||||
:or {customization-color :blue
|
||||
blur? false}}]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
@@ -52,8 +56,9 @@
|
||||
(set-state new-state)))
|
||||
[active-state?])]
|
||||
[rn/pressable
|
||||
{:style (style/container
|
||||
{:state state :blur? blur? :customization-color customization-color})
|
||||
{:style (merge (style/container
|
||||
{:state state :blur? blur? :customization-color customization-color})
|
||||
container-style)
|
||||
:on-press-in on-press-in
|
||||
:on-press-out on-press-out
|
||||
:on-press on-press
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
:justify-content :space-between
|
||||
:align-items :center})
|
||||
|
||||
(def icon-container
|
||||
{:flex-grow 1
|
||||
:flex-basis 1})
|
||||
|
||||
(defn center-content-container
|
||||
[centered?]
|
||||
{:flex 1
|
||||
@@ -21,13 +25,19 @@
|
||||
:justify-content (if centered? :center :flex-start)})
|
||||
|
||||
(def right-actions-container
|
||||
{:flex-direction :row})
|
||||
{:flex-direction :row
|
||||
:justify-content :flex-end})
|
||||
|
||||
(def right-actions-spacing
|
||||
{:width 12})
|
||||
|
||||
(def right-content-min-size
|
||||
{:min-width 32 :min-height 32})
|
||||
(defn right-content
|
||||
[min-size?]
|
||||
(merge
|
||||
{:flex-grow 1
|
||||
:flex-basis 1}
|
||||
(when min-size?
|
||||
{:min-height 32})))
|
||||
|
||||
(def token-logo
|
||||
{:width 16 :height 16})
|
||||
|
||||
@@ -30,16 +30,17 @@
|
||||
& children]
|
||||
(into [rn/view {:style (style/container margin-top)}
|
||||
(when icon-name
|
||||
[button/button
|
||||
{:type (button-type background)
|
||||
:icon-only? true
|
||||
:size 32
|
||||
:on-press on-press
|
||||
:background (if behind-overlay?
|
||||
:blur
|
||||
(when (button-properties/backgrounds background) background))
|
||||
:accessibility-label accessibility-label}
|
||||
icon-name])]
|
||||
[rn/view {:style style/icon-container}
|
||||
[button/button
|
||||
{:type (button-type background)
|
||||
:icon-only? true
|
||||
:size 32
|
||||
:on-press on-press
|
||||
:background (if behind-overlay?
|
||||
:blur
|
||||
(when (button-properties/backgrounds background) background))
|
||||
:accessibility-label accessibility-label}
|
||||
icon-name]])]
|
||||
children))
|
||||
|
||||
(defn- right-section-spacing [] [rn/view {:style style/right-actions-spacing}])
|
||||
@@ -88,7 +89,7 @@
|
||||
[{:keys [background content max-actions min-size? support-account-switcher?
|
||||
behind-overlay?]
|
||||
:or {support-account-switcher? true}}]
|
||||
[rn/view (when min-size? {:style style/right-content-min-size})
|
||||
[rn/view (style/right-content min-size?)
|
||||
(when (coll? content)
|
||||
(into [rn/view {:style style/right-actions-container}]
|
||||
(add-right-buttons-xf max-actions background behind-overlay? support-account-switcher?)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
(defn overlay-background
|
||||
[type]
|
||||
(let [background-color (case type
|
||||
:shell colors/neutral-80-opa-80-blur
|
||||
:shell colors/overlay-background-blur
|
||||
:drawer colors/neutral-100-opa-70-blur
|
||||
nil)]
|
||||
{:position :absolute
|
||||
|
||||
@@ -7,13 +7,12 @@
|
||||
{:left 0
|
||||
:right 0
|
||||
:padding-horizontal 20
|
||||
:padding-top (when label 12)
|
||||
:padding-top (if label 12 8)
|
||||
:padding-bottom 8})
|
||||
|
||||
(defn settings-items
|
||||
[{:keys [label blur?]} theme]
|
||||
{:margin-top (if label 12 4)
|
||||
:border-radius 16
|
||||
[{:keys [blur?]} theme]
|
||||
{:border-radius 16
|
||||
:background-color (if blur?
|
||||
colors/white-opa-5
|
||||
(colors/theme-colors colors/white colors/neutral-95 theme))
|
||||
@@ -24,9 +23,10 @@
|
||||
|
||||
(defn label
|
||||
[{:keys [blur?]} theme]
|
||||
{:color (if blur?
|
||||
colors/white-opa-40
|
||||
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))})
|
||||
{:margin-bottom 12
|
||||
:color (if blur?
|
||||
colors/white-opa-40
|
||||
(colors/theme-colors colors/neutral-50 colors/neutral-40 theme))})
|
||||
|
||||
(def reorder-items
|
||||
{:margin-top 12})
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
[:type {:optional true}
|
||||
[:maybe
|
||||
[:enum :default :multiuser :group :channel :community :token :network :multinetwork :account
|
||||
:collectible :address :icon :audio]]]
|
||||
:collectible :address :icon :audio :wallet-user]]]
|
||||
[:customization-color {:optional true} [:maybe :schema.common/customization-color]]
|
||||
[:container-style {:optional true} [:maybe :map]]
|
||||
[:blur? {:optional true} [:maybe :boolean]]
|
||||
@@ -83,6 +83,10 @@
|
||||
[:map
|
||||
[:duration {:optional true} [:maybe :string]]])
|
||||
|
||||
(def ^:private ?wallet-user
|
||||
[:map
|
||||
[:full-name {:optional true} [:maybe :string]]])
|
||||
|
||||
(def ?schema
|
||||
[:=>
|
||||
[:catn
|
||||
@@ -101,5 +105,6 @@
|
||||
[:collectible [:merge ?collectible ?size ?context-base]]
|
||||
[:address [:merge ?address ?size ?context-base]]
|
||||
[:icon [:merge ?icon ?size ?context-base]]
|
||||
[:audio [:merge ?audio ?context-base]]]]]
|
||||
[:audio [:merge ?audio ?context-base]]
|
||||
[:wallet-user [:merge ?wallet-user ?size ?context-base]]]]]
|
||||
:any])
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
[quo.components.avatars.account-avatar.view :as account-avatar]
|
||||
[quo.components.avatars.group-avatar.view :as group-avatar]
|
||||
[quo.components.avatars.user-avatar.view :as user-avatar]
|
||||
[quo.components.avatars.wallet-user-avatar.view :as wallet-user-avatar]
|
||||
[quo.components.icon :as icons]
|
||||
[quo.components.list-items.preview-list.view :as preview-list]
|
||||
[quo.components.markdown.text :as text]
|
||||
@@ -162,6 +163,13 @@
|
||||
:icon
|
||||
[icon-tag props]
|
||||
|
||||
:wallet-user
|
||||
[tag-skeleton {:theme theme :size size :text full-name}
|
||||
[wallet-user-avatar/wallet-user-avatar
|
||||
{:full-name full-name
|
||||
:size (if (= size 24) :size-20 :size-24)
|
||||
:customization-color customization-color}]]
|
||||
|
||||
nil)]]))
|
||||
|
||||
(def view (schema/instrument #'view-internal component-schema/?schema))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo.components.text-combinations.standard-title.component-spec
|
||||
(:require [quo.components.text-combinations.standard-title.view :as standard-title]
|
||||
(:require [quo.components.markdown.text :as text]
|
||||
[quo.components.text-combinations.standard-title.view :as standard-title]
|
||||
[test-helpers.component :as h]))
|
||||
|
||||
(h/describe "Text combinations - Standard title"
|
||||
@@ -48,4 +49,12 @@
|
||||
:right :tag
|
||||
:on-press on-press-fn}])
|
||||
(h/fire-event :on-press (h/get-by-label-text :standard-title-tag))
|
||||
(h/was-called-times on-press-fn 1)))))
|
||||
(h/was-called-times on-press-fn 1))))
|
||||
|
||||
(h/describe "Custom content variant"
|
||||
(h/test "Default render"
|
||||
(h/render [standard-title/view
|
||||
{:title "This is a title"
|
||||
:right [text/text "Right"]}])
|
||||
(h/is-truthy (h/get-by-text "This is a title"))
|
||||
(h/is-truthy (h/get-by-text "Right")))))
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
(:require [quo.foundations.colors :as colors]))
|
||||
|
||||
(def container
|
||||
{:flex-direction :row
|
||||
{:flex 1
|
||||
:flex-direction :row
|
||||
:justify-content :space-between})
|
||||
|
||||
(def right-counter
|
||||
|
||||
@@ -66,4 +66,4 @@
|
||||
:counter [right-counter props]
|
||||
:action [right-action props]
|
||||
:tag [right-tag props]
|
||||
nil)])
|
||||
right)])
|
||||
|
||||
@@ -11,4 +11,4 @@
|
||||
|
||||
(defn alert-icon-color
|
||||
[theme]
|
||||
(colors/theme-colors colors/neutral-50 colors/white theme))
|
||||
(colors/theme-colors colors/neutral-80-opa-60 colors/white-70-blur theme))
|
||||
|
||||
@@ -12,29 +12,38 @@
|
||||
|
||||
(defn card
|
||||
[{:keys [customization-color type theme pressed? metrics?]}]
|
||||
{:width 161
|
||||
:height (if metrics? 88 68)
|
||||
:background-color (when (not= :watch-only type)
|
||||
(colors/theme-colors
|
||||
(colors/resolve-color customization-color
|
||||
theme
|
||||
(when (= :missing-keypair type) (if pressed? 20 10)))
|
||||
(colors/resolve-color customization-color
|
||||
theme
|
||||
(when (= :missing-keypair type) (if pressed? 30 20)))
|
||||
theme))
|
||||
:border-radius 16
|
||||
:border-width 1
|
||||
:border-color (if (or (= :missing-keypair type)
|
||||
(= :watch-only type))
|
||||
(colors/theme-colors
|
||||
(if pressed? colors/neutral-80-opa-10 colors/neutral-80-opa-5)
|
||||
(if pressed? colors/white-opa-10 colors/white-opa-5)
|
||||
theme)
|
||||
colors/neutral-80-opa-10)
|
||||
:padding-horizontal 12
|
||||
:padding-top 6
|
||||
:padding-bottom 9})
|
||||
(let [missing-keypair? (= :missing-keypair type)
|
||||
watch-only? (= :watch-only type)]
|
||||
{:width 161
|
||||
:height (if metrics? 88 68)
|
||||
:background-color (when (and (not missing-keypair?) (not watch-only?))
|
||||
(colors/theme-colors
|
||||
(colors/resolve-color customization-color
|
||||
theme
|
||||
(when missing-keypair? (if pressed? 20 10)))
|
||||
(colors/resolve-color customization-color
|
||||
theme
|
||||
(when missing-keypair? (if pressed? 30 20)))
|
||||
theme))
|
||||
:border-radius 16
|
||||
:border-style (if missing-keypair? :dashed :solid)
|
||||
:border-width 1
|
||||
:border-color (cond
|
||||
watch-only?
|
||||
(colors/theme-colors
|
||||
(if pressed? colors/neutral-80-opa-10 colors/neutral-80-opa-5)
|
||||
(if pressed? colors/white-opa-10 colors/white-opa-5)
|
||||
theme)
|
||||
missing-keypair?
|
||||
(colors/theme-colors
|
||||
(if pressed? colors/neutral-40 colors/neutral-30)
|
||||
(if pressed? colors/neutral-70 colors/neutral-80)
|
||||
theme)
|
||||
:else
|
||||
colors/neutral-80-opa-10)
|
||||
:padding-horizontal 12
|
||||
:padding-top 6
|
||||
:padding-bottom 9}))
|
||||
|
||||
(def profile-container
|
||||
{:margin-bottom 8
|
||||
@@ -100,10 +109,12 @@
|
||||
:line-height 20})
|
||||
|
||||
(defn loader-view
|
||||
[{:keys [width height watch-only? theme]}]
|
||||
[{:keys [width height watch-only? theme missing-keypair?]}]
|
||||
{:width width
|
||||
:height height
|
||||
:background-color (if (and watch-only? (= :light theme)) colors/neutral-80-opa-5 colors/white-opa-10)
|
||||
:background-color (if (and (or missing-keypair? watch-only?) (= :light theme))
|
||||
colors/neutral-80-opa-5
|
||||
colors/white-opa-10)
|
||||
:border-radius 6})
|
||||
|
||||
(def loader-container
|
||||
|
||||
@@ -15,8 +15,9 @@
|
||||
|
||||
(defn- loading-view
|
||||
[{:keys [customization-color type theme metrics?]}]
|
||||
(let [watch-only? (= :watch-only type)
|
||||
empty-type? (= :empty type)]
|
||||
(let [missing-keypair? (= :missing-keypair type)
|
||||
watch-only? (= :watch-only type)
|
||||
empty-type? (= :empty type)]
|
||||
[rn/view
|
||||
{:accessibility-label :loading
|
||||
:style (style/card {:customization-color customization-color
|
||||
@@ -26,33 +27,37 @@
|
||||
:metrics? metrics?})}
|
||||
[rn/view {:style style/loader-container}
|
||||
[rn/view
|
||||
{:style (assoc (style/loader-view {:width 16
|
||||
:height 16
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
{:style (assoc (style/loader-view {:width 16
|
||||
:height 16
|
||||
:missing-keypair? missing-keypair?
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
:margin-right 8
|
||||
:margin-top 2)}]
|
||||
[rn/view {:style style/watch-only-container}
|
||||
[rn/view
|
||||
{:style (style/loader-view {:width 57
|
||||
:height 8
|
||||
:watch-only? watch-only?
|
||||
:theme theme})}]
|
||||
{:style (style/loader-view {:width 57
|
||||
:height 8
|
||||
:missing-keypair? missing-keypair?
|
||||
:watch-only? watch-only?
|
||||
:theme theme})}]
|
||||
(when watch-only? [icon/icon :i/reveal {:color colors/neutral-50 :size 12}])]]
|
||||
[rn/view
|
||||
{:style (assoc (style/loader-view {:width (if empty-type? 56 80)
|
||||
:height 16
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
{:style (assoc (style/loader-view {:width (if empty-type? 56 80)
|
||||
:height 16
|
||||
:missing-keypair? missing-keypair?
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
:margin-top
|
||||
13)}]
|
||||
(when metrics?
|
||||
[rn/view
|
||||
{:accessibility-label :metrics
|
||||
:style (assoc (style/loader-view {:width (if empty-type? 37 96)
|
||||
:height 8
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
:style (assoc (style/loader-view {:width (if empty-type? 37 96)
|
||||
:height 8
|
||||
:missing-keypair? missing-keypair?
|
||||
:watch-only? watch-only?
|
||||
:theme theme})
|
||||
:margin-top
|
||||
10)}])]))
|
||||
|
||||
@@ -154,7 +159,7 @@
|
||||
[gradient-overview theme customization-color])])))
|
||||
|
||||
(defn- add-account-view
|
||||
[{:keys [on-press customization-color metrics?]}]
|
||||
[{:keys [on-press metrics?]}]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
[pressed? set-pressed] (rn/use-state false)
|
||||
on-press-in (rn/use-callback #(set-pressed true))
|
||||
@@ -168,13 +173,12 @@
|
||||
:pressed? pressed?})}
|
||||
[button/button
|
||||
{:on-press on-press
|
||||
:type :primary
|
||||
:size 24
|
||||
:type :ghost
|
||||
:size 32
|
||||
:icon true
|
||||
:accessibility-label :add-account
|
||||
:pressed? pressed?
|
||||
:icon-only? true
|
||||
:customization-color customization-color}
|
||||
:icon-only? true}
|
||||
:i/add]]))
|
||||
|
||||
(defn- view-internal
|
||||
|
||||
@@ -13,7 +13,13 @@
|
||||
{:top 1})
|
||||
|
||||
(def title-info-container
|
||||
{:padding-left 8})
|
||||
{:padding-left 8
|
||||
:flex 1})
|
||||
|
||||
(def title-row
|
||||
{:display :flex
|
||||
:flex-direction :row
|
||||
:justify-content :space-between})
|
||||
|
||||
(def title-container
|
||||
{:align-items :flex-start
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns quo.components.wallet.missing-keypairs.view
|
||||
(:require
|
||||
[quo.components.buttons.button.view :as button]
|
||||
[quo.components.icon :as icon]
|
||||
[quo.components.list-items.missing-keypair.view :as missing-keypair]
|
||||
[quo.components.markdown.text :as text]
|
||||
@@ -10,7 +11,7 @@
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
(defn title-view
|
||||
[{:keys [keypairs blur?]}]
|
||||
[{:keys [keypairs blur? on-import-press]}]
|
||||
(let [theme (quo.theme/use-theme)]
|
||||
[rn/view
|
||||
{:accessibility-label :title
|
||||
@@ -22,11 +23,18 @@
|
||||
:color colors/warning-60}]]
|
||||
[rn/view
|
||||
{:style style/title-info-container}
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:style {:color colors/warning-60}}
|
||||
(i18n/label :t/amount-missing-keypairs
|
||||
{:amount (str (count keypairs))})]
|
||||
[rn/view {:style style/title-row}
|
||||
[text/text
|
||||
{:weight :medium
|
||||
:style {:color colors/warning-60}}
|
||||
(i18n/label :t/amount-missing-keypairs
|
||||
{:amount (str (count keypairs))})]
|
||||
[button/button
|
||||
{:type :outline
|
||||
:background :blur
|
||||
:size 24
|
||||
:on-press on-import-press}
|
||||
(i18n/label :t/import)]]
|
||||
[text/text
|
||||
{:size :paragraph-2
|
||||
:style (style/subtitle blur? theme)}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
(ns quo.components.wallet.network-bridge.schema)
|
||||
|
||||
(def ^:private ?network-bridge-status
|
||||
[:enum :add :loading :locked :disabled :default])
|
||||
[:enum :edit :loading :locked :disabled :default])
|
||||
|
||||
(def ?schema
|
||||
[:=>
|
||||
|
||||
@@ -18,7 +18,11 @@
|
||||
(style/add-container theme)
|
||||
container-style)
|
||||
:on-press on-press}
|
||||
[icon/icon :i/add-circle {:size 12 :no-color true}]])
|
||||
[icon/icon :i/edit
|
||||
{:size 12
|
||||
:color (colors/theme-colors colors/neutral-50
|
||||
colors/neutral-60
|
||||
theme)}]])
|
||||
|
||||
(defn- network->text
|
||||
[network]
|
||||
@@ -29,7 +33,7 @@
|
||||
(defn view-internal
|
||||
[{:keys [network status amount container-style on-press] :as args}]
|
||||
(let [theme (quo.theme/use-theme)]
|
||||
(if (= status :add)
|
||||
(if (= status :edit)
|
||||
[network-bridge-add (assoc args :theme theme)]
|
||||
[rn/pressable
|
||||
{:style (merge (style/container network status theme) container-style)
|
||||
|
||||
@@ -141,6 +141,9 @@
|
||||
(def neutral-95-opa-70-blur neutral-95-opa-70)
|
||||
(def neutral-100-opa-70-blur (if platform/android? neutral-100-opa-70 "#0D1014B3"))
|
||||
|
||||
(def overlay-background-blur (if platform/android? (alpha "#192438" 0.8) "#242830cc"))
|
||||
(def bottom-sheet-background-blur (if platform/ios? "#ED9D1D0D" neutral-100-opa-90))
|
||||
|
||||
;;;;Black
|
||||
|
||||
;;Solid
|
||||
|
||||
@@ -30,5 +30,5 @@
|
||||
"when using opacity theme is ignored and uses the light suffix resolver"
|
||||
(is (colors/resolve-color :blue :light 10) (colors/resolve-color :blue :dark 10))))
|
||||
|
||||
(deftest test-account-colors-customization
|
||||
(deftest account-colors-customization-test
|
||||
(is (every? #(contains? colors/customization %) colors/account-colors)))
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
(def ^:private ^:const android-not-available-error-message "Biometric hardware unavailable")
|
||||
(def ^:private ^:const android-not-enrolled-error-message "No fingerprints enrolled.")
|
||||
(def ^:private ^:const android-too-many-attempts-error-message
|
||||
"Too many attempts. Use screen lock instead.")
|
||||
(def ^:private ^:const ios-not-enrolled-error-message "No identities are enrolled")
|
||||
|
||||
(defn get-supported-type
|
||||
@@ -39,8 +41,9 @@
|
||||
[message]
|
||||
(let [cause (if platform/android?
|
||||
(condp = message
|
||||
android-not-enrolled-error-message :biometrics/not-enrolled-error
|
||||
android-not-available-error-message :biometrics/not-available-error
|
||||
android-not-enrolled-error-message :biometrics/not-enrolled-error
|
||||
android-not-available-error-message :biometrics/not-available-error
|
||||
android-too-many-attempts-error-message :biometric/too-many-attempts
|
||||
:biometrics/unknown-error)
|
||||
|
||||
(condp #(string/includes? %2 %1) message
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns react-native.wallet-connect
|
||||
(:require
|
||||
["@walletconnect/core" :refer [Core]]
|
||||
["@walletconnect/utils" :refer [buildApprovedNamespaces]]
|
||||
["@walletconnect/utils" :refer
|
||||
[buildApprovedNamespaces getSdkError parseUri]]
|
||||
["@walletconnect/web3wallet" :refer [Web3Wallet]]))
|
||||
|
||||
(defn- wallet-connect-core
|
||||
@@ -20,3 +21,13 @@
|
||||
(buildApprovedNamespaces
|
||||
(clj->js {:proposal proposal
|
||||
:supportedNamespaces supported-namespaces})))
|
||||
|
||||
(defn get-sdk-error
|
||||
[error-key]
|
||||
(getSdkError error-key))
|
||||
|
||||
(defn parse-uri
|
||||
[uri]
|
||||
(-> uri
|
||||
parseUri
|
||||
(js->clj :keywordize-keys true)))
|
||||
|
||||
@@ -32,8 +32,16 @@
|
||||
[{:keys [db]}]
|
||||
{:db (dissoc db :alert-banners/hide?)})
|
||||
|
||||
;; When push notifications are enabled and the app is closed then overlays get dismissed,
|
||||
;; we need to restore them once app is relaunched
|
||||
(defn restore-alert-banners
|
||||
[{:keys [db]}]
|
||||
(when-not (zero? (count (get db :alert-banners)))
|
||||
{:show-alert-banner [(:view-id db) (:theme db)]}))
|
||||
|
||||
(re-frame/reg-event-fx :alert-banners/add add-alert-banner)
|
||||
(re-frame/reg-event-fx :alert-banners/remove remove-alert-banner)
|
||||
(re-frame/reg-event-fx :alert-banners/remove-all remove-all-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/hide hide-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/unhide unhide-alert-banners)
|
||||
(re-frame/reg-event-fx :alert-banners/restore-alert-banners restore-alert-banners)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
matcher-combinators.test
|
||||
[status-im.common.alert-banner.events :as events]))
|
||||
|
||||
(deftest add-alert-banner
|
||||
(deftest add-alert-banner-test
|
||||
(testing "Alert banner is added"
|
||||
(is (match? {:db {:alert-banners
|
||||
{:alert {:text "Alert"
|
||||
@@ -14,7 +14,7 @@
|
||||
[{:text "Alert"
|
||||
:type :alert}])))))
|
||||
|
||||
(deftest remove-alert-banner
|
||||
(deftest remove-alert-banner-test
|
||||
(testing "Alert banner is removed"
|
||||
(is (match? {:db {}
|
||||
:hide-alert-banner [nil nil]}
|
||||
@@ -31,7 +31,7 @@
|
||||
:type :alert}}}}
|
||||
[:error])))))
|
||||
|
||||
(deftest remove-all-alert-banners
|
||||
(deftest remove-all-alert-banners-test
|
||||
(testing "All Alert banners are removed"
|
||||
(is (match? {:db {}
|
||||
:hide-alert-banner [nil nil]}
|
||||
|
||||
@@ -13,10 +13,14 @@
|
||||
|
||||
(defn show-message
|
||||
[_ [code]]
|
||||
(let [content (if (#{:biometrics/not-enrolled-error
|
||||
:biometrics/not-available-error}
|
||||
code)
|
||||
(let [content (case code
|
||||
(:biometrics/not-enrolled-error
|
||||
:biometrics/not-available-error)
|
||||
(i18n/label :t/grant-face-id-permissions)
|
||||
|
||||
:biometric/too-many-attempts
|
||||
(i18n/label :t/biometric-too-many-attempts)
|
||||
|
||||
(i18n/label :t/biometric-auth-error {:code code}))]
|
||||
{:fx [[:effects.utils/show-popup
|
||||
{:title (i18n/label :t/biometric-auth-login-error-title)
|
||||
|
||||
@@ -22,13 +22,22 @@
|
||||
:left 0
|
||||
:right 0})
|
||||
|
||||
(def shell-bg
|
||||
{:position :absolute
|
||||
:background-color (if platform/ios? colors/white-opa-5 colors/neutral-100-opa-90)
|
||||
:left 0
|
||||
:right 0
|
||||
:top 0
|
||||
:bottom 0})
|
||||
(defn shell-bg
|
||||
[blur-background]
|
||||
{:background-color (if blur-background
|
||||
blur-background
|
||||
(if platform/ios? colors/white-opa-5 colors/neutral-100-opa-90))
|
||||
:flex 1})
|
||||
|
||||
(def shell-bg-container
|
||||
{:border-top-left-radius sheet-border-radius
|
||||
:border-top-right-radius sheet-border-radius
|
||||
:left 0
|
||||
:right 0
|
||||
:top 0
|
||||
:bottom 0
|
||||
:position :absolute
|
||||
:overflow :hidden})
|
||||
|
||||
(defn sheet-content
|
||||
[{:keys [theme padding-bottom shell?]}]
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
(defn view
|
||||
[{:keys [hide? insets]}
|
||||
{:keys [content selected-item padding-bottom-override border-radius on-close shell?
|
||||
gradient-cover? customization-color hide-handle? blur-radius]
|
||||
gradient-cover? customization-color hide-handle? blur-radius blur-background]
|
||||
:or {border-radius 12}}]
|
||||
(let [theme (quo.theme/use-theme)
|
||||
{window-height :height} (rn/get-window)
|
||||
@@ -133,12 +133,13 @@
|
||||
{:transform [{:translateY translate-y}]}
|
||||
(style/sheet {:max-height sheet-max-height}))}
|
||||
(when shell?
|
||||
[blur/ios-view
|
||||
{:style style/shell-bg
|
||||
:blur-radius (or blur-radius 20)
|
||||
:blur-amount 32
|
||||
:blur-type :transparent
|
||||
:overlay-color :transparent}])
|
||||
[rn/view {:style style/shell-bg-container}
|
||||
[blur/ios-view
|
||||
{:style (style/shell-bg blur-background)
|
||||
:blur-radius (or blur-radius 20)
|
||||
:blur-amount 32
|
||||
:blur-type :transparent
|
||||
:overlay-color :transparent}]])
|
||||
(when selected-item
|
||||
[rn/view
|
||||
{:on-layout handle-item-height
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
(:require
|
||||
[quo.foundations.colors :as colors]
|
||||
[quo.theme]
|
||||
[react-native.reanimated :as reanimated]))
|
||||
[react-native.reanimated :as reanimated]
|
||||
[status-im.constants :as constants]))
|
||||
|
||||
(defn container
|
||||
[padding-top]
|
||||
@@ -35,7 +36,7 @@
|
||||
{:left 0
|
||||
:right 0
|
||||
:top 0
|
||||
:height 20
|
||||
:height constants/sheet-screen-handle-height
|
||||
:z-index 2
|
||||
:position :absolute
|
||||
:justify-content :center
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
(def init-state
|
||||
{:value ""
|
||||
:error? false
|
||||
:upper-limit nil})
|
||||
:upper-limit nil
|
||||
:lower-limit nil})
|
||||
|
||||
(defn input-value
|
||||
[state]
|
||||
@@ -23,19 +24,31 @@
|
||||
[state error?]
|
||||
(assoc state :error? error?))
|
||||
|
||||
(defn- upper-limit
|
||||
(defn upper-limit
|
||||
[state]
|
||||
(:upper-limit state))
|
||||
|
||||
(defn lower-limit
|
||||
[state]
|
||||
(:lower-limit state))
|
||||
|
||||
(defn upper-limit-exceeded?
|
||||
[state]
|
||||
(and
|
||||
(upper-limit state)
|
||||
(> (numeric-value state) (upper-limit state))))
|
||||
|
||||
(defn lower-limit-exceeded?
|
||||
[state]
|
||||
(and
|
||||
(lower-limit state)
|
||||
(< (numeric-value state) (lower-limit state))))
|
||||
|
||||
(defn- recheck-errorness
|
||||
[state]
|
||||
(set-input-error state (upper-limit-exceeded? state)))
|
||||
(set-input-error state
|
||||
(or (upper-limit-exceeded? state)
|
||||
(lower-limit-exceeded? state))))
|
||||
|
||||
(defn set-input-value
|
||||
[state value]
|
||||
@@ -43,12 +56,33 @@
|
||||
(assoc :value value)
|
||||
recheck-errorness))
|
||||
|
||||
(defn set-numeric-value
|
||||
[state value]
|
||||
(set-input-value state (str value)))
|
||||
|
||||
(defn set-upper-limit
|
||||
[state limit]
|
||||
(when limit
|
||||
(-> state
|
||||
(assoc :upper-limit limit)
|
||||
recheck-errorness)))
|
||||
|
||||
(defn set-lower-limit
|
||||
[state limit]
|
||||
(-> state
|
||||
(assoc :upper-limit limit)
|
||||
(assoc :lower-limit limit)
|
||||
recheck-errorness))
|
||||
|
||||
(defn increase
|
||||
[state]
|
||||
(let [new-val (inc (numeric-value state))]
|
||||
(set-input-value state (str new-val))))
|
||||
|
||||
(defn decrease
|
||||
[state]
|
||||
(let [new-val (dec (numeric-value state))]
|
||||
(set-input-value state (str new-val))))
|
||||
|
||||
(def ^:private not-digits-or-dot-pattern
|
||||
#"[^0-9+\.]")
|
||||
|
||||
|
||||
@@ -31,10 +31,10 @@
|
||||
(comp not word-in-dictionary?))
|
||||
|
||||
(defn- header
|
||||
[seed-phrase-count]
|
||||
[text seed-phrase-count]
|
||||
[rn/view {:style style/header-container}
|
||||
[quo/text {:weight :semi-bold :size :heading-1}
|
||||
(i18n/label :t/use-recovery-phrase)]
|
||||
text]
|
||||
[rn/view {:style style/word-count-container}
|
||||
[quo/text
|
||||
{:style {:color colors/white-opa-40}
|
||||
@@ -51,34 +51,42 @@
|
||||
(string/replace #"\s+" " ")
|
||||
(string/trim)))
|
||||
|
||||
(defn- recovery-form
|
||||
[{:keys [seed-phrase word-count error-state? all-words-valid? on-change-seed-phrase
|
||||
keyboard-shown? on-submit]}]
|
||||
(let [button-disabled? (or error-state?
|
||||
(not (constants/seed-phrase-valid-length word-count))
|
||||
(not all-words-valid?))]
|
||||
[rn/view {:style style/form-container}
|
||||
[header word-count]
|
||||
[rn/view {:style style/input-container}
|
||||
[quo/recovery-phrase-input
|
||||
{:accessibility-label :passphrase-input
|
||||
:placeholder (i18n/label :t/seed-phrase-placeholder)
|
||||
:placeholder-text-color colors/white-opa-30
|
||||
:auto-capitalize :none
|
||||
:auto-correct false
|
||||
:auto-focus true
|
||||
:mark-errors? true
|
||||
:word-limit max-seed-phrase-length
|
||||
:error-pred-current-word partial-word-not-in-dictionary?
|
||||
:error-pred-written-words word-not-in-dictionary?
|
||||
:on-change-text on-change-seed-phrase}
|
||||
seed-phrase]]
|
||||
[quo/button
|
||||
{:container-style (style/continue-button keyboard-shown?)
|
||||
:type :primary
|
||||
:disabled? button-disabled?
|
||||
:on-press on-submit}
|
||||
(i18n/label :t/continue)]]))
|
||||
(defn- secure-clean-seed-phrase
|
||||
[seed-phrase]
|
||||
(-> seed-phrase
|
||||
security/safe-unmask-data
|
||||
clean-seed-phrase
|
||||
security/mask-data))
|
||||
|
||||
(defn- recovery-phrase-form
|
||||
[{:keys [keypair title seed-phrase word-count on-change-seed-phrase ref]} & children]
|
||||
(->> children
|
||||
(into
|
||||
[rn/view {:style style/form-container}
|
||||
[header title word-count]
|
||||
(when keypair
|
||||
[quo/context-tag
|
||||
{:type :icon
|
||||
:container-style {:padding-top 8}
|
||||
:icon :i/seed-phrase
|
||||
:size 24
|
||||
:blur? true
|
||||
:context (:name keypair)}])
|
||||
[rn/view {:style style/input-container}
|
||||
[quo/recovery-phrase-input
|
||||
{:accessibility-label :passphrase-input
|
||||
:ref ref
|
||||
:placeholder (i18n/label :t/seed-phrase-placeholder)
|
||||
:placeholder-text-color colors/white-opa-30
|
||||
:auto-capitalize :none
|
||||
:auto-correct false
|
||||
:auto-focus true
|
||||
:mark-errors? true
|
||||
:word-limit max-seed-phrase-length
|
||||
:error-pred-current-word partial-word-not-in-dictionary?
|
||||
:error-pred-written-words word-not-in-dictionary?
|
||||
:on-change-text on-change-seed-phrase}
|
||||
seed-phrase]]])))
|
||||
|
||||
(defn keyboard-suggestions
|
||||
[current-word]
|
||||
@@ -86,8 +94,8 @@
|
||||
(filter #(string/starts-with? % current-word))
|
||||
(take 7)))
|
||||
|
||||
(defn screen
|
||||
[recovering-keypair?]
|
||||
(defn recovery-phrase-screen
|
||||
[{:keys [keypair title recovering-keypair? render-controls]}]
|
||||
(reagent/with-let [keyboard-shown? (reagent/atom false)
|
||||
keyboard-show-listener (.addListener rn/keyboard
|
||||
"keyboardDidShow"
|
||||
@@ -96,6 +104,11 @@
|
||||
"keyboardDidHide"
|
||||
#(reset! keyboard-shown? false))
|
||||
invalid-seed-phrase? (reagent/atom false)
|
||||
input-ref (reagent/atom nil)
|
||||
focus-input (fn []
|
||||
(let [ref @input-ref]
|
||||
(when ref
|
||||
(.focus ref))))
|
||||
set-invalid-seed-phrase #(reset! invalid-seed-phrase? true)
|
||||
seed-phrase (reagent/atom "")
|
||||
on-change-seed-phrase (fn [new-phrase]
|
||||
@@ -139,16 +152,33 @@
|
||||
words-exceeded? (i18n/label :t/seed-phrase-words-exceeded)
|
||||
error-in-words? (i18n/label :t/seed-phrase-error)
|
||||
@invalid-seed-phrase? (i18n/label :t/seed-phrase-invalid)
|
||||
:else (i18n/label :t/seed-phrase-info))]
|
||||
:else (i18n/label :t/seed-phrase-info))
|
||||
error-state? (= suggestions-state :error)
|
||||
button-disabled? (or error-state?
|
||||
(not (constants/seed-phrase-valid-length word-count))
|
||||
(not all-words-valid?))]
|
||||
[:<>
|
||||
[recovery-form
|
||||
{:seed-phrase @seed-phrase
|
||||
:error-state? (= suggestions-state :error)
|
||||
:all-words-valid? all-words-valid?
|
||||
[recovery-phrase-form
|
||||
{:title title
|
||||
:keypair keypair
|
||||
:seed-phrase @seed-phrase
|
||||
:on-change-seed-phrase on-change-seed-phrase
|
||||
:word-count word-count
|
||||
:on-submit on-submit
|
||||
:keyboard-shown? @keyboard-shown?}]
|
||||
:ref #(reset! input-ref %)}
|
||||
(if (fn? render-controls)
|
||||
(render-controls {:submit-disabled? button-disabled?
|
||||
:keyboard-shown? @keyboard-shown?
|
||||
:container-style (style/continue-button @keyboard-shown?)
|
||||
:prepare-seed-phrase secure-clean-seed-phrase
|
||||
:focus-input focus-input
|
||||
:seed-phrase (security/mask-data @seed-phrase)
|
||||
:set-invalid-seed-phrase set-invalid-seed-phrase})
|
||||
[quo/button
|
||||
{:container-style (style/continue-button @keyboard-shown?)
|
||||
:type :primary
|
||||
:disabled? button-disabled?
|
||||
:on-press on-submit}
|
||||
(i18n/label :t/continue)])]
|
||||
(when @keyboard-shown?
|
||||
[rn/view {:style style/keyboard-container}
|
||||
[quo/predictive-keyboard
|
||||
@@ -161,16 +191,29 @@
|
||||
(.remove keyboard-show-listener)
|
||||
(.remove keyboard-hide-listener))))
|
||||
|
||||
(defn screen
|
||||
[{:keys [initial-insets title keypair navigation-icon recovering-keypair? render-controls]}]
|
||||
(let [{navigation-bar-top :top} initial-insets]
|
||||
[rn/view {:style style/full-layout}
|
||||
[rn/keyboard-avoiding-view {:style style/page-container}
|
||||
[quo/page-nav
|
||||
{:margin-top navigation-bar-top
|
||||
:background :blur
|
||||
:icon-name (or navigation-icon
|
||||
(if recovering-keypair? :i/close :i/arrow-left))
|
||||
:on-press #(rf/dispatch [:navigate-back])}]
|
||||
[recovery-phrase-screen
|
||||
{:title title
|
||||
:keypair keypair
|
||||
:render-controls render-controls
|
||||
:recovering-keypair? recovering-keypair?}]]]))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [{navigation-bar-top :top} (safe-area/get-insets)]
|
||||
(let [insets (safe-area/get-insets)]
|
||||
(fn []
|
||||
(let [{:keys [recovering-keypair?]} (rf/sub [:get-screen-params])]
|
||||
[rn/view {:style style/full-layout}
|
||||
[rn/keyboard-avoiding-view {:style style/page-container}
|
||||
[quo/page-nav
|
||||
{:margin-top navigation-bar-top
|
||||
:background :blur
|
||||
:icon-name (if recovering-keypair? :i/close :i/arrow-left)
|
||||
:on-press #(rf/dispatch [:navigate-back])}]
|
||||
[screen recovering-keypair?]]]))))
|
||||
[screen
|
||||
{:title (i18n/label :t/use-recovery-phrase)
|
||||
:initial-insets insets
|
||||
:recovering-keypair? recovering-keypair?}]))))
|
||||
|
||||
@@ -30,12 +30,15 @@
|
||||
; should be :notification TODO
|
||||
; https://github.com/status-im/status-mobile/issues/17102
|
||||
:unread-indicator/new :mention
|
||||
nil)]
|
||||
nil)
|
||||
view-id (rf/sub [:view-id])
|
||||
initial-share-tab (if (= :wallet-stack view-id) :wallet :profile)]
|
||||
[quo/top-nav
|
||||
{:avatar-on-press #(rf/dispatch [:open-modal :settings])
|
||||
:scan-on-press #(rf/dispatch [:open-modal :shell-qr-reader])
|
||||
:activity-center-on-press #(rf/dispatch [:activity-center/open])
|
||||
:qr-code-on-press #(rf/dispatch [:open-modal :screen/share-shell])
|
||||
:qr-code-on-press #(rf/dispatch [:open-modal :screen/share-shell
|
||||
{:initial-tab initial-share-tab}])
|
||||
:container-style (merge style/top-nav-container container-style)
|
||||
:blur? blur?
|
||||
:jump-to? jump-to?
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
(ns status-im.common.raw-data-block.style
|
||||
(:require [quo.foundations.colors :as colors]))
|
||||
|
||||
(def container
|
||||
{:flex 1
|
||||
:padding 10
|
||||
:margin-vertical 10.5
|
||||
:border-width 1
|
||||
:border-color colors/neutral-10
|
||||
:border-radius 16})
|
||||
|
||||
(def content
|
||||
{:padding-bottom 20})
|
||||
@@ -0,0 +1,14 @@
|
||||
(ns status-im.common.raw-data-block.view
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.common.raw-data-block.style :as style]))
|
||||
|
||||
(defn view
|
||||
[{:keys [data]}]
|
||||
[rn/scroll-view
|
||||
{:style style/container
|
||||
:content-container-style style/content}
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:weight :code}
|
||||
data]])
|
||||
@@ -10,7 +10,7 @@
|
||||
(def chat-name-url "Test%20group%20chat")
|
||||
(def chat-name "Test group chat")
|
||||
|
||||
(deftest parse-uris
|
||||
(deftest parse-uris-test
|
||||
(are [uri expected] (= (cond-> (router/match-uri uri)
|
||||
(< (count expected) 3)
|
||||
(assoc :query-params nil))
|
||||
@@ -126,7 +126,7 @@
|
||||
|
||||
(def error {:error :invalid-group-chat-data})
|
||||
|
||||
(deftest match-group-chat-query
|
||||
(deftest match-group-chat-query-test
|
||||
(are [query-params expected] (= (router/match-group-chat {} query-params)
|
||||
expected)
|
||||
nil error
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
[:router/handle-uri :uri])
|
||||
"https://status.app/u#statuse2e"))))))
|
||||
|
||||
(deftest url-event-listener
|
||||
(deftest url-event-listener-test
|
||||
(testing "the url is not nil"
|
||||
(testing "it dispatches the url"
|
||||
(let [actual (atom nil)]
|
||||
@@ -39,7 +39,7 @@
|
||||
(links/url-event-listener #js {})
|
||||
(is (match? nil @actual)))))))
|
||||
|
||||
(deftest generate-profile-url
|
||||
(deftest generate-profile-url-test
|
||||
(testing "user has ens name"
|
||||
(testing "it calls the ens rpc method with ens name as param"
|
||||
(let [db {:profile/profile {:ens-name? true :public-key pubkey}}
|
||||
@@ -70,7 +70,7 @@
|
||||
"wakuext_shareUserURLWithData" (-> rst :json-rpc/call first :method)
|
||||
pubkey (-> rst :json-rpc/call first :params first))))))
|
||||
|
||||
(deftest save-profile-url
|
||||
(deftest save-profile-url-test
|
||||
(testing "given a contact public key and profile url"
|
||||
(testing "it updates the contact in db"
|
||||
(let [url "url"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
[cljs.test :refer-macros [deftest testing is]]
|
||||
[status-im.common.validation.general :refer [valid-compressed-key?]]))
|
||||
|
||||
(deftest test-valid-compressed-key
|
||||
(deftest valid-compressed-key-test
|
||||
(testing "valid"
|
||||
(is (valid-compressed-key?
|
||||
"zQ3shWj4WaBdf2zYKCkXe6PHxDxNTzZyid1i75879Ue9cX9gA")))
|
||||
@@ -32,4 +32,3 @@
|
||||
(testing "contains l"
|
||||
(is (not (valid-compressed-key?
|
||||
"zQ3shWj4WaBdf2zYKCkXe6PHxDxNTzZyid1i75879Ue9cX9gl")))))
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
(goog-define ALCHEMY_OPTIMISM_MAINNET_TOKEN "")
|
||||
(goog-define ALCHEMY_OPTIMISM_GOERLI_TOKEN "")
|
||||
(goog-define ALCHEMY_OPTIMISM_SEPOLIA_TOKEN "")
|
||||
(goog-define WALLET_CONNECT_PROJECT_ID "")
|
||||
(goog-define WALLET_CONNECT_PROJECT_ID "87815d72a81d739d2a7ce15c2cfdefb3")
|
||||
|
||||
(def mainnet-rpc-url (str "https://eth-archival.rpc.grove.city/v1/" POKT_TOKEN))
|
||||
(def goerli-rpc-url (str "https://goerli-archival.gateway.pokt.network/v1/lb/" POKT_TOKEN))
|
||||
|
||||
@@ -263,10 +263,21 @@
|
||||
(def ^:const wallet-connect-metadata-icon
|
||||
"https://res.cloudinary.com/dhgck7ebz/image/upload/f_auto,c_limit,w_1080,q_auto/Brand/Logo%20Section/Mark/Mark_01")
|
||||
(def ^:const wallet-connect-metadata-url "https://status.app")
|
||||
(def ^:const optimism-crosschain-id "eip155:10")
|
||||
(def ^:const wallet-connect-supported-methods ["eth_sendTransaction" "personal_sign"])
|
||||
(def ^:const wallet-connect-supported-events ["accountsChanged" "chainChanged"])
|
||||
|
||||
(def ^:const wallet-connect-personal-sign-method "personal_sign")
|
||||
(def ^:const wallet-connect-eth-sign-method "eth_sign")
|
||||
(def ^:const wallet-connect-eth-send-transaction-method "eth_sendTransaction")
|
||||
(def ^:const wallet-connect-eth-sign-typed-method "eth_signTypedData")
|
||||
(def ^:const wallet-connect-eth-sign-typed-v4-method "eth_signTypedData_v4")
|
||||
(def ^:const wallet-connect-supported-methods
|
||||
#{wallet-connect-personal-sign-method
|
||||
wallet-connect-eth-sign-method
|
||||
wallet-connect-eth-send-transaction-method
|
||||
wallet-connect-eth-sign-typed-method
|
||||
wallet-connect-eth-sign-typed-v4-method})
|
||||
(def ^:const wallet-connect-supported-events #{"accountsChanged" "chainChanged"})
|
||||
(def ^:const wallet-connect-session-proposal-event "session_proposal")
|
||||
(def ^:const wallet-connect-session-request-event "session_request")
|
||||
|
||||
(def ^:const dapp-permission-contact-code "contact-code")
|
||||
(def ^:const dapp-permission-web3 "web3")
|
||||
@@ -522,6 +533,8 @@
|
||||
|
||||
(def ^:const alert-banner-height 40)
|
||||
|
||||
(def ^:const sheet-screen-handle-height 20)
|
||||
|
||||
(def ^:const status-hostname "status.app")
|
||||
|
||||
(def ^:const community-joined-notification-type "communityJoined")
|
||||
|
||||
@@ -202,7 +202,8 @@
|
||||
{:events [:chat/navigate-to-chat]}
|
||||
[{db :db :as cofx} chat-id animation]
|
||||
(rf/merge cofx
|
||||
{:dispatch [(if animation :shell/navigate-to :navigate-to) :chat chat-id animation]}
|
||||
(when-not (:current-chat-id db)
|
||||
{:dispatch [(if animation :shell/navigate-to :navigate-to) :chat chat-id animation]})
|
||||
(close-chat chat-id)
|
||||
(force-close-chat chat-id)
|
||||
(fn [{:keys [db]}]
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
(let [actual (chat/close-and-remove-chat cofx chat-id)]
|
||||
(is (= nil (get-in actual [:db :chats-home-list chat-id])))))))
|
||||
|
||||
(deftest multi-user-chat?
|
||||
(deftest multi-user-chat?-test
|
||||
(let [chat-id "1"]
|
||||
(testing "it returns true if it's a group chat"
|
||||
(let [cofx {:db {:chats {chat-id {:group-chat true}}}}]
|
||||
@@ -61,7 +61,7 @@
|
||||
(let [cofx {:db {:chats {chat-id {}}}}]
|
||||
(is (not (chat/multi-user-chat? cofx chat-id)))))))
|
||||
|
||||
(deftest group-chat?
|
||||
(deftest group-chat?-test
|
||||
(let [chat-id "1"]
|
||||
(testing "it returns true if it's a group chat"
|
||||
(let [cofx {:db {:chats {chat-id {:group-chat true}}}}]
|
||||
@@ -82,7 +82,7 @@
|
||||
"opened" {}
|
||||
"1-1" {}}})
|
||||
|
||||
(deftest navigate-to-chat
|
||||
(deftest navigate-to-chat-test
|
||||
(let [chat-id "test_chat"
|
||||
db {:pagination-info {chat-id {:all-loaded? true}}}]
|
||||
(testing "Pagination info should be reset on navigation"
|
||||
|
||||
@@ -115,6 +115,7 @@
|
||||
:resolve-ens {:db (assoc db :contacts/new-identity contact)
|
||||
:effects.contacts/resolve-public-key-from-ens
|
||||
{:ens ens
|
||||
:chain-id 1
|
||||
:on-success
|
||||
#(re-frame/dispatch [:contacts/set-new-identity-success
|
||||
{:input input
|
||||
|
||||
@@ -118,6 +118,7 @@
|
||||
:state :resolve-ens}))
|
||||
:effects.contacts/resolve-public-key-from-ens
|
||||
{:ens ens-stateofus-eth
|
||||
:chain-id 1
|
||||
:on-success [:contacts/set-new-identity-success ens]
|
||||
:on-error [:contacts/set-new-identity-error ens]}}
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
(update-in effects [:json-rpc/call 0] dissoc :on-success :on-error)
|
||||
effects))
|
||||
|
||||
(deftest unfurl-urls
|
||||
(deftest unfurl-urls-test
|
||||
(testing "clear up state when text is empty"
|
||||
(let [cofx {:db {:chat/link-previews {:unfurled {}
|
||||
:cache {}
|
||||
|
||||
+5
-1
@@ -16,6 +16,8 @@
|
||||
contact-id])
|
||||
{:keys [contact-request-state community-id]} (rf/sub [:chats/current-chat-chat-view])
|
||||
chat-type (rf/sub [:chats/chat-type])
|
||||
joined (rf/sub [:communities/community-joined
|
||||
community-id])
|
||||
contact-request-send? (or (not contact-request-state)
|
||||
(= contact-request-state
|
||||
constants/contact-request-state-none))
|
||||
@@ -37,7 +39,9 @@
|
||||
:else :i/add-user)
|
||||
:action-label (cond
|
||||
(= chat-type :community-chat)
|
||||
(i18n/label :t/join-community-to-post)
|
||||
(if joined
|
||||
(i18n/label :t/no-permissions-to-post)
|
||||
(i18n/label :t/join-community-to-post))
|
||||
|
||||
(= chat-type :group-chat)
|
||||
(i18n/label :t/group-chat-not-member)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
(def mid "message-id")
|
||||
(def cid "chat-id")
|
||||
|
||||
(deftest delete
|
||||
(deftest delete-test
|
||||
(with-redefs [datetime/timestamp (constantly 1)]
|
||||
(let [db {:messages {cid {mid {:id mid :whisper-timestamp 1}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
@@ -57,7 +57,7 @@
|
||||
(testing "return nil if message not in db"
|
||||
(is (= (delete-message/delete {:db {:messages []}} message 1000) nil)))))))
|
||||
|
||||
(deftest undo-delete
|
||||
(deftest undo-delete-test
|
||||
(let [db {:messages {cid {mid {:id mid :whisper-timestamp 1}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
(testing "undo delete"
|
||||
@@ -84,7 +84,7 @@
|
||||
(testing "return nil if message not in db"
|
||||
(is (= (delete-message/undo {:db {:messages []}} message) nil))))))
|
||||
|
||||
(deftest delete-and-send
|
||||
(deftest delete-and-send-test
|
||||
(let [db {:messages {cid {mid {:id mid :deleted? true :deleted-undoable-till 0}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
(testing "delete and send"
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
(def mid "message-id")
|
||||
(def cid "chat-id")
|
||||
|
||||
(deftest delete-for-me
|
||||
(deftest delete-for-me-test
|
||||
(with-redefs [datetime/timestamp (constantly 1)]
|
||||
(let [db {:messages {cid {mid {:id mid :whisper-timestamp 1}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
@@ -60,7 +60,7 @@
|
||||
(is (= (delete-message-for-me/delete {:db {:messages []}} message 1000)
|
||||
nil)))))))
|
||||
|
||||
(deftest undo-delete-for-me
|
||||
(deftest undo-delete-for-me-test
|
||||
(let [db {:messages {cid {mid {:id mid :whisper-timestamp 1}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
(testing "undo delete for me"
|
||||
@@ -93,7 +93,7 @@
|
||||
(is (= (delete-message-for-me/undo {:db {:messages []}} message)
|
||||
nil))))))
|
||||
|
||||
(deftest delete-for-me-and-sync
|
||||
(deftest delete-for-me-and-sync-test
|
||||
(let [db {:messages {cid {mid {:id mid :deleted-for-me? true :deleted-for-me-undoable-till 0}}}}
|
||||
message {:message-id mid :chat-id cid}]
|
||||
(testing "delete for me and sync"
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
[status-im.contexts.chat.messenger.messages.list.events :as s]
|
||||
[taoensso.tufte :as tufte :refer-macros [defnp profile]]))
|
||||
|
||||
(deftest message-stream-tests
|
||||
(deftest message-stream-tests-test
|
||||
(testing "building the list"
|
||||
(let [m1 {:from "1"
|
||||
:clock-value 1
|
||||
@@ -87,7 +87,7 @@
|
||||
(tufte/add-basic-println-handler! {:format-pstats-opts {:columns [:n :mean :min :max :clock :sum]
|
||||
:format-id-fn name}})
|
||||
|
||||
(deftest ^:benchmark benchmark-list
|
||||
(deftest ^:benchmark benchmark-list-test
|
||||
(let [messages (sort-by
|
||||
:timestamp
|
||||
(mapv (fn [i]
|
||||
@@ -132,7 +132,7 @@
|
||||
:whisper-timestamp 1000
|
||||
:timestamp 1000}))))))
|
||||
|
||||
(deftest message-list
|
||||
(deftest message-list-test
|
||||
(let [current-messages [{:clock-value 109
|
||||
:message-id "109"
|
||||
:timestamp 9
|
||||
|
||||
@@ -407,9 +407,10 @@
|
||||
:distance-from-list-top distance-from-list-top})
|
||||
:on-end-reached #(list-on-end-reached distance-from-list-top)
|
||||
:on-scroll-to-index-failed identity
|
||||
:scroll-indicator-insets {:top (if (:able-to-send-message? context)
|
||||
(- composer.constants/composer-default-height 16)
|
||||
0)}
|
||||
:scroll-indicator-insets {:top (if (:able-to-send-message? context)
|
||||
(- composer.constants/composer-default-height 16)
|
||||
0)
|
||||
:right 1}
|
||||
:keyboard-dismiss-mode :interactive
|
||||
:keyboard-should-persist-taps :always
|
||||
:on-scroll-begin-drag #(do
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
:destination "https://foo.bar"}
|
||||
{:literal " , no worries"}]}])
|
||||
|
||||
(t/deftest test-resolve-message
|
||||
(t/deftest resolve-message-test
|
||||
(with-redefs [rf/sub sub]
|
||||
(t/testing ""
|
||||
(let [text (resolver/resolve-message parsed-text)]
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-members))
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-community-rules))
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
(h/is-truthy (h/get-by-translation-text :t/mark-as-read))
|
||||
(h/is-truthy (h/get-by-translation-text :t/mute-community))
|
||||
;(h/is-truthy (h/get-by-translation-text :t/notification-settings))
|
||||
@@ -79,7 +79,7 @@
|
||||
:communities/community {:role-permissions? true}})
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
(h/is-truthy (h/get-by-translation-text :t/show-qr))
|
||||
(h/is-truthy (h/get-by-translation-text :t/share-community))
|
||||
(h/is-truthy (h/get-by-translation-text :t/cancel-request-to-join)))
|
||||
@@ -100,7 +100,7 @@
|
||||
:role-permissions? true}})
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
(h/is-truthy (h/get-by-translation-text :t/show-qr))
|
||||
(h/is-truthy (h/get-by-translation-text :t/share-community)))
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
:role-permissions? true}})
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/invite-people-from-contacts))
|
||||
(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
;(h/is-truthy (h/get-by-translation-text :t/view-token-gating))
|
||||
(h/is-truthy (h/get-by-translation-text :t/show-qr))
|
||||
(h/is-truthy (h/get-by-translation-text :t/share-community)))
|
||||
|
||||
|
||||
@@ -36,13 +36,14 @@
|
||||
|
||||
(defn view-token-gating
|
||||
[id]
|
||||
{:icon :i/token
|
||||
:right-icon :i/chevron-right
|
||||
:accessibility-label :view-token-gating
|
||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
||||
{:content (fn [] [permissions-sheet/view id])
|
||||
:padding-bottom-override 16}])
|
||||
:label (i18n/label :t/view-token-gating)})
|
||||
(when config/show-not-implemented-features?
|
||||
{:icon :i/token
|
||||
:right-icon :i/chevron-right
|
||||
:accessibility-label :view-token-gating
|
||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
||||
{:content (fn [] [permissions-sheet/view id])
|
||||
:padding-bottom-override 16}])
|
||||
:label (i18n/label :t/view-token-gating)}))
|
||||
|
||||
(defn edit-shared-addresses
|
||||
[id]
|
||||
|
||||
@@ -22,17 +22,17 @@
|
||||
[{:keys [db]} [community-js]]
|
||||
(when community-js
|
||||
(let [{:keys [clock
|
||||
token-permissions-check joined id last-opened-at]
|
||||
token-permissions-check id last-opened-at]
|
||||
:as community} (data-store.communities/<-rpc community-js)
|
||||
previous-last-opened-at (get-in db [:communities id :last-opened-at])]
|
||||
(when (> clock (get-in db [:communities id :clock]))
|
||||
{:db (assoc-in db
|
||||
[:communities id]
|
||||
(assoc community :last-opened-at (max last-opened-at previous-last-opened-at)))
|
||||
;; NOTE(cammellos): these two looks suspicious, we should not check for permissions at
|
||||
;; every event signalled
|
||||
:fx [[:dispatch
|
||||
[:communities/check-permissions-to-join-community-with-all-addresses id]]
|
||||
(when (not joined)
|
||||
[:dispatch [:chat.ui/spectate-community id]])
|
||||
(when (nil? token-permissions-check)
|
||||
[:dispatch [:communities/check-permissions-to-join-community id]])]}))))
|
||||
|
||||
@@ -252,7 +252,9 @@
|
||||
|
||||
(defn fetch-community
|
||||
[{:keys [db]} [{:keys [community-id update-last-opened-at?]}]]
|
||||
(when (and community-id (not (get-in db [:communities/fetching-communities community-id])))
|
||||
(when (and community-id
|
||||
(not (get-in db [:communities community-id]))
|
||||
(not (get-in db [:communities/fetching-communities community-id])))
|
||||
{:db (assoc-in db [:communities/fetching-communities community-id] true)
|
||||
:json-rpc/call [{:method "wakuext_fetchCommunity"
|
||||
:params [{:CommunityKey community-id
|
||||
@@ -291,33 +293,23 @@
|
||||
[{:keys [db]} [{:keys [communities]}]]
|
||||
(when-let [community (first communities)]
|
||||
{:db (-> db
|
||||
(assoc-in [:communities (:id community) :spectated] true)
|
||||
(assoc-in [:communities (:id community) :spectating] false))
|
||||
(assoc-in [:communities (:id community) :spectated] true))
|
||||
:fx [[:dispatch [:communities/handle-community community]]
|
||||
[:dispatch [::mailserver/request-messages]]]}))
|
||||
|
||||
(rf/reg-event-fx :chat.ui/spectate-community-success spectate-community-success)
|
||||
|
||||
(defn spectate-community-failed
|
||||
[{:keys [db]} [community-id]]
|
||||
{:db (assoc-in db [:communities community-id :spectating] false)})
|
||||
|
||||
(rf/reg-event-fx :chat.ui/spectate-community-failed spectate-community-failed)
|
||||
|
||||
(defn spectate-community
|
||||
[{:keys [db]} [community-id]]
|
||||
(let [{:keys [spectated spectating joined]} (get-in db [:communities community-id])]
|
||||
(when (and (not joined) (not spectated) (not spectating))
|
||||
{:db (assoc-in db [:communities community-id :spectating] true)
|
||||
:json-rpc/call [{:method "wakuext_spectateCommunity"
|
||||
(let [{:keys [spectated joined]} (get-in db [:communities community-id])]
|
||||
(when (and (not joined) (not spectated))
|
||||
{:json-rpc/call [{:method "wakuext_spectateCommunity"
|
||||
:params [community-id]
|
||||
:on-success [:chat.ui/spectate-community-success]
|
||||
:on-error (fn [err]
|
||||
(log/error {:message
|
||||
"Failed to spectate community"
|
||||
:error err})
|
||||
(rf/dispatch [:chat.ui/spectate-community-failed
|
||||
community-id]))}]})))
|
||||
:error err}))}]})))
|
||||
|
||||
(schema/=> spectate-community
|
||||
[:=>
|
||||
@@ -327,7 +319,6 @@
|
||||
[:schema [:catn [:community-id [:? :string]]]]]]
|
||||
[:maybe
|
||||
[:map
|
||||
[:db map?]
|
||||
[:json-rpc/call :schema.common/rpc-call]]]])
|
||||
|
||||
(rf/reg-event-fx :chat.ui/spectate-community spectate-community)
|
||||
@@ -348,7 +339,8 @@
|
||||
(navigate-to-serialized-community community-id)
|
||||
(rf/merge
|
||||
cofx
|
||||
{:fx [[:dispatch
|
||||
{:fx [[:dispatch [:chat.ui/spectate-community community-id]]
|
||||
[:dispatch
|
||||
[:communities/fetch-community
|
||||
{:community-id community-id
|
||||
:update-last-opened-at? true}]]
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
(def community-id "community-id")
|
||||
|
||||
(deftest fetch-community
|
||||
(deftest fetch-community-test
|
||||
(testing "with community id"
|
||||
(testing "update fetching indicator in db"
|
||||
(is (match?
|
||||
@@ -26,7 +26,7 @@
|
||||
nil
|
||||
(events/fetch-community {} [{}]))))))
|
||||
|
||||
(deftest community-failed-to-fetch
|
||||
(deftest community-failed-to-fetch-test
|
||||
(testing "given a community id"
|
||||
(testing "remove community id from fetching indicator in db"
|
||||
(is (match?
|
||||
@@ -36,7 +36,7 @@
|
||||
[community-id])
|
||||
[:db :communities/fetching-communities community-id]))))))
|
||||
|
||||
(deftest community-fetched
|
||||
(deftest community-fetched-test
|
||||
(with-redefs [link-preview.events/community-link (fn [id] (str "community-link+" id))]
|
||||
(testing "given a community"
|
||||
(let [cofx {:db {:communities/fetching-communities {community-id true}}}
|
||||
@@ -82,7 +82,7 @@
|
||||
nil
|
||||
(events/community-fetched {} [community-id nil])))))))
|
||||
|
||||
(deftest spectate-community
|
||||
(deftest spectate-community-test
|
||||
(testing "given a joined community"
|
||||
(testing "do nothing"
|
||||
(is (match?
|
||||
@@ -95,35 +95,16 @@
|
||||
nil
|
||||
(events/spectate-community {:db {:communities {community-id {:spectated true}}}}
|
||||
[community-id])))))
|
||||
(testing "given a spectating community"
|
||||
(testing "do nothing"
|
||||
(is (match?
|
||||
nil
|
||||
(events/spectate-community {:db {:communities {community-id {:spectating true}}}}
|
||||
[community-id])))))
|
||||
|
||||
(testing "given a community"
|
||||
(testing "mark community spectating"
|
||||
(is (match?
|
||||
{:db {:communities {community-id {:spectating true}}}}
|
||||
(events/spectate-community {:db {:communities {community-id {}}}} [community-id]))))
|
||||
(testing "call spectate community rpc with correct community id"
|
||||
(is (match?
|
||||
{:json-rpc/call [{:method "wakuext_spectateCommunity"
|
||||
:params [community-id]}]}
|
||||
(events/spectate-community {:db {:communities {community-id {}}}} [community-id]))))))
|
||||
|
||||
(deftest spectate-community-failed
|
||||
(testing "mark community spectating false"
|
||||
(is (match?
|
||||
{:db {:communities {community-id {:spectating false}}}}
|
||||
(events/spectate-community-failed {} [community-id])))))
|
||||
|
||||
(deftest spectate-community-success
|
||||
(deftest spectate-community-success-test
|
||||
(testing "given communities"
|
||||
(testing "mark first community spectating false"
|
||||
(is (match?
|
||||
{:db {:communities {community-id {:spectating false}}}}
|
||||
(events/spectate-community-success {} [{:communities [{:id community-id}]}]))))
|
||||
(testing "mark first community spectated true"
|
||||
(is (match?
|
||||
{:db {:communities {community-id {:spectated true}}}}
|
||||
@@ -144,7 +125,7 @@
|
||||
nil
|
||||
(events/spectate-community-success {} []))))))
|
||||
|
||||
(deftest get-revealed-accounts
|
||||
(deftest get-revealed-accounts-test
|
||||
(let [community {:id community-id}]
|
||||
(testing "given a unjoined community"
|
||||
(is (match?
|
||||
@@ -169,7 +150,7 @@
|
||||
:params [community-id "profile-public-key"]}
|
||||
(-> effects :json-rpc/call first (select-keys [:method :params]))))))))
|
||||
|
||||
(deftest handle-community
|
||||
(deftest handle-community-test
|
||||
(let [community {:id community-id :clock 2}]
|
||||
(testing "given a unjoined community"
|
||||
(let [effects (events/handle-community {} [community])]
|
||||
@@ -178,7 +159,6 @@
|
||||
(is (match?
|
||||
[[:dispatch
|
||||
[:communities/check-permissions-to-join-community-with-all-addresses community-id]]
|
||||
[:dispatch [:chat.ui/spectate-community community-id]]
|
||||
[:dispatch [:communities/check-permissions-to-join-community community-id]]]
|
||||
(filter some? (:fx effects))))))
|
||||
|
||||
@@ -196,8 +176,7 @@
|
||||
effects (events/handle-community {} [community])]
|
||||
(is (match?
|
||||
[[:dispatch
|
||||
[:communities/check-permissions-to-join-community-with-all-addresses community-id]]
|
||||
[:dispatch [:chat.ui/spectate-community community-id]]]
|
||||
[:communities/check-permissions-to-join-community-with-all-addresses community-id]]]
|
||||
(filter some? (:fx effects))))))
|
||||
(testing "given a community with lower clock"
|
||||
(let [effects (events/handle-community {:db {:communities {community-id {:clock 3}}}} [community])]
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
(ns status-im.contexts.onboarding.events
|
||||
(:require
|
||||
[native-module.core :as native-module]
|
||||
[re-frame.core :as re-frame]
|
||||
status-im.common.biometric.events
|
||||
[status-im.constants :as constants]
|
||||
@@ -9,19 +8,7 @@
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]
|
||||
[utils.transforms :as transforms]))
|
||||
|
||||
(re-frame/reg-fx
|
||||
:multiaccount/validate-mnemonic
|
||||
(fn [[mnemonic on-success on-error]]
|
||||
(native-module/validate-mnemonic
|
||||
(security/safe-unmask-data mnemonic)
|
||||
(fn [result]
|
||||
(let [{:keys [error keyUID]} (transforms/json->clj result)]
|
||||
(if (seq error)
|
||||
(when on-error (on-error error))
|
||||
(on-success mnemonic keyUID)))))))
|
||||
[utils.security.core :as security]))
|
||||
|
||||
(rf/defn profile-data-set
|
||||
{:events [:onboarding/profile-data-set]}
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
[status-im.contexts.onboarding.common.background.view :as background]
|
||||
[status-im.contexts.onboarding.common.overlay.view :as overlay]
|
||||
[status-im.contexts.onboarding.intro.style :as style]
|
||||
[status-im.contexts.onboarding.terms.view :as terms]
|
||||
[status-im.contexts.syncing.scan-sync-code.view :as scan-sync-code]
|
||||
[utils.debounce :as debounce]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -44,7 +44,9 @@
|
||||
:style style/plain-text}
|
||||
(i18n/label :t/by-continuing-you-accept)]
|
||||
[quo/text
|
||||
{:on-press #(debounce/throttle-and-dispatch [:open-modal :privacy-policy] 1000)
|
||||
{:on-press #(rf/dispatch [:show-bottom-sheet
|
||||
{:content (fn [] [terms/terms-of-use])
|
||||
:shell? true}])
|
||||
:size :paragraph-2
|
||||
:weight :regular
|
||||
:style style/highlighted-text}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
(ns status-im.contexts.onboarding.terms.view
|
||||
(:require-macros [legacy.status-im.utils.slurp :refer [slurp]])
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.gesture :as gesture]))
|
||||
|
||||
(def terms-of-use-text (slurp "resources/terms-of-use.mdwn"))
|
||||
|
||||
(defn terms-of-use
|
||||
[]
|
||||
[gesture/scroll-view {:margin 20}
|
||||
[quo/text terms-of-use-text]])
|
||||
@@ -28,10 +28,10 @@
|
||||
:name "Coingecko"
|
||||
:value "coingecko.com"}
|
||||
:state :default
|
||||
:action :icon
|
||||
:blur? false
|
||||
:customization-color :blue
|
||||
:on-press-icon (fn [] (js/alert "Button pressed"))})]
|
||||
:on-press (fn [{:keys [name]}]
|
||||
(js/alert (str name " got pressed")))})]
|
||||
(fn []
|
||||
[preview/preview-container {:state state :descriptor descriptor}
|
||||
[rn/view
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
{:key :locked :value :locked}
|
||||
{:key :loading :value :loading}
|
||||
{:key :disabled :value :disabled}
|
||||
{:key :add :value :add}]}])
|
||||
{:key :edit :value :edit}]}])
|
||||
|
||||
(defn view
|
||||
[]
|
||||
|
||||
@@ -57,5 +57,6 @@
|
||||
[quo/page-top
|
||||
{:title-accessibility-label :username
|
||||
:emoji-dash emoji-hash
|
||||
:description bio
|
||||
:description :text
|
||||
:description-text bio
|
||||
:title full-name}]]))
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
(ns status-im.contexts.profile.settings.list-items
|
||||
(:require [status-im.common.not-implemented :as not-implemented]
|
||||
[status-im.config :as config]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -35,13 +34,12 @@
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
{:title (i18n/label :t/wallet)
|
||||
:on-press #(rf/dispatch [:open-modal :screen/settings.wallet])
|
||||
:image-props :i/wallet
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow
|
||||
:feature-flag ::ff/settings.wallet-settings}
|
||||
{:title (i18n/label :t/wallet)
|
||||
:on-press #(rf/dispatch [:navigate-to-within-stack [:screen/settings.wallet :settings]])
|
||||
:image-props :i/wallet
|
||||
:image :icon
|
||||
:blur? true
|
||||
:action :arrow}
|
||||
(when config/show-not-implemented-features?
|
||||
{:title (i18n/label :t/dapps)
|
||||
:on-press not-implemented/alert
|
||||
|
||||
@@ -70,7 +70,8 @@
|
||||
:icon-name :i/close
|
||||
:on-press #(rf/dispatch [:navigate-back])
|
||||
:right-side [{:icon-name :i/qr-code
|
||||
:on-press #(debounce/throttle-and-dispatch [:open-modal :screen/share-shell]
|
||||
:on-press #(debounce/throttle-and-dispatch [:open-modal :screen/share-shell
|
||||
{:initial-tab :profile}]
|
||||
1000)}
|
||||
{:icon-name :i/share
|
||||
:on-press #(rf/dispatch [:open-share
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
(ns status-im.contexts.settings.wallet.data-store)
|
||||
|
||||
(defn extract-keypair-name
|
||||
[db key-uids-set]
|
||||
(when (= (count key-uids-set) 1)
|
||||
(let [key-uid (first key-uids-set)
|
||||
keypairs (get-in db [:wallet :keypairs])]
|
||||
(->> (filter #(= (:key-uid %) key-uid) keypairs)
|
||||
first
|
||||
:name))))
|
||||
|
||||
(defn update-keypair
|
||||
[keypairs key-uid update-fn]
|
||||
(mapcat (fn [keypair]
|
||||
(if (= (keypair :key-uid) key-uid)
|
||||
(if-let [updated (update-fn keypair)]
|
||||
[updated]
|
||||
[])
|
||||
[keypair]))
|
||||
keypairs))
|
||||
|
||||
(defn make-accounts-fully-operable
|
||||
[accounts key-uids-set]
|
||||
(reduce-kv
|
||||
(fn [acc k account]
|
||||
(if (and (contains? key-uids-set (:key-uid account))
|
||||
(= (keyword (:operable account)) :no))
|
||||
(assoc acc k (assoc account :operable :fully))
|
||||
(assoc acc k account)))
|
||||
{}
|
||||
accounts))
|
||||
|
||||
(defn- make-keypairs-accounts-fully-operable
|
||||
[accounts]
|
||||
(map (fn [account]
|
||||
(assoc account :operable :fully))
|
||||
accounts))
|
||||
|
||||
(defn make-keypairs-fully-operable
|
||||
[keypairs key-uids-set]
|
||||
(map (fn [keypair]
|
||||
(if (contains? key-uids-set (:key-uid keypair))
|
||||
(update keypair
|
||||
:accounts
|
||||
make-keypairs-accounts-fully-operable)
|
||||
keypair))
|
||||
keypairs))
|
||||
@@ -0,0 +1,38 @@
|
||||
(ns status-im.contexts.settings.wallet.effects
|
||||
(:require [native-module.core :as native-module]
|
||||
[promesa.core :as promesa]
|
||||
[status-im.contexts.syncing.utils :as sync-utils]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]
|
||||
[utils.transforms :as transforms]))
|
||||
|
||||
(rf/reg-fx :effects.syncing/export-keypairs-keystores
|
||||
(fn [{:keys [key-uid sha3-pwd keypair-key-uid on-success on-fail]}]
|
||||
(let [config-map (transforms/clj->json {:senderConfig {:loggedInKeyUid key-uid
|
||||
:keystorePath ""
|
||||
:keypairsToExport [keypair-key-uid]
|
||||
:password (security/safe-unmask-data
|
||||
sha3-pwd)}
|
||||
:serverConfig {:timeout 0}})]
|
||||
(-> (native-module/get-connection-string-for-exporting-keypairs-keystores
|
||||
config-map)
|
||||
(promesa/then (fn [response]
|
||||
(if (sync-utils/valid-connection-string? response)
|
||||
(on-success response)
|
||||
(on-fail (js/Error.
|
||||
"generic-error: failed to get connection string")))))
|
||||
(promesa/catch on-fail)))))
|
||||
|
||||
(rf/reg-fx :effects.syncing/import-keypairs-keystores
|
||||
(fn [{:keys [key-uid sha3-pwd keypairs-key-uids connection-string on-success on-fail]}]
|
||||
(let [config-map (transforms/clj->json {:receiverConfig
|
||||
{:loggedInKeyUid key-uid
|
||||
:keystorePath ""
|
||||
:password (security/safe-unmask-data
|
||||
sha3-pwd)
|
||||
:keypairsToImport keypairs-key-uids}})]
|
||||
(-> (native-module/input-connection-string-for-importing-keypairs-keystores
|
||||
connection-string
|
||||
config-map)
|
||||
(promesa/then #(on-success keypairs-key-uids))
|
||||
(promesa/catch on-fail)))))
|
||||
@@ -1,29 +1,18 @@
|
||||
(ns status-im.contexts.settings.wallet.events
|
||||
(:require
|
||||
[native-module.core :as native-module]
|
||||
[status-im.contexts.syncing.utils :as sync-utils]
|
||||
[status-im.contexts.settings.wallet.data-store :as data-store]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]
|
||||
[utils.security.core :as security]
|
||||
[utils.transforms :as transforms]))
|
||||
|
||||
(defn- update-keypair
|
||||
[keypairs key-uid update-fn]
|
||||
(mapcat (fn [keypair]
|
||||
(if (= (keypair :key-uid) key-uid)
|
||||
(if-let [updated (update-fn keypair)]
|
||||
[updated]
|
||||
[])
|
||||
[keypair]))
|
||||
keypairs))
|
||||
[utils.security.core :as security]))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/rename-keypair-success
|
||||
(fn [{:keys [db]} [key-uid name]]
|
||||
{:db (update-in db
|
||||
[:wallet :keypairs]
|
||||
#(update-keypair % key-uid (fn [keypair] (assoc keypair :name name))))
|
||||
#(data-store/update-keypair % key-uid (fn [keypair] (assoc keypair :name name))))
|
||||
:fx [[:dispatch [:navigate-back]]
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
@@ -41,31 +30,28 @@
|
||||
|
||||
(rf/reg-event-fx :wallet/rename-keypair rename-keypair)
|
||||
|
||||
(defn get-key-pair-export-connection
|
||||
(defn get-keypair-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)))
|
||||
(let [key-uid (get-in db [:profile/profile :key-uid])]
|
||||
{:fx [[:effects.syncing/export-keypairs-keystores
|
||||
{:key-uid key-uid
|
||||
:sha3-pwd sha3-pwd
|
||||
:keypair-key-uid keypair-key-uid
|
||||
:on-success (fn [connect-string]
|
||||
(callback connect-string)
|
||||
(rf/dispatch [:hide-bottom-sheet]))
|
||||
:on-fail (fn [error]
|
||||
(rf/dispatch [:toasts/upsert
|
||||
{:type :negative
|
||||
:text (.-message error)}]))}]]}))
|
||||
|
||||
(rf/reg-event-fx :wallet/get-key-pair-export-connection get-key-pair-export-connection)
|
||||
(rf/reg-event-fx :wallet/get-keypair-export-connection get-keypair-export-connection)
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/remove-keypair-success
|
||||
(rf/reg-event-fx :wallet/remove-keypair-success
|
||||
(fn [{:keys [db]} [key-uid]]
|
||||
{:db (update-in db
|
||||
[:wallet :keypairs]
|
||||
#(update-keypair % key-uid (fn [_] nil)))
|
||||
#(data-store/update-keypair % key-uid (fn [_] nil)))
|
||||
:fx [[:dispatch [:hide-bottom-sheet]]
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
@@ -79,6 +65,108 @@
|
||||
[{:method "accounts_deleteKeypair"
|
||||
:params [key-uid]
|
||||
:on-success [:wallet/remove-keypair-success key-uid]
|
||||
:on-error #(log/info "failed to remove keypair " %)}]]]})
|
||||
:on-error #(log/error "failed to remove keypair " {:error %})}]]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/remove-keypair remove-keypair)
|
||||
|
||||
(defn make-keypairs-accounts-fully-operable
|
||||
[{:keys [db]} [key-uids-to-update]]
|
||||
(let [key-uids-set (set key-uids-to-update)
|
||||
keypair-name (data-store/extract-keypair-name db key-uids-set)]
|
||||
{:db (-> db
|
||||
(update-in [:wallet :accounts] #(data-store/make-accounts-fully-operable % key-uids-set))
|
||||
(update-in [:wallet :keypairs] #(data-store/make-keypairs-fully-operable % key-uids-set)))
|
||||
:fx [[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :positive
|
||||
:theme :dark
|
||||
:text (if (= (count key-uids-to-update) 1)
|
||||
(i18n/label :t/key-pair-imported-successfully {:name keypair-name})
|
||||
(i18n/label :t/key-pairs-successfully-imported
|
||||
{:count (count key-uids-to-update)}))}]]]}))
|
||||
|
||||
(rf/reg-event-fx :wallet/make-keypairs-accounts-fully-operable make-keypairs-accounts-fully-operable)
|
||||
|
||||
(defn connection-string-for-import-keypair
|
||||
[{:keys [db]} [{:keys [sha3-pwd keypairs-key-uids connection-string]}]]
|
||||
(let [key-uid (get-in db [:profile/profile :key-uid])]
|
||||
{:fx [[:effects.syncing/import-keypairs-keystores
|
||||
{:key-uid key-uid
|
||||
:sha3-pwd sha3-pwd
|
||||
:keypairs-key-uids keypairs-key-uids
|
||||
:connection-string connection-string
|
||||
:on-success #(rf/dispatch [:wallet/make-keypairs-accounts-fully-operable %])
|
||||
:on-fail #(rf/dispatch [:toasts/upsert
|
||||
{:type :negative
|
||||
:theme :dark
|
||||
:text %}])}]]}))
|
||||
|
||||
(rf/reg-event-fx :wallet/connection-string-for-import-keypair connection-string-for-import-keypair)
|
||||
|
||||
(defn success-keypair-qr-scan
|
||||
[_ [connection-string keypairs-key-uids]]
|
||||
{:fx [[:dispatch
|
||||
[:standard-auth/authorize-with-password
|
||||
{:blur? true
|
||||
:theme :dark
|
||||
:auth-button-label (i18n/label :t/confirm)
|
||||
:on-auth-success (fn [password]
|
||||
(rf/dispatch [:hide-bottom-sheet])
|
||||
(rf/dispatch
|
||||
[:wallet/connection-string-for-import-keypair
|
||||
{:connection-string connection-string
|
||||
:keypairs-key-uids keypairs-key-uids
|
||||
:sha3-pwd password}]))}]]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/success-keypair-qr-scan success-keypair-qr-scan)
|
||||
|
||||
(defn wallet-validate-seed-phrase
|
||||
[_ [seed-phrase on-success on-error]]
|
||||
{:fx [[:multiaccount/validate-mnemonic [seed-phrase on-success on-error]]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/validate-seed-phrase wallet-validate-seed-phrase)
|
||||
|
||||
(defn make-seed-phrase-keypair-fully-operable
|
||||
[_ [mnemonic password on-success on-error]]
|
||||
{:fx [[:json-rpc/call
|
||||
[{:method "accounts_makeSeedPhraseKeypairFullyOperable"
|
||||
:params [(security/safe-unmask-data mnemonic)
|
||||
(-> password security/safe-unmask-data native-module/sha3)]
|
||||
:on-success on-success
|
||||
:on-error on-error}]]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/make-seed-phrase-keypair-fully-operable make-seed-phrase-keypair-fully-operable)
|
||||
|
||||
(defn import-keypair-by-seed-phrase
|
||||
[_ [{:keys [keypair-key-uid seed-phrase password on-success on-error]}]]
|
||||
{:fx [[:import-keypair-by-seed-phrase
|
||||
{:keypair-key-uid keypair-key-uid
|
||||
:seed-phrase seed-phrase
|
||||
:password password
|
||||
:on-success (fn []
|
||||
(rf/dispatch [:wallet/make-keypairs-accounts-fully-operable
|
||||
#{keypair-key-uid}])
|
||||
(cond
|
||||
(vector? on-success) (rf/dispatch (conj on-success))
|
||||
(fn? on-success) (on-success)))
|
||||
:on-error (fn [error]
|
||||
(rf/dispatch [:wallet/import-keypair-by-seed-phrase-failed error])
|
||||
(cond
|
||||
(vector? on-error) (rf/dispatch (conj on-error error))
|
||||
(fn? on-error) (on-error error)))}]]})
|
||||
|
||||
(rf/reg-event-fx :wallet/import-keypair-by-seed-phrase import-keypair-by-seed-phrase)
|
||||
|
||||
(defn import-keypair-by-seed-phrase-failed
|
||||
[_ [error]]
|
||||
(let [error-type (-> error ex-message keyword)
|
||||
error-data (ex-data error)]
|
||||
(when-not (and (= error-type :import-keypair-by-seed-phrase/import-error)
|
||||
(= (:hint error-data) :incorrect-seed-phrase-for-keypair))
|
||||
{:fx [[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :negative
|
||||
:theme :dark
|
||||
:text (:error error-data)}]]]})))
|
||||
|
||||
(rf/reg-event-fx :wallet/import-keypair-by-seed-phrase-failed import-keypair-by-seed-phrase-failed)
|
||||
|
||||
@@ -1,20 +1,129 @@
|
||||
(ns status-im.contexts.settings.wallet.events-test
|
||||
(:require
|
||||
[cljs.test :refer-macros [deftest is]]
|
||||
[cljs.test :refer-macros [deftest is testing]]
|
||||
matcher-combinators.test
|
||||
[status-im.contexts.settings.wallet.events :as sut]))
|
||||
[native-module.core :as native-module]
|
||||
[status-im.contexts.settings.wallet.events :as sut]
|
||||
[utils.security.core :as security]))
|
||||
|
||||
(def key-uid "0xfef454bb492ee4677594f8e05921c84f336fa811deb99b8d922477cc87a38b98")
|
||||
(def mock-key-uid "key-1")
|
||||
(defn mock-db
|
||||
[keypairs accounts]
|
||||
{:wallet {:keypairs keypairs
|
||||
:accounts accounts}
|
||||
:profile/profile {:key-uid "test-key-uid"}})
|
||||
|
||||
(deftest rename-keypair-test
|
||||
(let [new-keypair-name "key pair new"
|
||||
cofx {:db {}}
|
||||
expected {:fx [[:json-rpc/call
|
||||
[{:method "accounts_updateKeypairName"
|
||||
:params [key-uid new-keypair-name]
|
||||
:on-success [:wallet/rename-keypair-success key-uid new-keypair-name]
|
||||
:on-error fn?}]]]}]
|
||||
cofx {:db {}}]
|
||||
(testing "rename-keypair"
|
||||
(let [expected {:fx [[:json-rpc/call
|
||||
[{:method "accounts_updateKeypairName"
|
||||
:params [mock-key-uid new-keypair-name]
|
||||
:on-success [:wallet/rename-keypair-success mock-key-uid
|
||||
new-keypair-name]
|
||||
:on-error fn?}]]]}]
|
||||
(is (match? expected
|
||||
(sut/rename-keypair cofx
|
||||
[{:key-uid mock-key-uid
|
||||
:keypair-name new-keypair-name}])))))))
|
||||
|
||||
(deftest get-keypair-export-connection-test
|
||||
(let [cofx {:db (mock-db [] {})}
|
||||
sha3-pwd "test-password"
|
||||
user-key-uid "test-key-uid"
|
||||
callback (fn [connect-string] (println "callback" connect-string))]
|
||||
(testing "get-keypair-export-connection"
|
||||
(let [expected {:fx [[:effects.syncing/export-keypairs-keystores
|
||||
{:key-uid user-key-uid
|
||||
:sha3-pwd sha3-pwd
|
||||
:keypair-key-uid mock-key-uid
|
||||
:on-success fn?
|
||||
:on-fail fn?}]]}]
|
||||
(is (match? expected
|
||||
(sut/get-keypair-export-connection
|
||||
cofx
|
||||
[{:sha3-pwd sha3-pwd :keypair-key-uid mock-key-uid :callback callback}])))))))
|
||||
|
||||
(deftest remove-keypair-test
|
||||
(let [cofx {:db {}}]
|
||||
(testing "remove-keypair"
|
||||
(let [expected {:fx [[:json-rpc/call
|
||||
[{:method "accounts_deleteKeypair"
|
||||
:params [mock-key-uid]
|
||||
:on-success [:wallet/remove-keypair-success mock-key-uid]
|
||||
:on-error fn?}]]]}]
|
||||
(is (match? expected
|
||||
(sut/remove-keypair cofx [mock-key-uid])))))))
|
||||
|
||||
(deftest make-keypairs-accounts-fully-operable-test
|
||||
(let [db (mock-db [{:key-uid mock-key-uid
|
||||
:accounts [{:key-uid mock-key-uid :operable "no"}]}]
|
||||
{"0x1" {:key-uid mock-key-uid :operable "no"}})
|
||||
key-uids-to-update [mock-key-uid]]
|
||||
(testing "make-keypairs-accounts-fully-operable"
|
||||
(let [effects (sut/make-keypairs-accounts-fully-operable {:db db} [key-uids-to-update])
|
||||
result-db (:db effects)
|
||||
updated-keypair (some #(when (= (:key-uid %) mock-key-uid) %)
|
||||
(get-in result-db [:wallet :keypairs]))
|
||||
updated-account (get-in result-db [:wallet :accounts "0x1"])]
|
||||
(is (= (keyword (-> updated-keypair :accounts first :operable)) :fully))
|
||||
(is (= (keyword (:operable updated-account)) :fully))))))
|
||||
|
||||
(deftest connection-string-for-import-keypair-test
|
||||
(let [cofx {:db (mock-db [] {})}
|
||||
sha3-pwd "test-password"
|
||||
user-key-uid "test-key-uid"
|
||||
connection-string "test-connection-string"]
|
||||
(testing "connection-string-for-import-keypair"
|
||||
(let [expected {:fx [[:effects.syncing/import-keypairs-keystores
|
||||
{:key-uid user-key-uid
|
||||
:sha3-pwd sha3-pwd
|
||||
:keypairs-key-uids [mock-key-uid]
|
||||
:connection-string connection-string
|
||||
:on-success fn?
|
||||
:on-fail fn?}]]}]
|
||||
(is (match? expected
|
||||
(sut/connection-string-for-import-keypair cofx
|
||||
[{:sha3-pwd sha3-pwd
|
||||
:keypairs-key-uids [mock-key-uid]
|
||||
:connection-string
|
||||
connection-string}])))))))
|
||||
|
||||
(deftest success-keypair-qr-scan-test
|
||||
(let [connection-string "valid-connection-string"
|
||||
keypairs-key-uids ["keypair-uid"]]
|
||||
(testing "success-keypair-qr-scan"
|
||||
(let [effects (sut/success-keypair-qr-scan nil [connection-string keypairs-key-uids])
|
||||
fx (:fx effects)]
|
||||
(is (some? fx))))))
|
||||
|
||||
(deftest wallet-validate-seed-phrase-test
|
||||
(let [cofx {:db {}}
|
||||
seed-phrase-masked (security/mask-data "seed phrase")
|
||||
on-success #(prn "success")
|
||||
on-error #(prn "error")
|
||||
expected {:fx [[:multiaccount/validate-mnemonic
|
||||
[seed-phrase-masked on-success on-error]]]}]
|
||||
(is (= expected
|
||||
(sut/wallet-validate-seed-phrase
|
||||
cofx
|
||||
[seed-phrase-masked on-success on-error])))))
|
||||
|
||||
(deftest make-seed-phrase-keypair-fully-operable-test
|
||||
(let [cofx {:db {}}
|
||||
mnemonic "seed phrase"
|
||||
password "password"
|
||||
mnemonic-masked (security/mask-data mnemonic)
|
||||
password-masked (security/mask-data password)
|
||||
on-success #(prn "success")
|
||||
on-error #(prn "error")
|
||||
expected {:fx [[:json-rpc/call
|
||||
[{:method "accounts_makeSeedPhraseKeypairFullyOperable"
|
||||
:params [mnemonic (native-module/sha3 password)]
|
||||
:on-success fn?
|
||||
:on-error fn?}]]]}]
|
||||
(is (match? expected
|
||||
(sut/rename-keypair cofx
|
||||
[{:key-uid key-uid
|
||||
:keypair-name new-keypair-name}])))))
|
||||
(sut/make-seed-phrase-keypair-fully-operable
|
||||
cofx
|
||||
[mnemonic-masked password-masked on-success on-error])))))
|
||||
|
||||
@@ -1,44 +1,62 @@
|
||||
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.actions.view
|
||||
(:require [quo.core :as quo]
|
||||
[react-native.core :as rn]
|
||||
[status-im.contexts.settings.wallet.keypairs-and-accounts.remove.view :as remove-key-pair]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn on-rename-key-pair
|
||||
[key-pair]
|
||||
(rf/dispatch [:open-modal :screen/settings.rename-keypair key-pair]))
|
||||
|
||||
(defn on-remove-key-pair
|
||||
[key-pair]
|
||||
(rf/dispatch [:show-bottom-sheet
|
||||
{:theme :dark
|
||||
:content (fn []
|
||||
[remove-key-pair/view key-pair])}]))
|
||||
|
||||
(defn on-show-qr
|
||||
[data]
|
||||
(rf/dispatch [:open-modal :screen/settings.encrypted-key-pair-qr data]))
|
||||
|
||||
(defn view
|
||||
[props key-pair]
|
||||
(let [has-paired-device (rf/sub [:pairing/has-paired-devices])]
|
||||
[{:keys [drawer-props keypair]}]
|
||||
(let [has-paired-device (rf/sub [:pairing/has-paired-devices])
|
||||
missing-keypair? (= (:stored drawer-props) :missing)
|
||||
on-scan-qr (rn/use-callback #(rf/dispatch [:open-modal
|
||||
:screen/settings.scan-keypair-qr
|
||||
[(:key-uid keypair)]])
|
||||
[keypair])
|
||||
on-show-qr (rn/use-callback #(rf/dispatch [:open-modal
|
||||
:screen/settings.encrypted-key-pair-qr
|
||||
keypair])
|
||||
[keypair])
|
||||
on-remove-keypair (rn/use-callback #(rf/dispatch
|
||||
[:show-bottom-sheet
|
||||
{:theme :dark
|
||||
:content (fn []
|
||||
[remove-key-pair/view keypair])}])
|
||||
[keypair])
|
||||
on-rename-keypair (rn/use-callback #(rf/dispatch [:open-modal :screen/settings.rename-keypair
|
||||
keypair])
|
||||
[keypair])
|
||||
on-import-seed-phrase (rn/use-callback
|
||||
#(rf/dispatch [:open-modal :screen/settings.import-seed-phrase keypair])
|
||||
[keypair])]
|
||||
[:<>
|
||||
[quo/drawer-top props]
|
||||
[quo/drawer-top drawer-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 key-pair)}])
|
||||
(when (= (:type props) :keypair)
|
||||
(concat
|
||||
[{:icon :i/edit
|
||||
:accessibility-label :rename-key-pair
|
||||
:label (i18n/label :t/rename-key-pair)
|
||||
:on-press #(on-rename-key-pair key-pair)}]
|
||||
[{:icon :i/delete
|
||||
:accessibility-label :remove-key-pair
|
||||
:add-divider? true
|
||||
:danger? true
|
||||
:label (i18n/label :t/remove-key-pair-and-derived-accounts)
|
||||
:on-press #(on-remove-key-pair key-pair)}]))]]]))
|
||||
(if-not missing-keypair?
|
||||
[{: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}]
|
||||
[{:icon :i/scan
|
||||
:accessibility-label :import-by-scan-qr
|
||||
:label (i18n/label :t/import-by-scanning-encrypted-qr)
|
||||
:on-press on-scan-qr}]))
|
||||
(when (= (:type drawer-props) :keypair)
|
||||
[(when missing-keypair?
|
||||
(case (:type keypair)
|
||||
:seed {:icon :i/seed
|
||||
:accessibility-label :import-seed-phrase
|
||||
:label (i18n/label :t/import-by-entering-recovery-phrase)
|
||||
:on-press #(on-import-seed-phrase keypair)}
|
||||
nil))
|
||||
{:icon :i/edit
|
||||
:accessibility-label :rename-key-pair
|
||||
:label (i18n/label :t/rename-key-pair)
|
||||
:on-press on-rename-keypair}
|
||||
{:icon :i/delete
|
||||
:accessibility-label :remove-key-pair
|
||||
:add-divider? true
|
||||
:danger? true
|
||||
:label (i18n/label :t/remove-key-pair-and-derived-accounts)
|
||||
:on-press on-remove-keypair}])]]]))
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user