Compare commits

..
2 Commits
Author SHA1 Message Date
ibrkhalil 3f3437bdfd version bump 2024-05-09 14:28:54 +03:00
ibrkhalil b69fe523f9 Version bump 2024-05-09 14:27:40 +03:00
41 changed files with 290 additions and 726 deletions
-7
View File
@@ -1,5 +1,4 @@
{:config-paths ["status-im"] {:config-paths ["status-im"]
:output {:exclude-files ["src/user.cljs" "src/dev/user.cljs"]}
:lint-as {legacy.status-im.utils.views/defview clojure.core/defn :lint-as {legacy.status-im.utils.views/defview clojure.core/defn
legacy.status-im.utils.views/letsubs clojure.core/let legacy.status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojure.core/let reagent.core/with-let clojure.core/let
@@ -16,8 +15,6 @@
:case-symbol-test {:level :error} :case-symbol-test {:level :error}
:clj-kondo-config {:level :error} :clj-kondo-config {:level :error}
:cond-else {:level :error} :cond-else {:level :error}
:condition-always-true {:level :error}
:conflicting-alias {:level :error}
:consistent-alias {:level :error :consistent-alias {:level :error
:aliases {clojure.set set :aliases {clojure.set set
clojure.string string clojure.string string
@@ -45,13 +42,11 @@
:missing-body-in-when {:level :error} :missing-body-in-when {:level :error}
:missing-clause-in-try {:level :error} :missing-clause-in-try {:level :error}
:missing-else-branch {:level :error} :missing-else-branch {:level :error}
:multiple-async-in-deftest {:level :error}
:not-empty? {:level :error} :not-empty? {:level :error}
:plus-one {:level :error} :plus-one {:level :error}
:redundant-do {:level :error} :redundant-do {:level :error}
:redundant-let {:level :error} :redundant-let {:level :error}
:refer-all {:level :error} :refer-all {:level :error}
:shadowed-fn-param {:level :error}
:shadowed-var {:level :error :shadowed-var {:level :error
;; We temporarily use :include to define an ;; We temporarily use :include to define an
;; allowlist of core Clojure vars. In the ;; allowlist of core Clojure vars. In the
@@ -59,11 +54,9 @@
;; vars, we should be able to delete this ;; vars, we should be able to delete this
;; option and lint all vars. ;; option and lint all vars.
:exclude [type name]} :exclude [type name]}
:self-requiring-namespace {:level :error}
:single-operand-comparison {:level :error} :single-operand-comparison {:level :error}
:syntax {:level :error} :syntax {:level :error}
:unbound-destructuring-default {:level :error} :unbound-destructuring-default {:level :error}
:underscore-in-namespace {:level :error}
:uninitialized-var {:level :error} :uninitialized-var {:level :error}
:unknown-require-option {:level :error} :unknown-require-option {:level :error}
:unreachable-code {:level :error} :unreachable-code {:level :error}
-2
View File
@@ -127,8 +127,6 @@ fastlane/README.md
# Clj # Clj
.cpcache/ .cpcache/
src/user.cljs
src/dev/user.cljs
# emacs # emacs
.dir-locals.el .dir-locals.el
+6 -13
View File
@@ -1,9 +1,5 @@
// This code has pieces that were autogenerated but is now managed manually // DO NOT EDIT: code is autogenerated by go2nodebinding from Go code.
// Here lies the node bindings used for integration tests // https://github.com/divan/go2nodebinding
// These are basically C calls to exported status-go functions
// Along 1 additional Poll function to get signals to work
// function names registered here in init() are used in various places
// ref -> status-mobile/src/tests/test_utils.cljs
#include <node.h> #include <node.h>
#include <string> #include <string>
@@ -1151,13 +1147,10 @@ void _PollSignal(const FunctionCallbackInfo<Value>& args) {
v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(args[0]); v8::Local<v8::Function> func = v8::Local<v8::Function>::Cast(args[0]);
if (!q.empty()) { if (!q.empty()) {
const unsigned argc = 1; const unsigned argc = 1;
v8::Local<v8::Value> argv[argc] = {v8::String::NewFromUtf8(isolate, q.front().c_str()).ToLocalChecked()}; v8::Local<v8::Value> argv[argc] =
v8::MaybeLocal<v8::Value> result = func->Call(isolate->GetCurrentContext(), v8::Null(isolate), argc, argv); { v8::String::NewFromUtf8(isolate,q.front().c_str()).ToLocalChecked()};
if (result.IsEmpty()) {
isolate->ThrowException(Exception::Error( func->Call(isolate->GetCurrentContext(), v8::Null(isolate), argc, argv);
String::NewFromUtf8Literal(isolate, "Error calling the callback function")));
return;
}
q.pop(); q.pop();
} }
} }
+97 -115
View File
@@ -90,20 +90,11 @@
}, },
{ {
"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", "host": "https://repo.clojars.org",
"jar": { "jar": {
"sha1": "c3d3a729beaa728d0ee6a3678a48c880b6bc95f1", "sha1": "1f28a4a834a7a46cf24def971b1a705a6795c73a",
"sha256": "0klcppvydxlx9ji376mvz40yv3s7awq6p9yd57wigpfy4m2yv0w6" "sha256": "0h4pyzy8rzzh567khvimw2cs8jr640kqxgaxvbfx1s5yfp56fka2"
}
},
{
"path": "cider/orchard/0.21.0/orchard-0.21.0",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "073617f16a132c7f20608d971244753d4e704129",
"sha256": "1n2afbyhw9x9kvfna4m4x6n6pwjiqsqcayql644bw2932i1isrkj"
} }
}, },
@@ -117,11 +108,11 @@
}, },
{ {
"path": "clj-kondo/clj-kondo/2024.03.13/clj-kondo-2024.03.13", "path": "clj-kondo/clj-kondo/2023.09.07/clj-kondo-2023.09.07",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
"jar": { "jar": {
"sha1": "adec398a95322f3a27baf0a92b658493335464d1", "sha1": "9bf516b973a0b77d7dc5a3c6c84a884e3470e7b7",
"sha256": "0r97hsj7m3qc12xwyxx6m1a71gqp5aiy99imcf8r0nz2dnjmj0kz" "sha256": "1qkw5ryqdzy4wl3xbr0r72ikrch75z5vh1dny569y3jlc888gkv8"
} }
}, },
@@ -260,15 +251,6 @@
} }
}, },
{
"path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1",
"sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf"
}
},
{ {
"path": "com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0", "path": "com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -342,38 +324,11 @@
}, },
{ {
"path": "commons-codec/commons-codec/1.15/commons-codec-1.15", "path": "com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
"jar": { "jar": {
"sha1": "49d94806b6e3dc933dacbd8acb0fdbab8ebd1e5d", "sha1": "c9ad4a0850ab676c5c64461a05ca524cdfff59f1",
"sha256": "0qzd8v96j4x7jjcfpvvdh9ar1xhwxpxi2rh51nzhj0br7bbgdsdk" "sha256": "170rflxnqnah0265ik2aylmxkshyqbf2zas9bp2l32xqj9l6jsaf"
}
},
{
"path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0",
"sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54"
}
},
{
"path": "commons-io/commons-io/2.11.0/commons-io-2.11.0",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "a2503f302b11ebde7ebc3df41daebe0e4eea3689",
"sha256": "020946yakki3qzc652arfndzi594drxanidz9bawbb6vhxnjy6wn"
}
},
{
"path": "compojure/compojure/1.5.2/compojure-1.5.2",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439",
"sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf"
} }
}, },
@@ -413,6 +368,42 @@
} }
}, },
{
"path": "commons-codec/commons-codec/1.15/commons-codec-1.15",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "49d94806b6e3dc933dacbd8acb0fdbab8ebd1e5d",
"sha256": "0qzd8v96j4x7jjcfpvvdh9ar1xhwxpxi2rh51nzhj0br7bbgdsdk"
}
},
{
"path": "commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "f95188e3d372e20e7328706c37ef366e5d7859b0",
"sha256": "1xyyl54sfxsdcwxdyq6b0azmr31b4dwqns850jjkw9a9dwrh5v54"
}
},
{
"path": "commons-io/commons-io/2.11.0/commons-io-2.11.0",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "a2503f302b11ebde7ebc3df41daebe0e4eea3689",
"sha256": "020946yakki3qzc652arfndzi594drxanidz9bawbb6vhxnjy6wn"
}
},
{
"path": "compojure/compojure/1.5.2/compojure-1.5.2",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "0b5258d0616ffc5f64c2b6d95f09de56d24df439",
"sha256": "1s2k05lwnlm9a66mxnsss437i9gp70dny8y2rlfkl090s6mdqsaf"
}
},
{ {
"path": "crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1", "path": "crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
@@ -584,15 +575,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", "path": "net/cgrand/macrovich/0.2.1/macrovich-0.2.1",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
@@ -621,11 +603,11 @@
}, },
{ {
"path": "nrepl/nrepl/1.1.0/nrepl-1.1.0", "path": "nrepl/nrepl/0.9.0/nrepl-0.9.0",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
"jar": { "jar": {
"sha1": "69f138d4a778c199e5d72446ca25998222ba0862", "sha1": "49beada131959f08f9a20899affbd1b10c03a668",
"sha256": "0n29xczgwpqv98vz36sdic98mf07dmzhjawlxd63p2s2zafkp1ss" "sha256": "1phak0479s27ffw9wzz7pi8cqqs6ipsm15dhgw9szxxcfhx529qa"
} }
}, },
@@ -638,15 +620,6 @@
} }
}, },
{
"path": "org/apache/ant/ant/1.10.11/ant-1.10.11",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "b875cd48a0bc955ae9c5c477ad991e1f26fb24d2",
"sha256": "0m07pifkdpwghpp8wvqh14sbxazmjbkkpsfakw6ixq5apfdvih48"
}
},
{ {
"path": "org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11", "path": "org/apache/ant/ant-launcher/1.10.11/ant-launcher-1.10.11",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -657,11 +630,11 @@
}, },
{ {
"path": "org/babashka/sci/0.8.41/sci-0.8.41", "path": "org/apache/ant/ant/1.10.11/ant-1.10.11",
"host": "https://repo.clojars.org", "host": "https://repo1.maven.org/maven2",
"jar": { "jar": {
"sha1": "e8d59dc588a1e1f0c62c21fb47c093eeed043f04", "sha1": "b875cd48a0bc955ae9c5c477ad991e1f26fb24d2",
"sha256": "1lhv283fs0bnqbj1jhfgyy2rv6hspnhdgsiklqy3rqxrqbnrww6w" "sha256": "0m07pifkdpwghpp8wvqh14sbxazmjbkkpsfakw6ixq5apfdvih48"
} }
}, },
@@ -674,6 +647,15 @@
} }
}, },
{
"path": "org/babashka/sci/0.7.38/sci-0.7.38",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "ef2d8c74065b9a7d685a11bff017676db308a923",
"sha256": "04pkxwcgkd1p4f4rszsr6pp18fl0vni1az47a390llrhyyrjcckn"
}
},
{ {
"path": "org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0", "path": "org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -764,15 +746,6 @@
} }
}, },
{
"path": "org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "533ce2bdbb7925db781449abb6527af1e6c5e782",
"sha256": "0js19lw8bp9gym3pn47h867vhf65j18qc6x1pfn883vkwyasm18l"
}
},
{ {
"path": "org/clojure/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541", "path": "org/clojure/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -782,6 +755,15 @@
} }
}, },
{
"path": "org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "533ce2bdbb7925db781449abb6527af1e6c5e782",
"sha256": "0js19lw8bp9gym3pn47h867vhf65j18qc6x1pfn883vkwyasm18l"
}
},
{ {
"path": "org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0", "path": "org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.0",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -809,15 +791,6 @@
} }
}, },
{
"path": "org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "692882a35d7b50947d6e4852fba8a51d8d5e3646",
"sha256": "08fzw3srrppgq1d11sh1ghnyvi24ixa10kbqsncc7xyx7fybcs0k"
}
},
{ {
"path": "org/clojure/tools.analyzer.jvm/1.2.2/tools.analyzer.jvm-1.2.2", "path": "org/clojure/tools.analyzer.jvm/1.2.2/tools.analyzer.jvm-1.2.2",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -827,6 +800,15 @@
} }
}, },
{
"path": "org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0",
"host": "https://repo1.maven.org/maven2",
"jar": {
"sha1": "692882a35d7b50947d6e4852fba8a51d8d5e3646",
"sha256": "08fzw3srrppgq1d11sh1ghnyvi24ixa10kbqsncc7xyx7fybcs0k"
}
},
{ {
"path": "org/clojure/tools.cli/1.0.206/tools.cli-1.0.206", "path": "org/clojure/tools.cli/1.0.206/tools.cli-1.0.206",
"host": "https://repo1.maven.org/maven2", "host": "https://repo1.maven.org/maven2",
@@ -980,15 +962,6 @@
} }
}, },
{
"path": "reagent/reagent/1.2.0/reagent-1.2.0",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "1b9a181b5c7ed3557768d2ea0c66f5616aef5e97",
"sha256": "0scvkzfqjs613z10rngh7427v3pxdqablf0fcl65pbpkzz16wgav"
}
},
{ {
"path": "re-com/re-com/2.8.0/re-com-2.8.0", "path": "re-com/re-com/2.8.0/re-com-2.8.0",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
@@ -998,15 +971,6 @@
} }
}, },
{
"path": "refactor-nrepl/refactor-nrepl/3.9.1/refactor-nrepl-3.9.1",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "f949af92dd1d6fef59d7447bd0cb62118e34eca1",
"sha256": "0dml9yvjmji6xk2sk3cdmkvvnh13rw29szxxl363hap8yg28xcs1"
}
},
{ {
"path": "re-frame/re-frame/1.3.0/re-frame-1.3.0", "path": "re-frame/re-frame/1.3.0/re-frame-1.3.0",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
@@ -1034,6 +998,24 @@
} }
}, },
{
"path": "reagent/reagent/1.2.0/reagent-1.2.0",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "1b9a181b5c7ed3557768d2ea0c66f5616aef5e97",
"sha256": "0scvkzfqjs613z10rngh7427v3pxdqablf0fcl65pbpkzz16wgav"
}
},
{
"path": "refactor-nrepl/refactor-nrepl/3.9.1/refactor-nrepl-3.9.1",
"host": "https://repo.clojars.org",
"jar": {
"sha1": "f949af92dd1d6fef59d7447bd0cb62118e34eca1",
"sha256": "0dml9yvjmji6xk2sk3cdmkvvnh13rw29szxxl363hap8yg28xcs1"
}
},
{ {
"path": "ring-cors/ring-cors/0.1.8/ring-cors-0.1.8", "path": "ring-cors/ring-cors/0.1.8/ring-cors-0.1.8",
"host": "https://repo.clojars.org", "host": "https://repo.clojars.org",
+14 -16
View File
@@ -8,10 +8,9 @@ borkdude/edamame/1.3.23/edamame-1.3.23.jar
borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.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 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 cheshire/cheshire/5.11.0/cheshire-5.11.0.jar
cider/cider-nrepl/0.44.0/cider-nrepl-0.44.0.jar cider/cider-nrepl/0.31.0/cider-nrepl-0.31.0.jar
cider/orchard/0.21.0/orchard-0.21.0.jar
cider/piggieback/0.5.2/piggieback-0.5.2.jar cider/piggieback/0.5.2/piggieback-0.5.2.jar
clj-kondo/clj-kondo/2024.03.13/clj-kondo-2024.03.13.jar clj-kondo/clj-kondo/2023.09.07/clj-kondo-2023.09.07.jar
cljs-bean/cljs-bean/1.9.0/cljs-bean-1.9.0.jar cljs-bean/cljs-bean/1.9.0/cljs-bean-1.9.0.jar
clout/clout/2.1.2/clout-2.1.2.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/andrewmcveigh/cljs-time/0.5.2/cljs-time-0.5.2.jar
@@ -27,7 +26,6 @@ com/github/javaparser/javaparser-core/3.25.3/javaparser-core-3.25.3.jar
com/google/auto/value/auto-value-annotations/1.6/auto-value-annotations-1.6.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/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
com/google/code/gson/gson/2.9.1/gson-2.9.1.jar com/google/code/gson/gson/2.9.1/gson-2.9.1.jar
com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0.jar com/google/errorprone/error_prone_annotations/2.15.0/error_prone_annotations-2.15.0.jar
com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar 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/guava/31.0.1-jre/guava-31.0.1-jre.jar
@@ -36,14 +34,15 @@ 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/javascript/closure-compiler-unshaded/v20230802/closure-compiler-unshaded-v20230802.jar
com/google/protobuf/protobuf-java/3.21.12/protobuf-java-3.21.12.jar com/google/protobuf/protobuf-java/3.21.12/protobuf-java-3.21.12.jar
com/google/re2j/re2j/1.3/re2j-1.3.jar com/google/re2j/re2j/1.3/re2j-1.3.jar
commons-codec/commons-codec/1.15/commons-codec-1.15.jar com/googlecode/json-simple/json-simple/1.1.1/json-simple-1.1.1.jar
commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar
commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
compojure/compojure/1.5.2/compojure-1.5.2.jar
com/taoensso/encore/3.68.0/encore-3.68.0.jar com/taoensso/encore/3.68.0/encore-3.68.0.jar
com/taoensso/timbre/6.3.1/timbre-6.3.1.jar com/taoensso/timbre/6.3.1/timbre-6.3.1.jar
com/taoensso/truss/1.11.0/truss-1.11.0.jar com/taoensso/truss/1.11.0/truss-1.11.0.jar
com/taoensso/tufte/2.6.3/tufte-2.6.3.jar com/taoensso/tufte/2.6.3/tufte-2.6.3.jar
commons-codec/commons-codec/1.15/commons-codec-1.15.jar
commons-fileupload/commons-fileupload/1.4/commons-fileupload-1.4.jar
commons-io/commons-io/2.11.0/commons-io-2.11.0.jar
compojure/compojure/1.5.2/compojure-1.5.2.jar
crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1.jar crypto-equality/crypto-equality/1.0.1/crypto-equality-1.0.1.jar
crypto-random/crypto-random/1.2.1/crypto-random-1.2.1.jar crypto-random/crypto-random/1.2.1/crypto-random-1.2.1.jar
day8/re-frame/test/0.1.5/test-0.1.5.jar day8/re-frame/test/0.1.5/test-0.1.5.jar
@@ -63,16 +62,15 @@ javax/xml/bind/jaxb-api/2.3.0/jaxb-api-2.3.0.jar
medley/medley/0.8.2/medley-0.8.2.jar medley/medley/0.8.2/medley-0.8.2.jar
metosin/malli/0.13.0/malli-0.13.0.jar metosin/malli/0.13.0/malli-0.13.0.jar
mvxcvi/arrangement/2.1.0/arrangement-2.1.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/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar
net/java/dev/jna/jna/5.12.1/jna-5.12.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/bencode/1.1.0/bencode-1.1.0.jar
nrepl/nrepl/1.1.0/nrepl-1.1.0.jar nrepl/nrepl/0.9.0/nrepl-0.9.0.jar
nubank/matcher-combinators/3.8.8/matcher-combinators-3.8.8.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/ant/ant-launcher/1.10.11/ant-launcher-1.10.11.jar
org/babashka/sci/0.8.41/sci-0.8.41.jar org/apache/ant/ant/1.10.11/ant-1.10.11.jar
org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar org/babashka/sci.impl.types/0.0.2/sci.impl.types-0.0.2.jar
org/babashka/sci/0.7.38/sci-0.7.38.jar
org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar org/checkerframework/checker-qual/3.12.0/checker-qual-3.12.0.jar
org/clojure/clojure/1.11.1/clojure-1.11.1.jar org/clojure/clojure/1.11.1/clojure-1.11.1.jar
org/clojure/clojurescript/1.11.60/clojurescript-1.11.60.jar org/clojure/clojurescript/1.11.60/clojurescript-1.11.60.jar
@@ -83,13 +81,13 @@ 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/core.specs.alpha/0.2.62/core.specs.alpha-0.2.62.jar
org/clojure/data.json/2.4.0/data.json-2.4.0.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.priority-map/1.1.0/data.priority-map-1.1.0.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/google-closure-library-third-party/0.0-20230227-c7c0a541/google-closure-library-third-party-0.0-20230227-c7c0a541.jar
org/clojure/google-closure-library/0.0-20230227-c7c0a541/google-closure-library-0.0-20230227-c7c0a541.jar
org/clojure/math.combinatorics/0.2.0/math.combinatorics-0.2.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/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/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.analyzer.jvm/1.2.2/tools.analyzer.jvm-1.2.2.jar
org/clojure/tools.analyzer/1.1.0/tools.analyzer-1.1.0.jar
org/clojure/tools.cli/1.0.206/tools.cli-1.0.206.jar org/clojure/tools.cli/1.0.206/tools.cli-1.0.206.jar
org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar org/clojure/tools.logging/1.1.0/tools.logging-1.1.0.jar
org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar org/clojure/tools.macro/0.1.5/tools.macro-0.1.5.jar
@@ -107,12 +105,12 @@ 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 org/wildfly/client/wildfly-client-config/1.0.1.Final/wildfly-client-config-1.0.1.Final.jar
org/wildfly/common/wildfly-common/1.5.4.Final/wildfly-common-1.5.4.Final.jar org/wildfly/common/wildfly-common/1.5.4.Final/wildfly-common-1.5.4.Final.jar
prismatic/schema/1.1.7/schema-1.1.7.jar prismatic/schema/1.1.7/schema-1.1.7.jar
reagent/reagent/1.2.0/reagent-1.2.0.jar
re-com/re-com/2.8.0/re-com-2.8.0.jar re-com/re-com/2.8.0/re-com-2.8.0.jar
refactor-nrepl/refactor-nrepl/3.9.1/refactor-nrepl-3.9.1.jar
re-frame/re-frame/1.3.0/re-frame-1.3.0.jar re-frame/re-frame/1.3.0/re-frame-1.3.0.jar
re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0.jar re-frisk-remote/re-frisk-remote/1.6.0/re-frisk-remote-1.6.0.jar
re-frisk/sente/1.15.0/sente-1.15.0.jar re-frisk/sente/1.15.0/sente-1.15.0.jar
reagent/reagent/1.2.0/reagent-1.2.0.jar
refactor-nrepl/refactor-nrepl/3.9.1/refactor-nrepl-3.9.1.jar
ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar
ring/ring-codec/1.2.0/ring-codec-1.2.0.jar ring/ring-codec/1.2.0/ring-codec-1.2.0.jar
ring/ring-core/1.9.6/ring-core-1.9.6.jar ring/ring-core/1.9.6/ring-core-1.9.6.jar
+5 -6
View File
@@ -1,9 +1,8 @@
{ stdenv, meta, source, buildGo119Package, buildGo120Package }: { buildGoPackage
let # object with source attributes
# https://github.com/status-im/status-mobile/issues/19802 , meta, source}:
# only for Darwin to fix Integration Tests failing with missing symbols on go 1.20
buildGoPackageIntegrationTest = if stdenv.isDarwin then buildGo119Package else buildGo120Package; buildGoPackage {
in buildGoPackageIntegrationTest {
pname = source.repo; pname = source.repo;
version = "${source.cleanVersion}-${source.shortRev}"; version = "${source.cleanVersion}-${source.shortRev}";
+1 -1
View File
@@ -21,7 +21,7 @@
[nubank/matcher-combinators "3.8.8"] [nubank/matcher-combinators "3.8.8"]
;; Use the same version specified in the Nix dependency. ;; Use the same version specified in the Nix dependency.
[clj-kondo/clj-kondo "2024.03.13"] [clj-kondo/clj-kondo "2023.09.07"]
;; Routing ;; Routing
[bidi "2.1.6"] [bidi "2.1.6"]
-23
View File
@@ -1,23 +0,0 @@
# The `dev/` directory
The `src/dev/` directory is a place where developers can commit non-production
and non-test code which can facilitate development in general. The code should,
ideally, be useful to more than one team member.
**Note**: As of today (2024-05-07), we don't have further guidelines or examples
about how mobile teams should use and maintain these dev-only namespaces. Before
opening a PR introducing new dev-only namespaces, consider sharing and
discussing with as many team members as you can.
### The `user` namespace
You may optionally create a `src/dev/user.cljs` and/or `src/user.cljs` file.
These files are git-ignored and are meant to be your own playground. Clojure
developers usually use such namespaces to create temporary utilities and
experiments that aren't necessarily useful to others. They are particularly
valuable for developers adept at the REPL-Driven Development workflow.
Be careful with `make clean` because it will delete all non-tracked git files.
If you rely on this file, you may prefer to create a symbolic link and store the
original `user.cljs` file outside the `status-mobile` repository. Then, after
`make clean`, you will need to recreate the symlink.
@@ -9,31 +9,26 @@
[schema.core :as schema])) [schema.core :as schema]))
(defn- description-comp (defn- description-comp
[description members-count active-members-count show-members-count?] [description members-count active-members-count]
(let [has-members? (pos? members-count) [rn/view
has-active-members? (pos? active-members-count)] [text/text
[rn/view {:size :paragraph-2
[text/text :number-of-lines 3
{:size :paragraph-2 :accessibility-label :description}
:number-of-lines 3 description]
:accessibility-label :description} [rn/view {:style style/stat-container}
description] [community-stat/view
(when show-members-count? {:value members-count
[rn/view :icon :i/members
{:style style/stat-container} :accessibility-label :members-count
(when has-members? :style {:margin-right 12}
[community-stat/view :text-size :paragraph-2}]
{:value members-count (when active-members-count
:icon :i/members [community-stat/view
:accessibility-label :members-count {:value active-members-count
:style {:margin-right 12} :icon :i/active-members
:text-size :paragraph-2}]) :accessibility-label :active-members-count
(when has-active-members? :text-size :paragraph-2}])]])
[community-stat/view
{:value active-members-count
:icon :i/active-members
:accessibility-label :active-members-count
:text-size :paragraph-2}])])]))
(defn- title-comp (defn- title-comp
[title] [title]
@@ -79,7 +74,7 @@
(defn- view-internal (defn- view-internal
[{:keys [title description loading? icon banner members-count active-members-count [{:keys [title description loading? icon banner members-count active-members-count
on-press size show-members-count?]}] on-press size]}]
(let [theme (quo.theme/use-theme)] (let [theme (quo.theme/use-theme)]
[rn/pressable [rn/pressable
{:style (style/container size theme) {:style (style/container size theme)
@@ -93,7 +88,7 @@
[logo-comp icon]) [logo-comp icon])
[title-comp title]] [title-comp title]]
(when description (when description
[description-comp description members-count active-members-count show-members-count?]) [description-comp description members-count active-members-count])
(when banner (when banner
[thumbnail-comp banner size])])])) [thumbnail-comp banner size])])]))
@@ -34,8 +34,7 @@
:members-count "20" :members-count "20"
:loading? false :loading? false
:active-members-count "15" :active-members-count "15"
:type :community :type :community})
:show-members-count? true})
(h/describe "Internal link card - Community" (h/describe "Internal link card - Community"
(h/test "renders with most common props" (h/test "renders with most common props"
@@ -18,6 +18,5 @@
[:active-members-count {:optional true} [:maybe [:or :int :string]]] [:active-members-count {:optional true} [:maybe [:or :int :string]]]
[:customization-color {:optional true} [:maybe :schema.common/customization-color]] [:customization-color {:optional true} [:maybe :schema.common/customization-color]]
[:emoji-hash {:optional true} [:maybe :string]] [:emoji-hash {:optional true} [:maybe :string]]
[:size {:optional true} [:maybe :keyword]] [:size {:optional true} [:maybe :keyword]]]]]
[:show-members-count? {:optional true} [:maybe :boolean]]]]]
:any]) :any])
@@ -12,8 +12,8 @@
[:lower-case? :boolean] [:lower-case? :boolean]
[:upper-case? :boolean] [:upper-case? :boolean]
[:numbers? :boolean] [:numbers? :boolean]
[:symbols? :boolean]]] [:symbols? :boolean]]
:any]) [:any]]])
(defn- view-internal (defn- view-internal
[{:keys [lower-case? upper-case? numbers? symbols?]}] [{:keys [lower-case? upper-case? numbers? symbols?]}]
-9
View File
@@ -199,15 +199,6 @@
[handler deps] [handler deps]
(react/useMemo handler (get-js-deps deps))) (react/useMemo handler (get-js-deps deps)))
(defn delay-render
[content]
(let [[render? set-render] (use-state false)]
(use-mount
(fn []
(js/setTimeout #(set-render true) 0)))
(when render?
content)))
(def layout-animation (.-LayoutAnimation ^js react-native)) (def layout-animation (.-LayoutAnimation ^js react-native))
(def configure-next (.-configureNext ^js layout-animation)) (def configure-next (.-configureNext ^js layout-animation))
+1 -1
View File
@@ -19,5 +19,5 @@
(catch js/Error e# (catch js/Error e#
(taoensso.timbre/error "Failed to instrument function" (taoensso.timbre/error "Failed to instrument function"
{:symbol ~sym :error e#}) {:symbol ~sym :error e#})
(throw e#))) ~sym))
~sym)) ~sym))
+1 -1
View File
@@ -91,5 +91,5 @@
{:schema-id schema-id {:schema-id schema-id
:error e :error e
:function f}) :function f})
(throw e))) f))
f))) f)))
@@ -1,10 +0,0 @@
(ns status-im.common.refreshable-flat-list.view
(:require [react-native.core :as rn]
[reagent.core :as reagent]))
(defn view
[{:keys [refresh-control] :as props}]
[rn/flat-list
(merge {:refresh-control (reagent/as-element
refresh-control)}
(dissoc props :refresh-control))])
@@ -43,7 +43,7 @@
item])))) item]))))
(defn add-manage-members (defn add-manage-members
[{:keys [scroll-enabled? on-scroll]}] []
(let [selected-participants (rf/sub [:group-chat/selected-participants]) (let [selected-participants (rf/sub [:group-chat/selected-participants])
deselected-members (rf/sub [:group-chat/deselected-members]) deselected-members (rf/sub [:group-chat/deselected-members])
chat-id (rf/sub [:get-screen-params :group-add-manage-members]) chat-id (rf/sub [:get-screen-params :group-add-manage-members])
@@ -62,8 +62,6 @@
(i18n/label :t/manage-members)] (i18n/label :t/manage-members)]
[gesture/section-list [gesture/section-list
{:key-fn :title {:key-fn :title
:scroll-enabled @scroll-enabled?
:on-scroll on-scroll
:sticky-section-headers-enabled false :sticky-section-headers-enabled false
:sections (rf/sub [:contacts/grouped-by-first-letter]) :sections (rf/sub [:contacts/grouped-by-first-letter])
:render-section-header-fn contact-list/contacts-section-header :render-section-header-fn contact-list/contacts-section-header
@@ -15,19 +15,14 @@
community-icon :icon community-icon :icon
community-banner :banner community-banner :banner
community-name :display-name community-name :display-name
members-count :members-count members-count :members-count} community]
community-id :community-id} community
token-gated-not-a-member? (rf/sub
[:communities/token-gated-not-a-member?
community-id])]
^{:key url} ^{:key url}
[quo/internal-link-card [quo/internal-link-card
{:type :community {:type :community
:size :message :size :message
:description community-description :description community-description
:members-count members-count :members-count members-count
:title community-name :title community-name
:banner (:url community-banner) :banner (:url community-banner)
:icon (:url community-icon) :icon (:url community-icon)
:on-press #(rf/dispatch [:universal-links/handle-url url]) :on-press #(rf/dispatch [:universal-links/handle-url url])}])))])))
:show-members-count? token-gated-not-a-member?}])))])))
@@ -1,6 +1,5 @@
(ns status-im.contexts.preview.feature-flags.style) (ns status-im.contexts.preview.feature-flags.style)
(def container (def container
{:flex 1 {:flex 1
:margin-left 20 :margin-left 20})
:margin-bottom 20})
@@ -15,28 +15,25 @@
:text-align :left :text-align :left
:title "Features Flags" :title "Features Flags"
:icon-name :i/arrow-left :icon-name :i/arrow-left
:on-press #(rf/dispatch [:navigate-back]) :on-press #(rf/dispatch [:navigate-back])}]
:right-side [{:icon-name :i/rotate (doall
:on-press #(ff/reset-flags)}]}] (for [context-name ff/feature-flags-categories
[rn/scroll-view :let [context-flags (filter (fn [[k]]
(doall (string/includes? (str k) context-name))
(for [context-name ff/feature-flags-categories (ff/feature-flags))]]
:let [context-flags (filter (fn [[k]] ^{:key (str context-name)}
(= context-name [rn/view {:style style/container}
(first (string/split (str (name k)) ".")))) [quo/text
(ff/feature-flags))]] context-name]
^{:key (str context-name)} (doall
[rn/view {:style style/container} (for [i (range (count context-flags))
[quo/text :let [[flag] (nth context-flags i)]]
context-name] ^{:key (str context-name flag i)}
(doall [rn/view {:style {:flex-direction :row}}
(for [i (range (count context-flags)) [quo/selectors
:let [[flag] (nth context-flags i)]] {:type :toggle
^{:key (str context-name flag i)} :checked? (ff/enabled? flag)
[rn/view {:style {:flex-direction :row}} :container-style {:margin-right 8}
[quo/selectors :on-change #(ff/toggle flag)}]
{:type :toggle [quo/text (second (string/split (name flag) "."))]]))]))])
:checked? (ff/enabled? flag)
:container-style {:margin-right 8}
:on-change #(ff/toggle flag)}]
[quo/text (second (string/split (name flag) "."))]]))]))]])
@@ -1,7 +1,6 @@
(ns status-im.contexts.profile.settings.list-items (ns status-im.contexts.profile.settings.list-items
(:require [status-im.common.not-implemented :as not-implemented] (:require [status-im.common.not-implemented :as not-implemented]
[status-im.config :as config] [status-im.config :as config]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -35,13 +34,12 @@
:image :icon :image :icon
:blur? true :blur? true
:action :arrow} :action :arrow}
{:title (i18n/label :t/wallet) {:title (i18n/label :t/wallet)
:on-press #(rf/dispatch [:open-modal :screen/settings.wallet]) :on-press #(rf/dispatch [:open-modal :screen/settings.wallet])
:image-props :i/wallet :image-props :i/wallet
:image :icon :image :icon
:blur? true :blur? true
:action :arrow :action :arrow}
:feature-flag ::ff/settings.wallet-settings}
(when config/show-not-implemented-features? (when config/show-not-implemented-features?
{:title (i18n/label :t/dapps) {:title (i18n/label :t/dapps)
:on-press not-implemented/alert :on-press not-implemented/alert
@@ -9,24 +9,18 @@
[status-im.contexts.profile.settings.list-items :as settings.items] [status-im.contexts.profile.settings.list-items :as settings.items]
[status-im.contexts.profile.settings.style :as style] [status-im.contexts.profile.settings.style :as style]
[status-im.contexts.profile.utils :as profile.utils] [status-im.contexts.profile.utils :as profile.utils]
[status-im.feature-flags :as ff]
[utils.debounce :as debounce] [utils.debounce :as debounce]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(defn show-settings-item? (defn- settings-item-view
[{:keys [feature-flag]}]
(or (ff/enabled? feature-flag)
(nil? feature-flag)))
(defn- settings-category-view
[data] [data]
(rn/delay-render [rf/delay-render
[quo/category [quo/category
{:list-type :settings {:list-type :settings
:container-style {:padding-bottom 12} :container-style {:padding-bottom 12}
:blur? true :blur? true
:data (filter show-settings-item? data)}])) :data data}]])
(defn scroll-handler (defn scroll-handler
[event scroll-y] [event scroll-y]
@@ -35,9 +29,9 @@
(defn- footer (defn- footer
[{:keys [bottom]} logout-press] [{:keys [bottom]} logout-press]
(rn/delay-render [rf/delay-render
[rn/view {:style (style/footer-container bottom)} [rn/view {:style (style/footer-container bottom)}
[quo/logout-button {:on-press logout-press}]])) [quo/logout-button {:on-press logout-press}]]])
(defn- get-item-layout (defn- get-item-layout
[_ index] [_ index]
@@ -58,7 +52,8 @@
on-scroll (rn/use-callback #(scroll-handler % scroll-y))] on-scroll (rn/use-callback #(scroll-handler % scroll-y))]
[quo/overlay {:type :shell} [quo/overlay {:type :shell}
[rn/view [rn/view
{:style (style/navigation-wrapper {:customization-color customization-color {:key :header
:style (style/navigation-wrapper {:customization-color customization-color
:inset (:top insets) :inset (:top insets)
:theme theme})} :theme theme})}
[quo/page-nav [quo/page-nav
@@ -77,10 +72,11 @@
{:options {:message (:universal-profile-url {:options {:message (:universal-profile-url
profile)}}])}]}]] profile)}}])}]}]]
[rn/flat-list [rn/flat-list
{:header [settings.header/view {:scroll-y scroll-y}] {:key :list
:header [settings.header/view {:scroll-y scroll-y}]
:data (settings.items/items (boolean (:mnemonic profile))) :data (settings.items/items (boolean (:mnemonic profile)))
:shows-vertical-scroll-indicator false :shows-vertical-scroll-indicator false
:render-fn settings-category-view :render-fn settings-item-view
:get-item-layout get-item-layout :get-item-layout get-item-layout
:footer [footer insets logout-press] :footer [footer insets logout-press]
:scroll-event-throttle 16 :scroll-event-throttle 16
@@ -88,7 +84,8 @@
:bounces false :bounces false
:over-scroll-mode :never}] :over-scroll-mode :never}]
[quo/floating-shell-button [quo/floating-shell-button
{:jump-to {:key :shell
:jump-to
{:on-press #(rf/dispatch [:shell/navigate-to-jump-to]) {:on-press #(rf/dispatch [:shell/navigate-to-jump-to])
:customization-color customization-color :customization-color customization-color
:label (i18n/label :t/jump-to)}} :label (i18n/label :t/jump-to)}}
@@ -1,6 +0,0 @@
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.actions.view
(:require [quo.core :as quo]))
(defn view
[props]
[quo/drawer-top props])
@@ -1,18 +0,0 @@
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.style)
(def title-container
{:padding-horizontal 20
:margin-vertical 12})
(defn page-wrapper
[top-inset]
{:padding-top top-inset
:flex 1})
(defn list-container
[bottom-inset]
{:padding-bottom bottom-inset})
(def keypair-container-style
{:margin-horizontal 20
:margin-vertical 8})
@@ -1,89 +0,0 @@
(ns status-im.contexts.settings.wallet.keypairs-and-accounts.view
(:require [quo.core :as quo]
[quo.theme]
[react-native.core :as rn]
[react-native.safe-area :as safe-area]
[status-im.contexts.settings.wallet.keypairs-and-accounts.actions.view :as actions]
[status-im.contexts.settings.wallet.keypairs-and-accounts.style :as style]
[utils.address :as utils]
[utils.i18n :as i18n]
[utils.re-frame :as rf]))
(defn navigate-back
[]
(rf/dispatch [:navigate-back]))
(defn on-options-press
[{:keys [theme]
:as props}]
(rf/dispatch [:show-bottom-sheet
{:content (fn [] [actions/view props])
:theme theme}]))
(defn- keypair
[{keypair-type :type
:keys [accounts name]}
_ _
{:keys [profile-picture compressed-key customization-color]}]
(let [theme (quo.theme/use-theme)
default-keypair? (= keypair-type :profile)
shortened-key (when default-keypair?
(utils/get-shortened-compressed-key compressed-key))
on-press (rn/use-callback
(fn []
(on-options-press
(cond-> {:theme theme
:blur? true
:title name}
default-keypair?
(assoc :type :default-keypair
:description shortened-key
:customization-color customization-color
:profile-picture profile-picture)
(not default-keypair?)
(assoc :type :keypair
:icon-avatar :i/seed))))
[customization-color default-keypair? name
profile-picture shortened-key theme])]
[quo/keypair
{:blur? false
:status-indicator false
:stored :on-device
:action :options
:accounts accounts
:customization-color customization-color
:container-style style/keypair-container-style
:profile-picture (when default-keypair? profile-picture)
:type (if default-keypair? :default-keypair :other)
:on-options-press on-press
:details {:full-name name
:address shortened-key}}]))
(defn view
[]
(let [insets (safe-area/get-insets)
compressed-key (rf/sub [:profile/compressed-key])
profile-picture (rf/sub [:profile/image])
customization-color (rf/sub [:profile/customization-color])
quo-keypairs-accounts (rf/sub [:wallet/settings-keypairs-accounts])]
[quo/overlay
{:type :shell
:container-style (style/page-wrapper (:top insets))}
[quo/page-nav
{:key :header
:background :blur
:icon-name :i/arrow-left
:on-press navigate-back}]
[rn/view {:style style/title-container}
[quo/standard-title
{:title (i18n/label :t/keypairs-and-accounts)
:accessibility-label :keypairs-and-accounts-header
:customization-color customization-color}]]
[rn/view {:style {:flex 1}}
[rn/flat-list
{:data quo-keypairs-accounts
:render-fn keypair
:render-data {:profile-picture profile-picture
:compressed-key compressed-key
:customization-color customization-color}
:content-container-style (style/list-container (:bottom insets))}]]]))
@@ -1,8 +1,8 @@
(ns status-im.contexts.settings.wallet.wallet-options.view (ns status-im.contexts.settings.wallet.wallet-options.view
(:require [quo.core :as quo] (:require [quo.core :as quo]
[react-native.core :as rn]
[react-native.safe-area :as safe-area] [react-native.safe-area :as safe-area]
[status-im.contexts.settings.wallet.wallet-options.style :as style] [status-im.contexts.settings.wallet.wallet-options.style :as style]
[status-im.feature-flags :as ff]
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
@@ -10,18 +10,9 @@
[] []
(rf/dispatch [:open-modal :screen/settings.saved-addresses])) (rf/dispatch [:open-modal :screen/settings.saved-addresses]))
(defn open-keypairs-and-accounts-settings-modal
[]
(rf/dispatch [:open-modal :screen/settings.keypairs-and-accounts]))
(defn gen-basic-settings-options (defn gen-basic-settings-options
[] []
[(when (ff/enabled? ::ff/settings.keypairs-and-accounts) [{:title (i18n/label :t/saved-addresses)
{:title (i18n/label :t/keypairs-and-accounts)
:blur? true
:on-press open-keypairs-and-accounts-settings-modal
:action :arrow})
{:title (i18n/label :t/saved-addresses)
:blur? true :blur? true
:on-press open-saved-addresses-settings-modal :on-press open-saved-addresses-settings-modal
:action :arrow}]) :action :arrow}])
@@ -35,13 +26,11 @@
:blur? true :blur? true
:list-type :settings}]) :list-type :settings}])
(defn navigate-back
[]
(rf/dispatch [:navigate-back]))
(defn view (defn view
[] []
(let [inset-top (safe-area/get-top)] (let [inset-top (safe-area/get-top)
navigate-back (rn/use-callback
#(rf/dispatch [:navigate-back]))]
[quo/overlay [quo/overlay
{:type :shell {:type :shell
:container-style (style/page-wrapper inset-top)} :container-style (style/page-wrapper inset-top)}
@@ -28,16 +28,15 @@
collection-name]]]) collection-name]]])
(defn cta-buttons (defn cta-buttons
[{:keys [chain-id token-id contract-address watch-only?]}] [chain-id token-id contract-address]
(let [theme (quo.theme/use-theme)] (let [theme (quo.theme/use-theme)]
[rn/view {:style style/buttons-container} [rn/view {:style style/buttons-container}
(when-not watch-only? [quo/button
[quo/button {:container-style style/send-button
{:container-style style/send-button :type :outline
:type :outline :size 40
:size 40 :icon-left :i/send}
:icon-left :i/send} (i18n/label :t/send)]
(i18n/label :t/send)])
[quo/button [quo/button
{:container-style style/opensea-button {:container-style style/opensea-button
:type :outline :type :outline
@@ -67,7 +66,7 @@
(let [theme (quo.theme/use-theme) (let [theme (quo.theme/use-theme)
collectible (rf/sub [:wallet/last-collectible-details]) collectible (rf/sub [:wallet/last-collectible-details])
animation-shared-element-id (rf/sub [:animation-shared-element-id]) animation-shared-element-id (rf/sub [:animation-shared-element-id])
collectible-owner (rf/sub [:wallet/last-collectible-details-owner]) wallet-address (rf/sub [:wallet/current-viewing-account-address])
{:keys [id {:keys [id
preview-url preview-url
collection-data collection-data
@@ -91,7 +90,7 @@
:header collectible-name :header collectible-name
:description collection-name} :description collection-name}
total-owned (utils/total-owned-collectible (:ownership collectible) total-owned (utils/total-owned-collectible (:ownership collectible)
(:address collectible-owner))] wallet-address)]
(rn/use-unmount #(rf/dispatch [:wallet/clear-last-collectible-details])) (rn/use-unmount #(rf/dispatch [:wallet/clear-last-collectible-details]))
[scroll-page/scroll-page [scroll-page/scroll-page
{:navigate-back? true {:navigate-back? true
@@ -129,11 +128,7 @@
{:name collectible-name {:name collectible-name
:image preview-uri}])}])}])))}] :image preview-uri}])}])}])))}]
[header collectible-name collection-name collection-image] [header collectible-name collection-name collection-image]
[cta-buttons [cta-buttons chain-id token-id contract-address]
{:chain-id chain-id
:token-id token-id
:contract-address contract-address
:watch-only? (:watch-only? collectible-owner)}]
[quo/tabs [quo/tabs
{:size 32 {:size 32
:style style/tabs :style style/tabs
@@ -1,6 +1,5 @@
(ns status-im.contexts.wallet.home.style (ns status-im.contexts.wallet.home.style
(:require (:require
[quo.foundations.colors :as colors]
[react-native.safe-area :as safe-area])) [react-native.safe-area :as safe-area]))
(def tabs (def tabs
@@ -23,7 +22,3 @@
[] []
{:margin-top (+ (safe-area/get-top) 8) {:margin-top (+ (safe-area/get-top) 8)
:flex 1}) :flex 1})
(defn header-container
[theme]
{:background-color (colors/theme-colors colors/white colors/neutral-95 theme)})
+29 -54
View File
@@ -1,11 +1,8 @@
(ns status-im.contexts.wallet.home.view (ns status-im.contexts.wallet.home.view
(:require (:require
[quo.core :as quo] [quo.core :as quo]
[quo.foundations.colors :as colors]
[quo.theme]
[react-native.core :as rn] [react-native.core :as rn]
[status-im.common.home.top-nav.view :as common.top-nav] [status-im.common.home.top-nav.view :as common.top-nav]
[status-im.common.refreshable-flat-list.view :as refreshable-flat-list]
[status-im.contexts.wallet.home.style :as style] [status-im.contexts.wallet.home.style :as style]
[status-im.contexts.wallet.home.tabs.view :as tabs] [status-im.contexts.wallet.home.tabs.view :as tabs]
[status-im.contexts.wallet.sheets.network-filter.view :as network-filter] [status-im.contexts.wallet.sheets.network-filter.view :as network-filter]
@@ -40,27 +37,6 @@
(when (ff/enabled? ::ff/wallet.home-activity) (when (ff/enabled? ::ff/wallet.home-activity)
{:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab})]) {:id :activity :label (i18n/label :t/activity) :accessibility-label :activity-tab})])
(defn- render-cards
[cards ref]
[rn/flat-list
{:ref #(reset! ref %)
:style style/accounts-list
:content-container-style style/accounts-list-container
:data cards
:horizontal true
:separator [rn/view {:style style/separator}]
:render-fn (fn [item] [quo/account-card item])
:shows-horizontal-scroll-indicator false}])
(defn- render-tabs
[data on-change default-active]
[quo/tabs
{:style style/tabs
:size 32
:default-active default-active
:data data
:on-change #(on-change %)}])
(defn view (defn view
[] []
(let [[selected-tab set-selected-tab] (rn/use-state (:id (first tabs-data))) (let [[selected-tab set-selected-tab] (rn/use-state (:id (first tabs-data)))
@@ -69,9 +45,7 @@
networks (rf/sub [:wallet/selected-network-details]) networks (rf/sub [:wallet/selected-network-details])
account-cards-data (rf/sub [:wallet/account-cards-data]) account-cards-data (rf/sub [:wallet/account-cards-data])
cards (conj account-cards-data (new-account-card-data)) cards (conj account-cards-data (new-account-card-data))
[init-loaded? set-init-loaded] (rn/use-state false) {:keys [formatted-balance]} (rf/sub [:wallet/aggregated-token-values-and-balance])]
{:keys [formatted-balance]} (rf/sub [:wallet/aggregated-token-values-and-balance])
theme (quo.theme/use-theme)]
(rn/use-effect (fn [] (rn/use-effect (fn []
(when (and @account-list-ref (pos? (count cards))) (when (and @account-list-ref (pos? (count cards)))
(.scrollToOffset ^js @account-list-ref (.scrollToOffset ^js @account-list-ref
@@ -79,32 +53,33 @@
{:animated true {:animated true
:offset 0}))) :offset 0})))
[(count cards)]) [(count cards)])
(rn/use-effect
#(when (and (boolean? tokens-loading?) (not tokens-loading?) (not init-loaded?))
(set-init-loaded true))
[tokens-loading?])
[rn/view {:style (style/home-container)} [rn/view {:style (style/home-container)}
[common.top-nav/view] [common.top-nav/view]
[refreshable-flat-list/view [rn/view
{:refresh-control [rn/refresh-control [quo/wallet-overview
{:refreshing (and tokens-loading? init-loaded?) {:state (if tokens-loading? :loading :default)
:colors [colors/neutral-40] :time-frame :none
:tint-color colors/neutral-40 :metrics :none
:on-refresh #(rf/dispatch [:wallet/get-accounts])}] :balance formatted-balance
:header [rn/view {:style (style/header-container theme)} :networks networks
[quo/wallet-overview :dropdown-on-press #(rf/dispatch [:show-bottom-sheet {:content network-filter/view}])}]]
{:state (if tokens-loading? :loading :default) (when (ff/enabled? ::ff/wallet.graph) [quo/wallet-graph {:time-frame :empty}])
:time-frame :none [rn/flat-list
:metrics :none {:ref #(reset! account-list-ref %)
:balance formatted-balance :style style/accounts-list
:networks networks :content-container-style style/accounts-list-container
:dropdown-on-press #(rf/dispatch [:show-bottom-sheet :data cards
{:content network-filter/view}])}] :horizontal true
(when (ff/enabled? ::ff/wallet.graph) :separator [rn/view {:style style/separator}]
[quo/wallet-graph {:time-frame :empty}]) :render-fn (fn [item] [quo/account-card item])
[render-cards cards account-list-ref] :shows-horizontal-scroll-indicator false}]
[render-tabs tabs-data set-selected-tab selected-tab]] [quo/tabs
:sticky-header-indices [0] {:style style/tabs
:data [] :size 32
:render-fn #() :default-active selected-tab
:footer [tabs/view {:selected-tab selected-tab}]}]])) :data tabs-data
:on-change (fn [tab]
(when (= :activity tab)
(rf/dispatch [:wallet/fetch-activities]))
(set-selected-tab tab))}]
[tabs/view {:selected-tab selected-tab}]]))
+1 -4
View File
@@ -21,10 +21,10 @@
[status-im.contexts.profile.push-notifications.events :as notifications] [status-im.contexts.profile.push-notifications.events :as notifications]
[status-im.contexts.shell.jump-to.state :as shell.state] [status-im.contexts.shell.jump-to.state :as shell.state]
[status-im.contexts.shell.jump-to.utils :as shell.utils] [status-im.contexts.shell.jump-to.utils :as shell.utils]
[status-im.feature-flags :as ff]
[status-im.navigation.core :as navigation] [status-im.navigation.core :as navigation]
status-im.contexts.wallet.signals status-im.contexts.wallet.signals
status-im.events status-im.events
status-im.navigation.core
[status-im.setup.dev :as dev] [status-im.setup.dev :as dev]
[status-im.setup.global-error :as global-error] [status-im.setup.global-error :as global-error]
[status-im.setup.interceptors :as interceptors] [status-im.setup.interceptors :as interceptors]
@@ -63,9 +63,6 @@
(async-storage/get-item :selected-stack-id #(shell.utils/change-selected-stack-id % nil nil)) (async-storage/get-item :selected-stack-id #(shell.utils/change-selected-stack-id % nil nil))
(async-storage/get-item :screen-height #(reset! shell.state/screen-height %)) (async-storage/get-item :screen-height #(reset! shell.state/screen-height %))
(when config/quo-preview-enabled?
(ff/load-flags))
(dev/setup) (dev/setup)
(log/info "hermesEnabled ->" (is-hermes)) (log/info "hermesEnabled ->" (is-hermes))
+14 -41
View File
@@ -1,7 +1,6 @@
(ns status-im.feature-flags (ns status-im.feature-flags
(:require (:require
[clojure.string :as string] [clojure.string :as string]
[react-native.async-storage :as async-storage]
[react-native.config :as config] [react-native.config :as config]
[reagent.core :as reagent])) [reagent.core :as reagent]))
@@ -9,25 +8,20 @@
[k] [k]
(= "1" (config/get-config k))) (= "1" (config/get-config k)))
(def ^:private initial-flags
{::community.edit-account-selection (enabled-in-env? :FLAG_EDIT_ACCOUNT_SELECTION_ENABLED)
::settings.wallet-settings (enabled-in-env? :FLAG_WALLET_SETTINGS_ENABLED)
::settings.keypairs-and-accounts (enabled-in-env?
:FLAG_WALLET_SETTINGS_KEYPAIRS_AND_ACCOUNTS_ENABLED)
::wallet.activities (enabled-in-env? :FLAG_WALLET_ACTIVITY_ENABLED)
::wallet.assets-modal-hide (enabled-in-env? :FLAG_ASSETS_MODAL_HIDE)
::wallet.assets-modal-manage-tokens (enabled-in-env? :FLAG_ASSETS_MODAL_MANAGE_TOKENS)
::wallet.bridge-token (enabled-in-env? :FLAG_BRIDGE_TOKEN_ENABLED)
::wallet.contacts (enabled-in-env? :FLAG_CONTACTS_ENABLED)
::wallet.edit-derivation-path (enabled-in-env? :FLAG_EDIT_DERIVATION_PATH)
::wallet.graph (enabled-in-env? :FLAG_GRAPH_ENABLED)
::wallet.import-private-key (enabled-in-env? :FLAG_IMPORT_PRIVATE_KEY_ENABLED)
::wallet.long-press-watch-only-asset (enabled-in-env? :FLAG_LONG_PRESS_WATCH_ONLY_ASSET_ENABLED)
::wallet.swap (enabled-in-env? :FLAG_SWAP_ENABLED)
::wallet.wallet-connect (enabled-in-env? :FLAG_WALLET_CONNECT_ENABLED)})
(defonce ^:private feature-flags-config (defonce ^:private feature-flags-config
(reagent/atom initial-flags)) (reagent/atom
{::community.edit-account-selection (enabled-in-env? :FLAG_EDIT_ACCOUNT_SELECTION_ENABLED)
::wallet.activities (enabled-in-env? :FLAG_WALLET_ACTIVITY_ENABLED)
::wallet.assets-modal-hide (enabled-in-env? :FLAG_ASSETS_MODAL_HIDE)
::wallet.assets-modal-manage-tokens (enabled-in-env? :FLAG_ASSETS_MODAL_MANAGE_TOKENS)
::wallet.bridge-token (enabled-in-env? :FLAG_BRIDGE_TOKEN_ENABLED)
::wallet.contacts (enabled-in-env? :FLAG_CONTACTS_ENABLED)
::wallet.edit-derivation-path (enabled-in-env? :FLAG_EDIT_DERIVATION_PATH)
::wallet.graph (enabled-in-env? :FLAG_GRAPH_ENABLED)
::wallet.import-private-key (enabled-in-env? :FLAG_IMPORT_PRIVATE_KEY_ENABLED)
::wallet.long-press-watch-only-asset (enabled-in-env? :FLAG_LONG_PRESS_WATCH_ONLY_ASSET_ENABLED)
::wallet.swap (enabled-in-env? :FLAG_SWAP_ENABLED)
::wallet.wallet-connect (enabled-in-env? :FLAG_WALLET_CONNECT_ENABLED)}))
(defn feature-flags [] @feature-flags-config) (defn feature-flags [] @feature-flags-config)
@@ -43,28 +37,7 @@
(defn toggle (defn toggle
[flag] [flag]
(let [new-flags (update @feature-flags-config flag not)] (swap! feature-flags-config update flag not))
(async-storage/set-item!
:feature-flags
new-flags
(fn []
(reset! feature-flags-config new-flags)))))
(defn load-flags
[]
(async-storage/get-item
:feature-flags
(fn [flags]
(when flags
(reset! feature-flags-config flags)))))
(defn reset-flags
[]
(async-storage/set-item!
:feature-flags
initial-flags
(fn []
(reset! feature-flags-config initial-flags))))
(defn alert (defn alert
[flag action] [flag action]
-7
View File
@@ -57,7 +57,6 @@
[status-im.contexts.profile.settings.screens.password.change-password.view :as change-password] [status-im.contexts.profile.settings.screens.password.change-password.view :as change-password]
[status-im.contexts.profile.settings.screens.password.view :as settings-password] [status-im.contexts.profile.settings.screens.password.view :as settings-password]
[status-im.contexts.profile.settings.view :as settings] [status-im.contexts.profile.settings.view :as settings]
[status-im.contexts.settings.wallet.keypairs-and-accounts.view :as keypairs-and-accounts]
[status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings] [status-im.contexts.settings.wallet.saved-addresses.view :as saved-addresses-settings]
[status-im.contexts.settings.wallet.wallet-options.view :as wallet-options] [status-im.contexts.settings.wallet.wallet-options.view :as wallet-options]
[status-im.contexts.shell.activity-center.view :as activity-center] [status-im.contexts.shell.activity-center.view :as activity-center]
@@ -502,12 +501,6 @@
:options options/transparent-modal-screen-options :options options/transparent-modal-screen-options
:component saved-addresses-settings/view} :component saved-addresses-settings/view}
{:name :screen/settings.keypairs-and-accounts
:options (merge
options/transparent-modal-screen-options
options/dark-screen)
:component keypairs-and-accounts/view}
{:name :screen/settings-messages {:name :screen/settings-messages
:options options/transparent-modal-screen-options :options options/transparent-modal-screen-options
:component settings.messages/view} :component settings.messages/view}
+14 -7
View File
@@ -90,12 +90,19 @@
manually call `setup!`, otherwise you won't see any changes. It is safe and manually call `setup!`, otherwise you won't see any changes. It is safe and
even expected you will call `setup!` multiple times in REPLs." even expected you will call `setup!` multiple times in REPLs."
[] []
(schema.registry/init-global-registry) (try
(register-schemas) (schema.registry/init-global-registry)
(register-schemas)
;; In theory not necessary, but sometimes in a REPL session the dev needs to ;; In theory not necessary, but sometimes in a REPL session the dev needs to
;; call unstrument! manually. ;; call unstrument! manually.
(malli.instrument/unstrument!) (malli.instrument/unstrument!)
(malli.dev/start! {:report (schema/reporter)}) (malli.dev/start! {:report (schema/reporter)})
(log/debug "Schemas initialized.")) (log/debug "Schemas initialized.")
;; It is relatively easy to write invalid schemas, but we don't want to
;; block the app from initializing if such errors happen, at least not until
;; Malli matures in the project.
(catch js/Error e
(log/error "Failed to initialize schemas" {:error e}))))
-16
View File
@@ -427,19 +427,3 @@
(fn [[permissions] _] (fn [[permissions] _]
(let [all-tokens (apply concat (map :tokens permissions))] (let [all-tokens (apply concat (map :tokens permissions))]
(boolean (some seq all-tokens))))) (boolean (some seq all-tokens)))))
(re-frame/reg-sub
:communities/token-gated-not-a-member?
(fn [[_ community-id]]
[(re-frame/subscribe [:communities/community community-id])])
(fn [{:keys [token-permissions joined] :as community}]
(let [token-permission-to-become-member-or-admin (->> token-permissions
(into {})
vals
(some (fn [{community-permission-type :type}]
(boolean
(constants/community-role-permissions
community-permission-type)))))]
(or joined
(and (not joined) (empty? token-permissions) (seq community))
(not token-permission-to-become-member-or-admin)))))
+1 -6
View File
@@ -279,12 +279,7 @@
:<- [:initials-avatar-font-file] :<- [:initials-avatar-font-file]
:<- [:theme] :<- [:theme]
(fn [[profile ens-names port font-file theme] [_ avatar-opts]] (fn [[profile ens-names port font-file theme] [_ avatar-opts]]
;; Right after logout, this subscription is recomputed, but the sub (replace-multiaccount-image-uri profile ens-names port font-file avatar-opts theme)))
;; `:profile/profile` output will always be nil. We skip any further
;; processing because it's wasteful and because it will trigger a schema
;; error.
(when profile
(replace-multiaccount-image-uri profile ens-names port font-file avatar-opts theme))))
(re-frame/reg-sub (re-frame/reg-sub
:profile/image :profile/image
-29
View File
@@ -1,7 +1,6 @@
(ns status-im.subs.wallet.wallet (ns status-im.subs.wallet.wallet
(:require [clojure.string :as string] (:require [clojure.string :as string]
[re-frame.core :as rf] [re-frame.core :as rf]
[status-im.constants :as constants]
[status-im.contexts.wallet.common.utils :as utils] [status-im.contexts.wallet.common.utils :as utils]
[status-im.contexts.wallet.common.utils.networks :as network-utils] [status-im.contexts.wallet.common.utils.networks :as network-utils]
[status-im.subs.wallet.add-account.address-to-watch] [status-im.subs.wallet.add-account.address-to-watch]
@@ -159,34 +158,6 @@
:goerli-enabled? goerli-enabled?}) :goerli-enabled? goerli-enabled?})
selected-networks)))) selected-networks))))
(defn- format-settings-keypair-accounts
[accounts
{:keys [networks size]
:or {networks []
size 32}}]
(->> accounts
(keep (fn [{:keys [path customization-color emoji name address]}]
(when-not (string/starts-with? path constants/path-eip1581)
{:account-props {:customization-color customization-color
:size size
:emoji emoji
:type :default
:name name
:address address}
:networks networks
:state :default
:action :none})))))
(rf/reg-sub
:wallet/settings-keypairs-accounts
:<- [:wallet/keypairs]
(fn [keypairs [_ format-options]]
(->> keypairs
(map (fn [{:keys [accounts name type]}]
{:type (keyword type)
:name name
:accounts (format-settings-keypair-accounts accounts format-options)})))))
(rf/reg-sub (rf/reg-sub
:wallet/derivation-path-state :wallet/derivation-path-state
:<- [:wallet/create-account] :<- [:wallet/create-account]
-103
View File
@@ -554,109 +554,6 @@
(= keypairs (= keypairs
(rf/sub [sub-name]))))) (rf/sub [sub-name])))))
(def chat-account
{:path "m/43'/60'/1581'/0'/0"
:emoji ""
:key-uid "abc"
:address "address-1"
:color-id ""
:wallet false
:name "My Profile"
:type "generated"
:chat true
:customization-color :blue
:hidden false
:removed false})
(def wallet-account
{:path "m/44'/60'/0'/0/0"
:emoji "🤡"
:key-uid "abc"
:address "address-2"
:wallet true
:name "My Account"
:type "generated"
:chat false
:customization-color :primary
:hidden false
:removed false})
(def keypairs-accounts
{:key-uid "abc"
:name "My Profile"
:type "profile"
:accounts []})
(h/deftest-sub :wallet/settings-keypairs-accounts
[sub-name]
(testing "returns formatted key-pairs and accounts"
(swap! rf-db/app-db
assoc-in
[:wallet :keypairs]
[(assoc keypairs-accounts
:accounts
[wallet-account])])
(let [{:keys [customization-color name address emoji]} wallet-account]
(is
(match? [{:name (:name keypairs-accounts)
:type (keyword (:type keypairs-accounts))
:accounts [{:account-props {:customization-color customization-color
:size 32
:emoji emoji
:type :default
:name name
:address address}
:networks []
:state :default
:action :none}]}]
(rf/sub [sub-name])))))
(testing "allows for passing account format options"
(swap! rf-db/app-db
assoc-in
[:wallet :keypairs]
[(assoc keypairs-accounts
:accounts
[wallet-account])])
(let [{:keys [customization-color
name
address
emoji]} wallet-account
network-options [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}
{:network-name :arbitrum :short-name "arb1"}]
size-option 20]
(is
(match? [{:name (:name keypairs-accounts)
:type (keyword (:type keypairs-accounts))
:accounts [{:account-props {:customization-color customization-color
:size size-option
:emoji emoji
:type :default
:name name
:address address}
:networks network-options
:state :default
:action :none}]}]
(rf/sub [sub-name
{:networks network-options
:size size-option}])))))
(testing "filters non-wallet accounts"
(swap! rf-db/app-db
assoc-in
[:wallet :keypairs]
[(assoc keypairs-accounts
:accounts
[chat-account])])
(is
(match? [{:name (:name keypairs-accounts)
:type (keyword (:type keypairs-accounts))
:accounts []}]
(rf/sub [sub-name])))))
(def local-suggestions ["a" "b"]) (def local-suggestions ["a" "b"])
(h/deftest-sub :wallet/local-suggestions (h/deftest-sub :wallet/local-suggestions
+9
View File
@@ -4,6 +4,7 @@
[re-frame.core :as re-frame] [re-frame.core :as re-frame]
[re-frame.interceptor :as interceptor] [re-frame.interceptor :as interceptor]
[re-frame.interop :as rf.interop] [re-frame.interop :as rf.interop]
[reagent.core :as reagent]
[taoensso.timbre :as log] [taoensso.timbre :as log]
[utils.datetime :as datetime]) [utils.datetime :as datetime])
(:refer-clojure :exclude [merge reduce])) (:refer-clojure :exclude [merge reduce]))
@@ -79,6 +80,14 @@
(swap! handler-nesting-level dec) (swap! handler-nesting-level dec)
res)) res))
(defn delay-render
[_]
(let [render? (reagent/atom false)]
(js/setTimeout #(reset! render? true) 0)
(fn [content]
(when @render?
content))))
(def sub (comp deref re-frame/subscribe)) (def sub (comp deref re-frame/subscribe))
(def dispatch re-frame/dispatch) (def dispatch re-frame/dispatch)
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>", "_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im", "owner": "status-im",
"repo": "status-go", "repo": "status-go",
"version": "v0.179.13", "version": "v0.179.15",
"commit-sha1": "f3f48654f54aebbb4949129f930fef648d8da8f9", "commit-sha1": "7ba78cd6e97ba1180e2cbab9ad8fc1e666b92a73",
"src-sha256": "09gcr6fgx6v4qdp83w0n2ynnlvwjqid477jgpqjk57l5wfrv2raq" "src-sha256": "0gafxkha9mcdnl91w1f786ax0z3yqgl55qblw9xazhm7lpm44vgj"
} }
+1 -1
View File
@@ -1,7 +1,7 @@
const WebSocket = require('ws'); const WebSocket = require('ws');
const { NativeModules } = require('react-native'); const { NativeModules } = require('react-native');
mockAsyncStorage = require('@react-native-async-storage/async-storage/jest/async-storage-mock'); require('@react-native-async-storage/async-storage/jest/async-storage-mock');
require('react-native-gesture-handler/jestSetup'); require('react-native-gesture-handler/jestSetup');
require('react-native-reanimated/src/reanimated2/jestUtils').setUpTests(); require('react-native-reanimated/src/reanimated2/jestUtils').setUpTests();
-1
View File
@@ -2484,7 +2484,6 @@
"address-no-activity": "This address has no activity", "address-no-activity": "This address has no activity",
"scanning": "Scanning for activity...", "scanning": "Scanning for activity...",
"keypairs": "Key pairs", "keypairs": "Key pairs",
"keypairs-and-accounts": "Key pairs and accounts",
"keypairs-accounts-and-addresses": "Key pairs, accounts and addresses", "keypairs-accounts-and-addresses": "Key pairs, accounts and addresses",
"keypairs-description": "Select key pair to derive your new account from", "keypairs-description": "Select key pair to derive your new account from",
"confirm-account-origin": "Confirm account origin", "confirm-account-origin": "Confirm account origin",