Compare commits

..
2 Commits
Author SHA1 Message Date
Ibrahem Khalil 4d9f3a4ef5 Merge branch 'develop' into 14781 2023-01-14 15:38:50 +02:00
ibrkhalil 5c49db3a5a Flat list won't scroll inside photo selector 2023-01-14 15:37:18 +02:00
420 changed files with 7292 additions and 1961 deletions
+38 -38
View File
@@ -1,7 +1,7 @@
status-im.utils.build/warning-handler
status-im.utils.build/get-current-sha
status-im2.constants/spacing-char
status-im2.constants/arg-wrapping-char
status-im.chat.constants/spacing-char
status-im.chat.constants/arg-wrapping-char
status-im.ios.core/init
status-im.ui.components.camera/aspects
status-im.ui.components.camera/capture-targets
@@ -46,8 +46,8 @@ status-im.utils.handlers/logged-in
status-im.multiaccounts.model/credentials
status-im.multiaccounts.login.core/contract-fleet?
status-im.multiaccounts.login.core/fetch-nodes
status-im2.config/rpc-networks-only?
status-im2.config/waku-enabled?
status-im.utils.config/rpc-networks-only?
status-im.utils.config/waku-enabled?
status-im.utils.pairing/has-paired-installations?
status-im.tribute-to-talk.core-test/user-cofx
quo.gesture-handler/tap-gesture-handler
@@ -154,40 +154,40 @@ status-im.ethereum.ens/name-hash
status-im.ethereum.ens/ABI-hash
status-im.ethereum.ens/pubkey-hash
status-im.network.core/get-network
status-im2.constants/desktop-content-types
status-im2.constants/blocks-per-hour
status-im2.constants/one-earth-day
status-im2.constants/left-pane-min-width
status-im2.constants/system
status-im2.constants/contact-discovery
status-im2.constants/send-transaction-failed-parse-response
status-im2.constants/send-transaction-failed-parse-params
status-im2.constants/send-transaction-no-account-selected
status-im2.constants/send-transaction-invalid-tx-sender
status-im2.constants/web3-get-logs
status-im2.constants/web3-transaction-receipt
status-im2.constants/web3-new-filter
status-im2.constants/web3-new-pending-transaction-filter
status-im2.constants/web3-new-block-filter
status-im2.constants/web3-uninstall-filter
status-im2.constants/web3-get-filter-changes
status-im2.constants/web3-shh-post
status-im2.constants/web3-shh-new-identity
status-im2.constants/web3-shh-has-identity
status-im2.constants/web3-shh-new-group
status-im2.constants/web3-shh-add-to-group
status-im2.constants/web3-shh-new-filter
status-im2.constants/web3-shh-uninstall-filter
status-im2.constants/web3-shh-get-filter-changes
status-im2.constants/web3-shh-get-messages
status-im2.constants/status-create-address
status-im2.constants/event-transfer-hash
status-im2.constants/regx-rtl-characters
status-im2.constants/desktop-msg-chars-hard-limit
status-im2.constants/debug-metrics
status-im2.constants/scan-qr-code
status-im2.constants/ipfs-proto-code
status-im2.constants/swarm-proto-code
status-im.constants/desktop-content-types
status-im.constants/blocks-per-hour
status-im.constants/one-earth-day
status-im.constants/left-pane-min-width
status-im.constants/system
status-im.constants/contact-discovery
status-im.constants/send-transaction-failed-parse-response
status-im.constants/send-transaction-failed-parse-params
status-im.constants/send-transaction-no-account-selected
status-im.constants/send-transaction-invalid-tx-sender
status-im.constants/web3-get-logs
status-im.constants/web3-transaction-receipt
status-im.constants/web3-new-filter
status-im.constants/web3-new-pending-transaction-filter
status-im.constants/web3-new-block-filter
status-im.constants/web3-uninstall-filter
status-im.constants/web3-get-filter-changes
status-im.constants/web3-shh-post
status-im.constants/web3-shh-new-identity
status-im.constants/web3-shh-has-identity
status-im.constants/web3-shh-new-group
status-im.constants/web3-shh-add-to-group
status-im.constants/web3-shh-new-filter
status-im.constants/web3-shh-uninstall-filter
status-im.constants/web3-shh-get-filter-changes
status-im.constants/web3-shh-get-messages
status-im.constants/status-create-address
status-im.constants/event-transfer-hash
status-im.constants/regx-rtl-characters
status-im.constants/desktop-msg-chars-hard-limit
status-im.constants/debug-metrics
status-im.constants/scan-qr-code
status-im.constants/ipfs-proto-code
status-im.constants/swarm-proto-code
status-im.multiaccounts.update.publisher/publish-update!
status-im.utils.async/task-queue
status-im.utils.async/async-periodic-run!
+1 -1
View File
@@ -58,7 +58,7 @@ pipeline {
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 4 \
--numprocesses 9 \
--rerun_count=2 \
--testrail_report=True \
-m testrail_id \
+1 -1
View File
@@ -99,7 +99,7 @@ pipeline {
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 4 \
--numprocesses 9 \
--rerun_count=2 \
--testrail_report=True \
-k \"${params.KEYWORD_EXPRESSION}\" \
+1 -1
View File
@@ -74,7 +74,7 @@ pipeline {
python3 -m pytest \
-m "upgrade" \
-k \"${params.KEYWORD_EXPRESSION}\" \
--numprocesses 4 \
--numprocesses 15 \
--rerun_count=2 \
--testrail_report=True \
--apk=${params.APK_NAME} \
+2 -2
View File
@@ -640,7 +640,7 @@ SPEC CHECKSUMS:
FBLazyVector: 352a8ca9bbc8e2f097d680747a8c97ecef12d469
FBReactNativeSpec: 7dfb84f624136a45727c813ed21d130cd3e61beb
Folly: b73c3869541e86821df3c387eb0af5f65addfab4
glog: 36ce0530c6d2c3a5a4326885ef4069564887a1db
glog: 997518ea2aa2d8cd5df9797b641b758d52ecf2bc
HMSegmentedControl: 34c1f54d822d8308e7b24f5d901ec674dfa31352
Keycard: ac6df4d91525c3c82635ac24d4ddd9a80aca5fc8
libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c
@@ -710,6 +710,6 @@ SPEC CHECKSUMS:
TouchID: ba4c656d849cceabc2e4eef722dea5e55959ecf4
Yoga: 0276e9f20976c8568e107cfc1163a8629051adc0
PODFILE CHECKSUM: ca5d07911eadc1267649ecc15379e5127a0cc839
PODFILE CHECKSUM: a1de9468266e7f0b5273acea713782ab759690f1
COCOAPODS: 1.11.3
+127 -10
View File
@@ -52,15 +52,41 @@
},
{
"path": "camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3",
"path": "borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "d8a86256bfd06736b84b6ee4c154a1b2518ab461",
"sha256": "1fxz1fdhppby21l4qkrci9kp38s508yn01z3cjspda56mj1plnid"
"sha1": "488f403591739aab5a68ce6e7f82c0e855c23fd6",
"sha256": "1cw712kzza733g55s02ql35q630zd8j8nmnpivcczjkg240jans4"
},
"jar": {
"sha1": "5ae08f83ceb8959971e6334596bff0214bf6fdf2",
"sha256": "1j627a99ccc4v0v83c8670vdnsp69cjk7ba0ga2xf433fwsz74c1"
"sha1": "371f3e232e7fdb04b7b2044825eb9822280e8f93",
"sha256": "1iyxq6jypjd875cgdyllknh27mx5fnkyjz80mr927d5i94r0ywj4"
}
},
{
"path": "borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "eb3aff6c7db85d91f7e05b98e06d1354a4fce36c",
"sha256": "1bvr7cvpbvqi7swypzpbfrig16zipwvmg4m47y2x5chs5czwxv15"
},
"jar": {
"sha1": "33dfc86102e0ea400498cbca47572459c1c43b00",
"sha256": "0a5gxmj8kzc01y9bn7l4x7c1v5q9wcbvw5hdr525d3ylsyl6xfkw"
}
},
{
"path": "borkdude/sci/0.2.1-alpha.1/sci-0.2.1-alpha.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "516cb8e3a8e430d59d9c3e7a51f9f859e3b249e0",
"sha256": "1nrww29m90q1avaahw7i5418c18crc3cidhbg3ml7h7vjjplsl9y"
},
"jar": {
"sha1": "96e39dcbc3fb3a41c6bf2e628303cf0f534b28a3",
"sha256": "1cjvz85ls982rmx90igv4mcfaa53fj5z29df9mf4jplyig3l9dxb"
}
},
@@ -90,6 +116,19 @@
}
},
{
"path": "clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "c5a47e6858344c9fd42eecafc7920a7a18d6126d",
"sha256": "1az0fs9k5xvzl8bz564apd77kqc83nl8sxsrvmswmbmkamvy4hd3"
},
"jar": {
"sha1": "b0654b98763199ee57182526465d823492d1cc3f",
"sha256": "1029wd82qyxv6ji9pd38m32nqia56h6845lqv4ym4dsz5i201g9a"
}
},
{
"path": "cljs-bean/cljs-bean/1.3.0/cljs-bean-1.3.0",
"host": "https://repo.clojars.org",
@@ -636,6 +675,19 @@
}
},
{
"path": "hashp/hashp/0.2.1/hashp-0.2.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "32530b9106a64fd5442d2aa27c6da4175d1f1440",
"sha256": "1z94k8c52r87rq3nhc0mqazcxff6d4phi8gy1bgndhiz4nq1mia7"
},
"jar": {
"sha1": "fb501db2eb4a028c1875382d58c17c381aec47b8",
"sha256": "1lwirzb60zvksvkb3arpwi4fk1xnp0x5ljmrca5vf7dq25lmwmsd"
}
},
{
"path": "hiccup/hiccup/1.0.5/hiccup-1.0.5",
"host": "https://repo.clojars.org",
@@ -766,6 +818,32 @@
}
},
{
"path": "mvxcvi/arrangement/1.2.0/arrangement-1.2.0",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "4f19bd291595870162eadd35456a0b2e76444a64",
"sha256": "1qqnl05nwcjnzhlgplcsbckrp8pqvf8n6bf8kr8rz7lz2q4px3vb"
},
"jar": {
"sha1": "036e640bb9e14c2aa95589a45a018eb8358ce3f6",
"sha256": "1m3v1rkpdmv7aym5vq2swh0mf9mg7xppdr3vrl4g6qm3s42c24b7"
}
},
{
"path": "mvxcvi/puget/1.3.1/puget-1.3.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "07104dc20a13c7e255fffee4f16de9a6873c187f",
"sha256": "1129rb3qksg7n85j03k6d3sr6868g724097vxids1r4wqj2phxkf"
},
"jar": {
"sha1": "a4f7dcf71ccd8d69d4ecd2b19f3d671dfc169308",
"sha256": "029znh7p8f1h91gri4jhzwqsa0rnn3i34yr3kav55npym2sw5sfp"
}
},
{
"path": "net/cgrand/macrovich/0.2.1/macrovich-0.2.1",
"host": "https://repo.clojars.org",
@@ -871,15 +949,15 @@
},
{
"path": "org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1",
"path": "org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2",
"host": "https://repo1.maven.org/maven2",
"pom": {
"sha1": "3231642aa1dcf628c864a5f208cd293fbd6a385a",
"sha256": "18kk5sds5lg8r2kidhz9qpgyrvggkj8j4sgfdsmyyl93w3f16lnp"
"sha1": "e9336ac820c5a7e07fe0aa431df981cbab6db3e3",
"sha256": "07q9qmxc7ggaxh27imgs34svn4j269rhslbnrs63ahrqzk5bmqlf"
},
"jar": {
"sha1": "aafb7677ec1e9f344fc834bbbdb91e8ba02af474",
"sha256": "0cqyy1vqrhilgwrdxsibd7360ch3hhwjnbbnzsak38v6i6mg66xl"
"sha1": "0404feea925608b921b56acd11d3b187a0d33fe4",
"sha256": "13hkx1285f2imqlj6wbgyxki2yg8rmfr49iq1zijxm1cgfx8xyai"
}
},
@@ -1416,6 +1494,32 @@
}
},
{
"path": "rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "05778b423e14e8f1b054cc78df4e5d048cc0fc68",
"sha256": "0wp9xvmfp37x88msm2yhhzi8sjwd4hxz0vv4bslhal3zi97c1bj6"
},
"jar": {
"sha1": "55b399417a088ca163ef835e56db76ea962ce0a9",
"sha256": "0qq3an9nrhhw5mba753zs1m9rnk86w9l1f04n8v0hz0i2kbf1cki"
}
},
{
"path": "rewrite-cljs/rewrite-cljs/0.4.5/rewrite-cljs-0.4.5",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "378cd53218027b9a93640dcf64c040665f6c9c6b",
"sha256": "1qrhrgzhqdyqizh0ngnr4zgj9xkfzq0qhsws4pxxra3qc9ikl9cq"
},
"jar": {
"sha1": "c35be115c39dadc71a4de3f584aa8ca295e11257",
"sha256": "1dnw0jhr1hhqz80w3z5d8qdbaqdvgzg4fyhv6lffa51c9ca1dsr1"
}
},
{
"path": "ring-cors/ring-cors/0.1.8/ring-cors-0.1.8",
"host": "https://repo.clojars.org",
@@ -1544,5 +1648,18 @@
"sha1": "09af0b348e6253dcf9fd567d0d22ffebdea46176",
"sha256": "1qg2iyblykfkzmplc2c46916b9m0h5ad6lxmvrk5qn3pdxqr8vw0"
}
},
{
"path": "zprint/zprint/1.1.1/zprint-1.1.1",
"host": "https://repo.clojars.org",
"pom": {
"sha1": "d7225bdc4978d3a8eac8613187cddd2efb9e39d2",
"sha256": "0yyy31h88zww238c2v4zi9va3pjp7ii76zjggglakd3wm1fdbnck"
},
"jar": {
"sha1": "3bd9bbedb188a66ccf72c1e22819e8e423a6757a",
"sha256": "1bvrarxw0dqvxlhj6gdwrv6mklzh4p79537g293fqlm07f2knfph"
}
}
]
+11 -2
View File
@@ -2,9 +2,12 @@ args4j/args4j/2.0.26/args4j-2.0.26.jar
bidi/bidi/2.1.6/bidi-2.1.6.jar
binaryage/env-config/0.2.2/env-config-0.2.2.jar
binaryage/oops/0.7.0/oops-0.7.0.jar
camel-snake-kebab/camel-snake-kebab/0.4.3/camel-snake-kebab-0.4.3.jar
borkdude/edamame/0.0.11-alpha.28/edamame-0.0.11-alpha.28.jar
borkdude/sci.impl.reflector/0.0.1/sci.impl.reflector-0.0.1.jar
borkdude/sci/0.2.1-alpha.1/sci-0.2.1-alpha.1.jar
cider/cider-nrepl/0.25.3/cider-nrepl-0.25.3.jar
cider/piggieback/0.4.1/piggieback-0.4.1.jar
clj-stacktrace/clj-stacktrace/0.2.8/clj-stacktrace-0.2.8.jar
cljs-bean/cljs-bean/1.3.0/cljs-bean-1.3.0.jar
cljsjs/react-dom-server/17.0.1-0/react-dom-server-17.0.1-0.jar
cljsjs/react-dom/17.0.1-0/react-dom-17.0.1-0.jar
@@ -47,6 +50,7 @@ day8/re-frame/test/0.1.5/test-0.1.5.jar
edn-query-language/eql/0.0.9/eql-0.0.9.jar
expound/expound/0.8.5/expound-0.8.5.jar
fipp/fipp/0.6.23/fipp-0.6.23.jar
hashp/hashp/0.2.1/hashp-0.2.1.jar
hiccup/hiccup/1.0.5/hiccup-1.0.5.jar
hickory/hickory/0.7.1/hickory-0.7.1.jar
http-kit/http-kit/2.2.0/http-kit-2.2.0.jar
@@ -57,6 +61,8 @@ 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
mvxcvi/alphabase/1.0.0/alphabase-1.0.0.jar
mvxcvi/arrangement/1.2.0/arrangement-1.2.0.jar
mvxcvi/puget/1.3.1/puget-1.3.1.jar
net/cgrand/macrovich/0.2.1/macrovich-0.2.1.jar
nrepl/nrepl/0.7.0/nrepl-0.7.0.jar
org/checkerframework/checker-qual/2.0.0/checker-qual-2.0.0.jar
@@ -65,7 +71,7 @@ org/clojure/clojurescript/1.10.773/clojurescript-1.10.773.jar
org/clojure/core.async/1.3.610/core.async-1.3.610.jar
org/clojure/core.cache/1.0.207/core.cache-1.0.207.jar
org/clojure/core.memoize/1.0.236/core.memoize-1.0.236.jar
org/clojure/core.rrb-vector/0.1.1/core.rrb-vector-0.1.1.jar
org/clojure/core.rrb-vector/0.1.2/core.rrb-vector-0.1.2.jar
org/clojure/core.specs.alpha/0.2.44/core.specs.alpha-0.2.44.jar
org/clojure/data.json/1.0.0/data.json-1.0.0.jar
org/clojure/data.priority-map/1.0.0/data.priority-map-1.0.0.jar
@@ -107,6 +113,8 @@ 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
reagent/reagent/1.0.0/reagent-1.0.0.jar
refactor-nrepl/refactor-nrepl/2.5.0/refactor-nrepl-2.5.0.jar
rewrite-clj/rewrite-clj/0.6.1/rewrite-clj-0.6.1.jar
rewrite-cljs/rewrite-cljs/0.4.5/rewrite-cljs-0.4.5.jar
ring-cors/ring-cors/0.1.8/ring-cors-0.1.8.jar
ring/ring-codec/1.1.2/ring-codec-1.1.2.jar
ring/ring-core/1.8.1/ring-core-1.8.1.jar
@@ -117,3 +125,4 @@ thheller/shadow-cljs/2.11.16/shadow-cljs-2.11.16-aot.jar
thheller/shadow-cljsjs/0.0.21/shadow-cljsjs-0.0.21.jar
thheller/shadow-util/0.7.0/shadow-util-0.7.0.jar
viebel/codox-klipse-theme/0.0.1/codox-klipse-theme-0.0.1.jar
zprint/zprint/1.1.1/zprint-1.1.1.jar
+134
View File
@@ -0,0 +1,134 @@
{
"chats": [
["Featured", [
"status",
"support",
"crypto",
"chitchat",
"defi",
"markets",
"dap-ps",
"devcon",
"eth2"
]],
["General", [
"chitchat",
"hello",
"worldnews",
"status",
"support"
]],
["Entertainment", [
"music",
"movies",
"podcasts",
"books",
"gaming",
"adult",
"tv-shows"
]],
["Interests", [
"sports",
"travel",
"design",
"food",
"automotive"
]],
["Society", [
"climatechange",
"blacklivesmatter",
"politics",
"hongkong",
"privacy"
]],
["Crypto", [
"crypto",
"markets",
"crypto-education",
"ethereum",
"bitcoin",
"chainlink",
"avalanche",
"eth2",
"eips",
"dap-ps",
"cryptolife",
"governance",
"staking",
"defi",
"cryptopayments",
"tokenomics",
"web3",
"web3design",
"devcon",
"exchange",
"validators"
]],
["Technologies", [
"tech",
"ai",
"vr-ar",
"networks"
]],
["Status", [
"status",
"support",
"statusphere",
"status-townhall-questions",
"status-core-ui",
"status-keycard",
"nimbus-general",
"status-assemble",
"status-marketing",
"status-protocol",
"status-desktop",
"status-watercooler",
"status-security",
"waku",
"status-docs",
"status-general",
"status-design"
]],
["Development", [
"ethereum-clients",
"storage",
"indexing",
"sidechains",
"layer2",
"devops",
"smart-contracts",
"embark-community",
"subspace",
"open-source",
"security"
]],
["Languages", [
"status-espanol",
"statusbrasil",
"status-german",
"status-french",
"status-italiano",
"status-dutch",
"status-russian",
"status-chinese",
"status-korean",
"status-japanese",
"status-farsi",
"status-turkish",
"status-filipino",
"status-naija",
"status-indian",
"status-arabic",
"indonesian"
]]
]
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

+9 -8
View File
@@ -11,7 +11,6 @@
[cljs-bean "1.3.0"]
[com.cognitect/transit-cljs "0.8.248"]
[mvxcvi/alphabase "1.0.0"]
[camel-snake-kebab "0.4.3"]
;; dev dependencies
[refactor-nrepl "2.5.0"]
[cider/cider-nrepl "0.25.3"]
@@ -20,6 +19,7 @@
;; routing
[bidi "2.1.6"]
;; test dependencies
[camel-snake-kebab "0.4.3"]
[day8.re-frame/test "0.1.5"]
[com.taoensso/tufte "2.1.0"]]
@@ -47,8 +47,8 @@
:build-notify status-im2.setup.hot-reload/build-notify
:preloads [re-frisk-remote.preload]}
:closure-defines
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options {:output-feature-set :es5
:closure-defines
{re-frame.trace/trace-enabled? true}
@@ -58,11 +58,12 @@
;; in the SHADOW_HOST env variable to make sure that
;; it will use the right interface
:local-ip #shadow/env "SHADOW_HOST"}
:chunks {:fleets status-im.fleet.default-fleet/default-fleets}
:chunks {:fleets status-im.fleet.default-fleet/default-fleets
:chats status-im.chat.default-chats/default-chats}
:release
{:closure-defines
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options {:output-feature-set :es6
;;disable for android build as there
;;is an intermittent warning with deftype
@@ -89,8 +90,8 @@
:ui-driven
true
:closure-defines
{status-im2.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im2.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
{status-im.utils.config/POKT_TOKEN #shadow/env "POKT_TOKEN"
status-im.utils.config/OPENSEA_API_KEY #shadow/env "OPENSEA_API_KEY"}
:compiler-options
{;; needed because we override require and it
;; messes with source-map which reports callstack
+3 -3
View File
@@ -1,7 +1,7 @@
(ns utils.i18n
(ns i18n.i18n
(:require ["i18n-js" :as i18n]
[clojure.string :as string]
[utils.i18n-goog :as i18n-goog]))
[status-im.goog.i18n :as goog.i18n]))
(defn setup
[default-device-language translations-by-locale]
@@ -69,4 +69,4 @@
(def locale
(.-locale i18n))
(def format-currency i18n-goog/format-currency)
(def format-currency goog.i18n/format-currency)
+3 -1
View File
@@ -1,7 +1,8 @@
(ns mocks.js-dependencies
(:require-macros [status-im.utils.slurp :refer [slurp]])
(:require [status-im.fleet.default-fleet :refer (default-fleets)])
(:require [status-im.utils.test :as utils.test]))
(:require [status-im.utils.test :as utils.test])
(:require [status-im.chat.default-chats :refer (default-chats)]))
;; to generate a js Proxy at js/__STATUS_MOBILE_JS_IDENTITY_PROXY__ that accept any (.xxx) call and
;; return itself
@@ -397,6 +398,7 @@ globalThis.__STATUS_MOBILE_JS_IDENTITY_PROXY__ = new Proxy({}, {get() { return (
"../src/js/bottom_sheet.js" bottom-sheet
"../src/js/record_audio_worklets.js" record-audio-worklets
"./fleets.js" default-fleets
"./chats.js" default-chats
"@walletconnect/client" wallet-connect-client
"../translations/ar.json" (js/JSON.parse (slurp "./translations/ar.json"))
"../translations/de.json" (js/JSON.parse (slurp "./translations/de.json"))
+1 -1
View File
@@ -134,7 +134,7 @@
:style {:width outer-dimensions
:height outer-dimensions
:border-radius outer-dimensions}}
(when (and false (and ring? identicon?)) ;;TODO not implemented yet
(when (and ring? identicon?)
[icons/icon :i/identicon-ring
{:size outer-dimensions
:no-color true}])
@@ -4,6 +4,7 @@
(def container
{:height 40
:flex 1
:background-color colors/primary-50-opa-20
:flex-direction :row
:align-items :center
@@ -7,7 +7,7 @@
[quo2.components.markdown.text :as text]
[quo2.components.tags.token-tag :as token-tag]
[quo2.foundations.colors :as colors]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[react-native.fast-image :as fast-image]))
(def ^:private token-tag-horizontal-spacing 7)
@@ -9,7 +9,7 @@
[quo2.foundations.colors :as colors]
[react-native.core :as rn]
[reagent.core :as reagent]
[utils.i18n :as i18n]))
[i18n.i18n :as i18n]))
(def ^:private max-reply-length
280)
+1 -1
View File
@@ -1,5 +1,5 @@
(ns quo2.components.notifications.toast
(:require [utils.i18n :as i18n]
(:require [i18n.i18n :as i18n]
[quo2.components.icon :as icon]
[quo2.components.markdown.text :as text]
[quo2.components.notifications.count-down-circle :as count-down-circle]
@@ -1,68 +0,0 @@
(ns quo2.components.profile.collectible.style
(:require [quo2.foundations.colors :as colors]))
(def tile-style-by-size
{:xl {:width 160
:height 160
:border-radius 12}
:lg {:width 104
:height 104
:border-radius 10}
:md {:width 76
:height 76
:border-radius 10}
:sm {:width 48
:height 48
:border-radius 8}
:xs {:width 36
:height 36
:border-radius 8}})
(def tile-outer-container
{:width 176
:height 176
:padding 8})
(def tile-inner-container
{:position :relative
:flex 1})
(def tile-sub-container
{:position :absolute
:width 76
:height 76
:bottom 0
:right 0})
(def top-left
{:position :absolute
:top 0
:left 0})
(def top-right
{:position :absolute
:top 0
:right 0})
(def bottom-left
{:position :absolute
:bottom 0
:left 0})
(def bottom-right
{:position :absolute
:bottom 0
:right 0})
(defn remaining-tiles
[]
(let [bg-color (colors/theme-colors colors/neutral-20 colors/neutral-80)
tile-size (tile-style-by-size :xs)]
(assoc tile-size
:justify-content :center
:align-items :center
:background-color bg-color)))
(defn remaining-tiles-text
[]
{:color (colors/theme-colors colors/neutral-60 colors/neutral-40)})
@@ -1,97 +0,0 @@
(ns quo2.components.profile.collectible.view
(:require [quo2.components.markdown.text :as text]
[quo2.components.profile.collectible.style :as style]
[react-native.core :as rn]))
(defn remaining-tiles
[amount]
[rn/view {:style (merge style/bottom-right (style/remaining-tiles))}
[text/text
{:style (style/remaining-tiles-text)
:size :paragraph-2
:weight :medium}
(str "+" amount)]])
(defn tile
[{:keys [style resource size]}]
(let [source (if (string? resource) {:uri resource} resource)]
[rn/view {:style style}
[rn/image
{:style (style/tile-style-by-size size)
:source source}]]))
(defn two-tiles
[{:keys [images size]}]
[:<>
[tile
{:style style/top-left
:size size
:resource (first images)}]
[tile
{:style style/bottom-right
:size size
:resource (second images)}]])
(defn three-tiles
[{:keys [tiles size]}]
(let [[image-1 image-2 image-3 & _] tiles]
[:<>
[tile
{:style style/top-left
:size size
:resource image-1}]
[tile
{:style style/top-right
:size size
:resource image-2}]
[tile
{:style style/bottom-left
:size size
:resource image-3}]]))
(defn tile-container
[{:keys [images]}]
(let [num-images (count images)]
(case num-images
1 [tile
{:resource (first images)
:size :xl}]
2 [two-tiles
{:images images
:size :lg}]
3 [three-tiles
{:tiles images
:size :md}]
(let [[first-three-images remaining-images] (split-at 3 images)]
[:<>
[three-tiles {:tiles first-three-images :size :md}]
[rn/view {:style style/tile-sub-container}
(case num-images
4 [tile
{:resource (nth images 3 nil)
:size :md}]
5 [two-tiles
{:images (take 2 remaining-images)
:size :sm}]
6 [three-tiles
{:tiles (take 3 remaining-images)
:size :xs}]
7 [:<>
[three-tiles
{:tiles (take 3 remaining-images)
:size :xs}]
[tile
{:style style/bottom-right
:size :xs
:resource (nth remaining-images 3 nil)}]]
[:<>
[three-tiles
{:tiles (take 3 remaining-images)
:size :xs}]
[remaining-tiles (- (count remaining-images) 3)]])]]))))
(defn collectible
[{:keys [images]}]
[rn/view {:style style/tile-outer-container}
[rn/view {:style style/tile-inner-container}
[tile-container {:images images}]]])
+3 -3
View File
@@ -25,7 +25,7 @@
:component tag/tab
:size 32/24
:on-press fn
:blurred? true/false
:blurred? true/false
:labelled? true/false
:disabled? true/false
:scroll-on-press? true
@@ -36,7 +36,7 @@
:data [{:id :label \"\" :resource \"url\"}
{:id :label \"\" :resource \"url\"}]}
Opts:
- `component` this is to determine which component is to be rendered since the
- `component` this is to determine which component is to be rendered since the
logic in this view is shared between tab and tag component
- `blurred` boolean: use to determine border color if the background is blurred
- `type` can be icon or emoji with or without a tag label
@@ -142,7 +142,7 @@
:on-press (fn [id]
(reset! active-tab-id id)
(when scroll-on-press?
(.scrollToIndex ^js @flat-list-ref
(.scrollToIndex @flat-list-ref
#js
{:animated true
:index index
-5
View File
@@ -1,5 +0,0 @@
(ns react-native.blur
(:require ["@react-native-community/blur" :as blur]
[reagent.core :as reagent]))
(def view (reagent/adapt-react-class (.-BlurView blur)))
+10 -23
View File
@@ -1,5 +1,6 @@
(ns react-native.core
(:require ["react" :as react]
(:require ["@react-native-community/blur" :as blur]
["react" :as react]
["react-native" :as react-native]
[cljs-bean.core :as bean]
[oops.core :as oops]
@@ -9,6 +10,7 @@
[reagent.core :as reagent]))
(def app-state ^js (.-AppState ^js react-native))
(def blur-view (reagent/adapt-react-class (.-BlurView blur)))
(def view (reagent/adapt-react-class (.-View ^js react-native)))
(def scroll-view (reagent/adapt-react-class (.-ScrollView ^js react-native)))
@@ -23,6 +25,8 @@
(def flat-list flat-list/flat-list)
(def flat-list-inside-gesture-handler flat-list/flat-list-inside-gesture-handler)
(def section-list section-list/section-list)
(def activity-indicator (reagent/adapt-react-class (.-ActivityIndicator ^js react-native)))
@@ -88,32 +92,15 @@
props)]
children))
(def create-ref react/createRef)
(defn use-effect
([effect] (use-effect effect []))
([effect deps]
(react/useEffect effect (bean/->js deps))))
(def use-ref react/useRef)
(defn use-effect
([effect-fn]
(react/useEffect
#(let [ret (effect-fn)]
(if (fn? ret) ret js/undefined))))
([effect-fn deps]
(react/useEffect effect-fn (bean/->js deps))))
(defn use-effect-once
[effect-fn]
(use-effect effect-fn))
(defn use-effect-once [effect] (use-effect effect))
(defn use-unmount
[f]
(let [fn-ref (use-ref f)]
(oops/oset! fn-ref "current" f)
(use-effect-once (fn [] (fn [] (oops/ocall! fn-ref "current"))))))
(def layout-animation (.-LayoutAnimation ^js react-native))
(def configure-next (.-configureNext ^js layout-animation))
(def layout-animation-presets
{:ease-in-ease-out (-> ^js layout-animation .-Presets .-easeInEaseOut)
:linear (-> ^js layout-animation .-Presets .-linear)
:spring (-> ^js layout-animation .-Presets .-spring)})
+6 -1
View File
@@ -1,6 +1,7 @@
(ns react-native.flat-list
(:require ["react-native" :as react-native]
[reagent.core :as reagent]))
[reagent.core :as reagent]
[quo.gesture-handler :as gesture-handler]))
(def react-native-flat-list (reagent/adapt-react-class (.-FlatList ^js react-native)))
@@ -39,3 +40,7 @@
(defn flat-list
[props]
[react-native-flat-list (base-list-props props)])
(defn flat-list-inside-gesture-handler
[props]
[gesture-handler/flat-list (base-list-props props)])
+16 -7
View File
@@ -13,9 +13,8 @@
SlideInUp
SlideOutUp
LinearTransition)]
[camel-snake-kebab.core :as csk]
[reagent.core :as reagent]
[utils.collection]))
[clojure.string :as string]
[reagent.core :as reagent]))
;; Animations
(def slide-in-up-animation SlideInUp)
@@ -63,6 +62,18 @@
(when anim
(set! (.-value anim) val)))
(defn kebab-case->camelCase
[k]
(let [words (string/split (name k) #"-")]
(->> (map string/capitalize (rest words))
(apply str (first words))
keyword)))
(defn map-keys
[f m]
(->> (map (fn [[k v]] [(f k) v]) m)
(into {})))
;; Worklets
(def worklet-factory (js/require "../src/js/worklet_factory.js"))
@@ -79,10 +90,8 @@
;; so first convert kebab case styles into camel case styles
(defn apply-animations-to-style
[animations style]
(let [animations (utils.collection/map-keys csk/->camelCaseString animations)
style (apply dissoc
(utils.collection/map-keys csk/->camelCaseString style)
(keys animations))]
(let [animations (map-keys kebab-case->camelCase animations)
style (apply dissoc (map-keys kebab-case->camelCase style) (keys animations))]
(use-animated-style
(.applyAnimationsToStyle ^js worklet-factory (clj->js animations) (clj->js style)))))
+3 -2
View File
@@ -5,11 +5,12 @@
(def ^:private consumer-raw (reagent/adapt-react-class (.-Consumer ^js SafeAreaInsetsContext)))
(def provider (reagent/adapt-react-class SafeAreaProvider))
(defn consumer
[component]
[consumer-raw
(fn [^js insets]
(reagent/as-element
[component (js->clj insets :keywordize-keys true)]))])
(def safe-area-provider (reagent/adapt-react-class SafeAreaProvider))
(def safe-area-consumer consumer-raw)
+1 -1
View File
@@ -7,7 +7,7 @@
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.ens :as ens]
[status-im.ethereum.stateofus :as stateofus]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.router.core :as router]
[status-im.utils.db :as utils.db]
[utils.re-frame :as rf]
+24 -31
View File
@@ -46,16 +46,15 @@
[player on-prepared on-error]
(when (and player (.-canPrepare ^js player))
(.prepare ^js player
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-prepared))))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-prepared)))))
(defn prepare-recorder
[recorder on-prepared on-error]
(when (and recorder (.-canPrepare ^js recorder))
(.prepare ^js recorder
(fn [^js err]
(fn [err _]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-prepared))))))
@@ -67,47 +66,42 @@
(.-canRecord ^js recorder)
(.-canPrepare ^js recorder)))
(.record ^js recorder
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-start))))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-start)))))
(defn stop-recording
[recorder on-stop on-error]
(if (and recorder (#{RECORDING PAUSED} (get-state recorder)))
(.stop ^js recorder
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-stop))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-stop)))
(on-stop)))
(defn pause-recording
[recorder on-pause on-error]
(when (and recorder (.-isRecording ^js recorder))
(.pause ^js recorder
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-pause))))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-pause)))))
(defn start-playing
[player on-start on-error]
(when (and player (.-canPlay ^js player))
(.play ^js player
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-start))))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-start)))))
(defn stop-playing
[player on-stop on-error]
(if (and player (.-isPlaying ^js player))
(.stop ^js player
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-stop))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-stop)))
(on-stop)))
(defn get-recorder-file-path
@@ -129,7 +123,7 @@
[player on-play on-pause on-error]
(when (and player (.-canPlay ^js player))
(.playPause ^js player
(fn [^js error pause?]
(fn [error pause?]
(if error
(on-error {:error (.-err error) :message (.-message error)})
(if pause?
@@ -141,10 +135,9 @@
(when (and player (.-canPlay ^js player))
(.seek ^js player
value
(fn [^js err]
(if err
(on-error {:error (.-err err) :message (.-message err)})
(on-seek))))))
#(if %
(on-error {:error (.-err %) :message (.-message %)})
(on-seek)))))
(defn can-play?
[player]
@@ -162,4 +155,4 @@
(stop-playing player
#(when (and player (not= (get-state player) IDLE))
(.destroy ^js player))
#()))
#()))
+1 -1
View File
@@ -1,7 +1,7 @@
(ns status-im.bootnodes.core
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[utils.re-frame :as rf]
[status-im2.navigation.events :as navigation]))
+2 -2
View File
@@ -8,10 +8,10 @@
[status-im.browser.eip3326 :as eip3326]
[status-im.browser.permissions :as browser.permissions]
[status-im.browser.webview-ref :as webview-ref]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.ens :as ens]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im.native-module.core :as status]
[status-im.signing.core :as signing]
+1 -1
View File
@@ -3,7 +3,7 @@
(ns status-im.browser.eip3085
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.network.core :as network]
[status-im.ui.screens.browser.eip3085.sheet :as sheet]
[utils.re-frame :as rf]
+1 -1
View File
@@ -1,7 +1,7 @@
;reference https://eips.ethereum.org/EIPS/eip-3326 EIP-3326: Wallet Switch Ethereum Chain RPC Method
;(`wallet_switchEthereumChain`)
(ns status-im.browser.eip3326
(:require [status-im2.constants :as constants]
(:require [status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ui.screens.browser.eip3326.sheet :as sheet]
[utils.re-frame :as rf]))
+2 -2
View File
@@ -1,6 +1,6 @@
(ns status-im.browser.permissions
(:require [status-im2.constants :as constants]
[utils.i18n :as i18n]
(:require [status-im.constants :as constants]
[i18n.i18n :as i18n]
[status-im.qr-scanner.core :as qr-scanner]
[utils.re-frame :as rf]
[status-im2.navigation.events :as navigation]))
+16
View File
@@ -0,0 +1,16 @@
(ns status-im.chat.constants)
(def command-char "/")
(def spacing-char " ")
(def arg-wrapping-char "\"")
(def spam-message-frequency-threshold 4)
(def spam-interval-ms 1000)
(def default-cooldown-period-ms 10000)
(def cooldown-reset-threshold 3)
(def cooldown-periods-ms
{1 2000
2 5000
3 10000})
(def max-text-size 4096)
+5 -1
View File
@@ -1,10 +1,14 @@
(ns status-im.chat.db
(:require [status-im2.constants :as constants]))
(:require [status-im.constants :as constants]))
(defn group-chat-name
[{:keys [public? name]}]
(str (when public? "#") name))
(defn datemark?
[{:keys [type]}]
(= type :datemark))
(defn intersperse-datemark
"Reduce step which expects the input list of messages to be sorted by clock value.
It makes best effort to group them by day.
+4
View File
@@ -0,0 +1,4 @@
(ns status-im.chat.default-chats (:require-macros [status-im.utils.slurp :refer [slurp]]))
(def default-chats
(slurp "resources/chats.json"))
+9 -4
View File
@@ -4,22 +4,27 @@
[re-frame.core :as re-frame]
[status-im.add-new.db :as new-public-chat.db]
[status-im.chat.models.loading :as loading]
[status-im2.contexts.chat.messages.list.events :as message-list]
[status-im2.constants :as constants]
[status-im.chat.models.message-list :as message-list]
[status-im.constants :as constants]
[status-im.data-store.chats :as chats-store]
[status-im.data-store.contacts :as contacts-store]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.mailserver.core :as mailserver]
[status-im.multiaccounts.model :as multiaccounts.model]
[status-im2.contexts.chat.messages.list.state :as chat.state]
[status-im.ui.screens.chat.state :as chat.state]
[status-im.utils.clocks :as utils.clocks]
[utils.re-frame :as rf]
[status-im.utils.types :as types]
[status-im.utils.utils :as utils]
[status-im2.contexts.chat.messages.delete-message-for-me.events :as delete-for-me]
[status-im2.contexts.chat.messages.delete-message.events :as delete-message]
[status-im2.navigation.events :as navigation]
[taoensso.timbre :as log]))
(defn chats
[]
(:chats (types/json->clj (js/require "./chats.js"))))
(defn- get-chat
[cofx chat-id]
(get-in cofx [:db :chats chat-id]))
+2 -2
View File
@@ -4,10 +4,10 @@
[clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.chat.models :as chat]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.ui.components.permissions :as permissions]
[status-im.ui.components.react :as react]
[status-im2.config :as config]
[status-im.utils.config :as config]
[status-im.utils.fs :as fs]
[utils.re-frame :as rf]
[status-im.utils.image-processing :as image-processing]
+28 -27
View File
@@ -3,17 +3,17 @@
[clojure.string :as string]
[goog.object :as object]
[re-frame.core :as re-frame]
[status-im.chat.constants :as chat.constants]
[status-im.chat.models :as chat]
[status-im.chat.models.mentions :as mentions]
[status-im.chat.models.message :as chat.message]
[status-im.chat.models.message-content :as message-content]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[utils.re-frame :as rf]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[utils.datetime :as datetime]
[status-im.utils.utils :as utils]
[taoensso.timbre :as log]
[status-im.ui.screens.chat.components.input :as input]))
[taoensso.timbre :as log]))
(defn text->emoji
"Replaces emojis in a specified `text`"
@@ -77,14 +77,14 @@
(defn- start-cooldown
[{:keys [db]} cooldowns]
{:dispatch-later [{:dispatch [:chat/disable-cooldown]
:ms (constants/cooldown-periods-ms
:ms (chat.constants/cooldown-periods-ms
cooldowns
constants/default-cooldown-period-ms)}]
chat.constants/default-cooldown-period-ms)}]
:show-cooldown-warning nil
:db (assoc db
:chat/cooldowns (if
(=
constants/cooldown-reset-threshold
chat.constants/cooldown-reset-threshold
cooldowns)
0
cooldowns)
@@ -102,8 +102,8 @@
:as cofx}]
(when (chat/public-chat? cofx current-chat-id)
(let [spamming-fast? (< (- (datetime/timestamp) last-outgoing-message-sent-at)
(+ constants/spam-interval-ms (* 1000 cooldowns)))
spamming-frequently? (= constants/spam-message-frequency-threshold
(+ chat.constants/spam-interval-ms (* 1000 cooldowns)))
spamming-frequently? (= chat.constants/spam-message-frequency-threshold
spam-messages-frequency)]
(cond-> {:db (assoc db
:chat/last-outgoing-message-sent-at (datetime/timestamp)
@@ -117,36 +117,37 @@
(rf/defn reply-to-message
"Sets reference to previous chat message and focuses on input"
{:events [:chat.ui/reply-to-message]}
[{:keys [db]} message]
[{:keys [db] :as cofx} message]
(let [current-chat-id (:current-chat-id db)]
{:db (-> db
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message]
message)
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message] nil)
(update-in [:chat/inputs current-chat-id :metadata]
dissoc
:sending-image))}))
(rf/merge cofx
{:db (-> db
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message]
message)
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message] nil)
(update-in [:chat/inputs current-chat-id :metadata]
dissoc
:sending-image))})))
(rf/defn edit-message
"Sets reference to previous chat message and focuses on input"
{:events [:chat.ui/edit-message]}
[{:keys [db] :as cofx} message]
(let [current-chat-id (:current-chat-id db)
text (get-in message [:content :text])]
(rf/merge cofx
{:db (-> db
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message]
message)
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message] nil)
(update-in [:chat/inputs current-chat-id :metadata]
dissoc
:sending-image))}
(input/set-input-text text current-chat-id))))
{:dispatch [:chat.ui.input/set-chat-input-text text current-chat-id]
:db (-> db
(assoc-in [:chat/inputs current-chat-id :metadata :editing-message]
message)
(assoc-in [:chat/inputs current-chat-id :metadata :responding-to-message] nil)
(update-in [:chat/inputs current-chat-id :metadata]
dissoc
:sending-image))}))
(rf/defn show-contact-request-input
"Sets reference to previous chat message and focuses on input"
{:events [:chat.ui/send-contact-request]}
[{:keys [db]}]
[{:keys [db] :as cofx}]
(let [current-chat-id (:current-chat-id db)]
{:db (-> db
(assoc-in [:chat/inputs current-chat-id :metadata :sending-contact-request]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.chat.models.input-test
(:require [cljs.test :refer-macros [deftest is testing]]
[status-im2.constants :as constants]
[status-im.chat.constants :as constants]
[status-im.chat.models.input :as input]
[utils.datetime :as datetime]))
+119
View File
@@ -0,0 +1,119 @@
(ns status-im.chat.models.link-preview
(:require [re-frame.core :as re-frame]
[status-im.communities.core :as models.communities]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[utils.re-frame :as rf]
[taoensso.timbre :as log]))
(rf/defn enable
{:events [::enable]}
[{{:keys [multiaccount]} :db :as cofx} site enabled?]
(rf/merge cofx
(multiaccounts.update/multiaccount-update
:link-previews-enabled-sites
(if enabled?
(conj (get multiaccount :link-previews-enabled-sites #{}) site)
(disj (get multiaccount :link-previews-enabled-sites #{}) site))
{})))
(rf/defn enable-all
{:events [::enable-all]}
[{{:keys [multiaccount]} :db :as cofx} link-previews-whitelist enabled?]
(rf/merge cofx
(multiaccounts.update/multiaccount-update
:link-previews-enabled-sites
(if enabled?
(into #{} (map :title link-previews-whitelist))
#{})
{})))
(defn community-resolved
[db community-id]
(update db :communities/resolve-community-info dissoc community-id))
(defn community-failed-to-resolve
[db community-id]
(update db :communities/resolve-community-info dissoc community-id))
(defn community-resolving
[db community-id]
(assoc-in db [:communities/resolve-community-info community-id] true))
(rf/defn handle-community-failed-to-resolve
{:events [::community-failed-to-resolve]}
[{:keys [db]} community-id]
{:db (community-failed-to-resolve db community-id)})
(defn community-link
[id]
(str "https://join.status.im/c/" id))
(rf/defn handle-community-resolved
{:events [::community-resolved]}
[{:keys [db] :as cofx} community-id community]
(rf/merge cofx
(cond-> {:db (community-resolved db community-id)}
(some? community)
(assoc :dispatch
[::cache-link-preview-data
(community-link community-id) community]))
(models.communities/handle-community community)))
(rf/defn resolve-community-info
{:events [::resolve-community-info]}
[{:keys [db]} community-id]
{:db (community-resolving db community-id)
:json-rpc/call [{:method "wakuext_requestCommunityInfoFromMailserver"
:params [community-id]
:on-success #(re-frame/dispatch [::community-resolved community-id %])
:on-error #(do
(re-frame/dispatch [::community-failed-to-resolve community-id])
(log/error "Failed to request community info from mailserver"))}]})
(rf/defn load-link-preview-data
{:events [::load-link-preview-data]}
[cofx link]
{:json-rpc/call [{:method "wakuext_getLinkPreviewData"
:params [link]
:on-success #(re-frame/dispatch [::cache-link-preview-data link %])
:on-error #(re-frame/dispatch
[::cache-link-preview-data
link
{:error (str "Can't get preview data for " link)}])}]})
(rf/defn cache-link-preview-data
{:events [::cache-link-preview-data]}
[{{:keys [multiaccount]} :db :as cofx} site data]
(multiaccounts.update/optimistic
cofx
:link-previews-cache
(assoc (get multiaccount :link-previews-cache {}) site data)))
(defn cache-community-preview-data
[{:keys [id] :as community}]
(re-frame/dispatch [::cache-link-preview-data
(community-link id)
community]))
(rf/defn should-suggest-link-preview
{:events [::should-suggest-link-preview]}
[{:keys [db] :as cofx} enabled?]
(multiaccounts.update/multiaccount-update
cofx
:link-preview-request-enabled
(boolean enabled?)
{}))
(rf/defn request-link-preview-whitelist
[_]
{:json-rpc/call [{:method "wakuext_getLinkPreviewWhitelist"
:params []
:on-success #(re-frame/dispatch [::link-preview-whitelist-received %])
:on-error #(log/error "Failed to get link preview whitelist")}]})
(rf/defn save-link-preview-whitelist
{:events [::link-preview-whitelist-received]}
[{:keys [db]} whitelist]
{:db (assoc db
:link-previews-whitelist
whitelist)})
+2 -2
View File
@@ -1,7 +1,7 @@
(ns status-im.chat.models.loading
(:require [re-frame.core :as re-frame]
[status-im2.contexts.chat.messages.list.events :as message-list]
[status-im2.constants :as constants]
[status-im.chat.models.message-list :as message-list]
[status-im.constants :as constants]
[status-im.data-store.chats :as data-store.chats]
[status-im.data-store.messages :as data-store.messages]
[status-im2.contexts.activity-center.events :as activity-center]
+1 -1
View File
@@ -3,7 +3,7 @@
[quo.react :as react]
[quo.react-native :as rn]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.contact.db :as contact.db]
[status-im.multiaccounts.core :as multiaccounts]
[status-im.native-module.core :as status]
+3 -3
View File
@@ -4,11 +4,11 @@
[status-im.chat.models :as chat-model]
[status-im.chat.models.loading :as chat.loading]
[status-im.chat.models.mentions :as mentions]
[status-im2.contexts.chat.messages.list.events :as message-list]
[status-im2.constants :as constants]
[status-im.chat.models.message-list :as message-list]
[status-im.constants :as constants]
[status-im.data-store.messages :as data-store.messages]
[status-im.transport.message.protocol :as protocol]
[status-im2.contexts.chat.messages.list.state :as view.state]
[status-im.ui.screens.chat.state :as view.state]
[utils.re-frame :as rf]
[status-im.utils.gfycat.core :as gfycat]
[status-im.utils.platform :as platform]
@@ -1,5 +1,10 @@
(ns status-im.chat.models.message-content
(:require [status-im2.constants :as constants]))
(:require [status-im.constants :as constants]))
(def stylings
[[:bold constants/regx-bold]
[:italic constants/regx-italic]
[:backquote constants/regx-backquote]])
(defn emoji-only-content?
"Determines if text is just an emoji"
@@ -1,12 +1,12 @@
(ns status-im2.contexts.chat.messages.list.events
(:require [utils.red-black-tree :as red-black-tree]
(ns status-im.chat.models.message-list
(:require ["functional-red-black-tree" :as rb-tree]
[status-im.constants :as constants]
[utils.datetime :as datetime]
[utils.re-frame :as rf]
[status-im2.constants :as constants]))
[utils.re-frame :as rf]))
(defn- add-datemark
[{:keys [whisper-timestamp] :as msg}]
;;NOTE(performance) this is slow
;;TODO this is slow
(assoc msg :datemark (datetime/day-relative whisper-timestamp)))
(defn- add-timestamp
@@ -40,6 +40,9 @@
add-datemark
add-timestamp))
;; any message that comes after this amount of ms will be grouped separately
(def ^:private group-ms 300000)
(defn same-group?
"Whether a message is in the same group as the one after it.
We check the time, and the author"
@@ -48,7 +51,7 @@
(not (:system-message? a))
(not (:system-message? b))
(= (:from a) (:from b))
(<= (js/Math.abs (- (:whisper-timestamp a) (:whisper-timestamp b))) constants/group-ms)))
(<= (js/Math.abs (- (:whisper-timestamp a) (:whisper-timestamp b))) group-ms)))
(defn display-photo?
"We display photos for other users, and not in 1-to-1 chats"
@@ -123,31 +126,50 @@
(not one-to-one?))
:last-in-group? last-in-group?)))
(defn get-prev-element
"Get previous item in the iterator, and wind it back to the initial state"
[^js iter]
(.prev iter)
(let [e (.-value iter)]
(.next iter)
e))
(defn get-next-element
"Get next item in the iterator, and wind it back to the initial state"
[^js iter]
(.next iter)
(let [e (.-value iter)]
(.prev iter)
e))
(defn update-message
"Update the message and siblings with positional info"
[tree message]
(let [iter (red-black-tree/find tree message)
previous-message (red-black-tree/get-prev iter)
next-message (red-black-tree/get-next iter)
message-with-pos-data (add-group-info message previous-message next-message)]
(cond-> (red-black-tree/update iter message-with-pos-data)
[^js tree message]
(let [^js iter (.find tree message)
^js previous-message (when (.-hasPrev iter)
(get-prev-element iter))
^js next-message (when (.-hasNext iter)
(get-next-element iter))
^js message-with-pos-data (add-group-info message previous-message next-message)]
(cond-> (.update iter message-with-pos-data)
next-message
(-> (red-black-tree/find next-message)
(red-black-tree/update (update-next-message message-with-pos-data next-message)))
(-> ^js (.find next-message)
(.update (update-next-message message-with-pos-data next-message)))
(and previous-message
(not= :datemark (:type previous-message)))
(-> (red-black-tree/find previous-message)
(red-black-tree/update (update-previous-message message-with-pos-data previous-message))))))
(-> ^js (.find previous-message)
(.update (update-previous-message message-with-pos-data previous-message))))))
(defn remove-message
"Remove a message in the list"
[tree prepared-message]
(let [iter (red-black-tree/find tree prepared-message)]
[^js tree prepared-message]
(let [iter (.find tree prepared-message)]
(if (not iter)
tree
(let [new-tree (red-black-tree/remove iter)
next-message (red-black-tree/get-next iter)]
(let [^js new-tree (.remove iter)
^js next-message (when (.-hasNext iter)
(get-next-element iter))]
(if (not next-message)
new-tree
(update-message new-tree next-message))))))
@@ -157,13 +179,13 @@
its positional metadata, and update the left & right messages if necessary,
this operation is O(logN) for insertion, and O(logN) for the updates, as
we need to re-find (there's probably a better way)"
[old-message-list prepared-message]
(let [tree (red-black-tree/insert old-message-list prepared-message)]
[^js old-message-list prepared-message]
(let [^js tree (.insert old-message-list prepared-message prepared-message)]
(update-message tree prepared-message)))
(defn add
[message-list message]
(insert-message (or message-list (red-black-tree/tree compare-fn)) (prepare-message message)))
(insert-message (or message-list (rb-tree compare-fn)) (prepare-message message)))
(defn add-many
[message-list messages]
@@ -172,9 +194,9 @@
messages))
(defn ->seq
[message-list]
[^js message-list]
(if message-list
(array-seq (red-black-tree/get-values message-list))
(array-seq (.-values message-list))
[]))
;; NOTE(performance): this is too expensive, probably we could mark message somehow and just hide it in
@@ -1,6 +1,6 @@
(ns status-im2.contexts.chat.messages.list.events-test
(ns status-im.chat.models.message-list-test
(:require [cljs.test :refer-macros [deftest is testing]]
[status-im2.contexts.chat.messages.list.events :as s]
[status-im.chat.models.message-list :as s]
[taoensso.tufte :as tufte :refer-macros [defnp profile]]))
(deftest message-stream-tests
+6 -6
View File
@@ -2,7 +2,7 @@
(:require [cljs.test :refer-macros [deftest is testing]]
[status-im.chat.models.loading :as loading]
[status-im.chat.models.message :as message]
[status-im2.contexts.chat.messages.list.state :as list.state]))
[status-im.ui.screens.chat.state :as view.state]))
(deftest add-received-message-test
(with-redefs [message/add-message #(identity %1)]
@@ -26,7 +26,7 @@
;; <- message
;; <- top of the chat
(testing "there's no hidden item"
(with-redefs [list.state/first-not-visible-item (atom nil)]
(with-redefs [view.state/first-not-visible-item (atom nil)]
(is
(=
{:db
@@ -46,7 +46,7 @@
;; <- message
;; <- top of the chat
(testing "the hidden item has a clock value less than the current"
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (dec clock-value)})]
(with-redefs [view.state/first-not-visible-item (atom {:clock-value (dec clock-value)})]
(is
(=
{:db
@@ -66,7 +66,7 @@
;; <- first-hidden-item
;; <- top of the chat
(testing "the message falls between the first-hidden-item and cursor"
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(with-redefs [view.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(let [result (dissoc (message/receive-many
cofx
#js {:messages (to-array [message])})
@@ -81,7 +81,7 @@
;; <- first-hidden-item
;; <- top of the chat
(testing "the message falls between the first-hidden-item and cursor is nil"
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(with-redefs [view.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(let [result (dissoc (message/receive-many
(update-in cofx
[:db :pagination-info chat-id]
@@ -101,7 +101,7 @@
;; <- first-hidden-item
;; <- top of the chat
(testing "the message falls before both the first-hidden-item and cursor"
(with-redefs [list.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(with-redefs [view.state/first-not-visible-item (atom {:clock-value (inc clock-value)})]
(let [message #js
{:localChatId chat-id
:clock (- clock-value 2)
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.chat.models.reactions
(:require [re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.data-store.reactions :as data-store.reactions]
[status-im.transport.message.protocol :as message.protocol]
[utils.re-frame :as rf]
+2 -2
View File
@@ -4,10 +4,10 @@
[clojure.walk :as walk]
[quo.design-system.colors :as colors]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.async-storage.core :as async-storage]
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ui.components.emoji-thumbnail.styles :as emoji-thumbnail-styles]
[utils.re-frame :as rf]
[status-im.utils.universal-links.core :as universal-links]
@@ -1,5 +1,6 @@
(ns status-im2.constants)
;; Test
(ns status-im.constants
(:require [status-im.react-native.resources :as resources]))
(def ^:const ms-in-bg-for-require-bioauth 5000)
(def ^:const content-type-text 1)
@@ -13,9 +14,6 @@
(def ^:const content-type-community 9)
(def ^:const content-type-gap 10)
(def ^:const content-type-contact-request 11) ;; TODO: temp, will be removed
(def ^:const content-type-gif 12)
(def ^:const content-type-link 13)
(def ^:const content-type-album 14)
(def ^:const contact-request-state-none 0)
(def ^:const contact-request-state-mutual 1)
@@ -31,11 +29,6 @@
(def ^:const contact-verification-status-trusted 5)
(def ^:const contact-verification-status-untrustworthy 6)
(def ^:const activity-center-membership-status-idle 0)
(def ^:const activity-center-membership-status-pending 1)
(def ^:const activity-center-membership-status-accepted 2)
(def ^:const activity-center-membership-status-declined 3)
(def ^:const emoji-reaction-love 1)
(def ^:const emoji-reaction-thumbs-up 2)
(def ^:const emoji-reaction-thumbs-down 3)
@@ -57,6 +50,14 @@
(def request-to-join-pending-state 1)
(def reactions-old
{emoji-reaction-love (:love resources/reactions-old)
emoji-reaction-thumbs-up (:thumbs-up resources/reactions-old)
emoji-reaction-thumbs-down (:thumbs-down resources/reactions-old)
emoji-reaction-laugh (:laugh resources/reactions-old)
emoji-reaction-sad (:sad resources/reactions-old)
emoji-reaction-angry (:angry resources/reactions-old)})
(def reactions
{emoji-reaction-love :i/love
emoji-reaction-thumbs-up :i/thumbs-up
@@ -204,39 +205,6 @@
(def ^:const community-member-role-manage-users 2)
(def ^:const community-member-role-moderator 3)
(def ^:const delete-message-undo-time-limit-ms 4000)
(def ^:const delete-message-for-me-undo-time-limit-ms 4000)
(def ^:const album-image-sizes
{4 {0 146
1 146
2 146
3 146}
5 {0 146
1 146
2 97
3 97
4 97}
:default {0 146
1 146
2 72.5
3 72.5
4 72.5
5 72.5}})
(def ^:const spam-message-frequency-threshold 4)
(def ^:const spam-interval-ms 1000)
(def ^:const default-cooldown-period-ms 10000)
(def ^:const cooldown-reset-threshold 3)
(def ^:const cooldown-periods-ms
{1 2000
2 5000
3 10000})
(def ^:const max-text-size 4096)
;; any message that comes after this amount of ms will be grouped separately
(def ^:const group-ms 300000)
(def ^:const local-pairing-connection-string-identifier
"If any string begins with cs we know its a connection string.
This is useful when we read QR codes we know it is a connection string if it begins with this identifier.
+4 -5
View File
@@ -1,6 +1,6 @@
(ns status-im.contact.block
(:require [re-frame.core :as re-frame]
[status-im2.contexts.chat.messages.list.events :as message-list]
[status-im.chat.models.message-list :as message-list]
[status-im.contact.db :as contact.db]
[status-im.data-store.chats :as chats-store]
[status-im.data-store.contacts :as contacts-store]
@@ -70,10 +70,9 @@
(assoc-in [:contacts/contacts public-key] contact))}
(contacts-store/block
public-key
(fn [^js block-contact]
(re-frame/dispatch [::contact-blocked contact (.-chats block-contact)])
(re-frame/dispatch [:sanitize-messages-and-process-response block-contact])
(re-frame/dispatch [:hide-popover])))
#(do (re-frame/dispatch [::contact-blocked contact (.-chats %)])
(re-frame/dispatch [:sanitize-messages-and-process-response %])
(re-frame/dispatch [:hide-popover])))
;; reset navigation to avoid going back to non existing one to one chat
(if from-one-to-one-chat?
(navigation/pop-to-root-tab :chat-stack)
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.contact.core
(:require [re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.contact.block :as contact.block]
[status-im.contact.db :as contact.db]
[status-im.data-store.contacts :as contacts-store]
+1 -1
View File
@@ -1,7 +1,7 @@
(ns status-im.contact.db
(:require [clojure.set :as set]
[clojure.string :as string]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.multiaccounts.core :as multiaccounts]
[status-im.utils.gfycat.core :as gfycat]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.data-store.activities
(:require [clojure.set :as set]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.data-store.messages :as messages]
[status-im2.contexts.activity-center.notification-types :as notification-types]))
@@ -1,6 +1,6 @@
(ns status-im.data-store.activities-test
(:require [cljs.test :refer [deftest is testing]]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.data-store.activities :as store]
[status-im2.contexts.activity-center.notification-types :as notification-types]))
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.data-store.chats
(:require [clojure.set :as set]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.data-store.messages :as messages]
[utils.re-frame :as rf]
[status-im.utils.types :as types]
+1 -1
View File
@@ -1,7 +1,7 @@
(ns status-im.data-store.settings
(:require [status-im.data-store.visibility-status-updates :as visibility-status-updates]
[status-im.ethereum.eip55 :as eip55]
[status-im2.config :as config]))
[status-im.utils.config :as config]))
(defn rpc->networks
[networks]
+1 -1
View File
@@ -2,7 +2,7 @@
(:require [clojure.string :as string]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.ens :as ens]
[status-im2.config :as config]))
[status-im.utils.config :as config]))
(def domain "stateofus.eth")
+2 -2
View File
@@ -13,7 +13,7 @@
status-im.chat.models.input
status-im.chat.models.loading
status-im.chat.models.transport
[status-im2.constants :as constants]
[status-im.constants :as constants]
status-im.contact.block
status-im.contact.chat
status-im.contact.core
@@ -21,7 +21,7 @@
status-im.ethereum.subscriptions
status-im.fleet.core
status-im.http.core
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.core :as keycard]
status-im.log-level.core
status-im.mailserver.constants
+3 -3
View File
@@ -1,10 +1,10 @@
(ns status-im.fleet.core
(:require [re-frame.core :as re-frame]
[status-im2.constants :as constants]
[utils.i18n :as i18n]
[status-im.constants :as constants]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im.node.core :as node]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]))
(defn current-fleet-sub
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.fleet.core-test
(:require [cljs.test :refer-macros [deftest is testing]]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.fleet.core :as fleet]))
#_(deftest fleets-test
@@ -1,4 +1,4 @@
(ns utils.i18n-goog
(ns status-im.goog.i18n
(:require
[clojure.string :as string]
goog.i18n.CompactNumberFormatSymbols
@@ -443,4 +443,4 @@
(new ^js goog.i18n.NumberFormat
(let [pattern (.-CURRENCY_PATTERN ^js nfs)]
(string/replace pattern #"\s*¤\s*" "")))
value)))
value)))
+5 -10
View File
@@ -2,14 +2,13 @@
(:refer-clojure :exclude [remove])
(:require [clojure.spec.alpha :as spec]
[clojure.string :as string]
[utils.i18n :as i18n]
[oops.core :as oops]
[re-frame.core :as re-frame]
[status-im.chat.models :as models.chat]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[utils.re-frame :as rf]
[i18n.i18n :as i18n]
[status-im2.contexts.activity-center.events :as activity-center]
[status-im2.navigation.events :as navigation]
[utils.re-frame :as rf]))
[status-im2.navigation.events :as navigation]))
(rf/defn navigate-chat-updated
{:events [:navigate-chat-updated]}
@@ -31,11 +30,7 @@
[_ response do-not-navigate?]
{:dispatch-n [[:sanitize-messages-and-process-response response]
(when-not do-not-navigate?
[:navigate-chat-updated
(-> response
(oops/oget :chats)
first
(oops/oget :id))])]})
[:navigate-chat-updated (.-id (aget (.-chats response) 0))])]})
(rf/defn remove-member
"Format group update message and sign membership"
+1 -1
View File
@@ -1,7 +1,7 @@
(ns status-im.keycard.backup-key
(:require [re-frame.core :as re-frame]
[status-im.ethereum.mnemonic :as mnemonic]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.common :as common]
[status-im.multiaccounts.recover.core :as multiaccounts.recover]
[status-im.signing.core :as signing.core]
+1 -1
View File
@@ -3,7 +3,7 @@
[status-im.keycard.keycard :as keycard]
[status-im.keycard.real-keycard :as real-keycard]
[status-im.keycard.simulated-keycard :as simulated-keycard]
[status-im2.config :as config]
[status-im.utils.config :as config]
[taoensso.timbre :as log]))
(defonce card
+1 -1
View File
@@ -1,5 +1,5 @@
(ns status-im.keycard.change-pin
(:require [utils.i18n :as i18n]
(:require [i18n.i18n :as i18n]
[status-im.keycard.common :as common]
[status-im.keycard.onboarding :as onboarding]
[utils.re-frame :as rf]
+1 -1
View File
@@ -3,7 +3,7 @@
[re-frame.core :as re-frame]
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im.ethereum.core :as ethereum]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.nfc :as nfc]
[status-im.popover.core :as popover]
[status-im.ui.screens.keycard.keycard-interaction :as keycard-sheet]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.keycard.core
(:require [re-frame.db]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
status-im.keycard.backup-key
[status-im.keycard.card :as card]
[status-im.keycard.change-pin :as change-pin]
+2 -2
View File
@@ -1,8 +1,8 @@
(ns status-im.keycard.onboarding
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[utils.i18n :as i18n]
[status-im.constants :as constants]
[i18n.i18n :as i18n]
[status-im.keycard.common :as common]
status-im.keycard.fx
[status-im.keycard.mnemonic :as mnemonic]
+2 -2
View File
@@ -2,10 +2,10 @@
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip55 :as eip55]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.common :as common]
status-im.keycard.fx
[status-im.multiaccounts.create.core :as multiaccounts.create]
+2 -2
View File
@@ -2,9 +2,9 @@
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[re-frame.db :as re-frame.db]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.keycard :as keycard]
[status-im.multiaccounts.create.core :as multiaccounts.create]
[status-im.native-module.core :as status]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.keycard.unpair
(:require [re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.common :as common]
[status-im.multiaccounts.key-storage.core :as key-storage]
[status-im.multiaccounts.update.core :as multiaccounts.update]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.keycard.wallet
(:require [status-im.bottom-sheet.core :as bottom-sheet]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip55 :as eip55]
[status-im.keycard.common :as common]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.log-level.core
(:require [re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im.node.core :as node]
[utils.re-frame :as rf]))
+1 -1
View File
@@ -1,7 +1,7 @@
(ns ^{:doc "Mailserver events and API"} status-im.mailserver.core
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im.node.core :as node]
[utils.re-frame :as rf]
@@ -2,7 +2,7 @@
(:require ["react-native-touch-id" :default touchid]
[quo.design-system.colors :as colors]
[re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.native-module.core :as status]
[status-im.popover.core :as popover]
[utils.re-frame :as rf]
+3 -3
View File
@@ -1,14 +1,14 @@
(ns status-im.multiaccounts.create.core
(:require [quo.design-system.colors :as colors]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.data-store.settings :as data-store.settings]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip55 :as eip55]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.native-module.core :as status]
[status-im.node.core :as node]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[status-im.utils.signing-phrase.core :as signing-phrase]
[status-im.utils.types :as types]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.multiaccounts.db
(:require [cljs.spec.alpha :as spec]
[status-im2.constants :as const]))
[status-im.constants :as const]))
(defn valid-length?
[password]
@@ -4,7 +4,7 @@
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.mnemonic :as mnemonic]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.backup-key :as keycard.backup]
[status-im.keycard.common :as common]
[status-im.multiaccounts.core :as multiaccounts]
+3 -3
View File
@@ -3,6 +3,7 @@
[clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.async-storage.core :as async-storage]
[status-im.chat.models.link-preview :as link-preview]
[status-im.communities.core :as communities]
[status-im.contact.core :as contact]
[status-im.data-store.chats :as data-store.chats]
@@ -15,7 +16,7 @@
[status-im.ethereum.tokens :as tokens]
[status-im.ethereum.transactions.core :as transactions]
[status-im.fleet.core :as fleet]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.common :as keycard.common]
[status-im.mobile-sync-settings.core :as mobile-network]
[status-im.multiaccounts.biometric.core :as biometric]
@@ -27,7 +28,7 @@
[status-im.signing.eip1559 :as eip1559]
[status-im.transport.core :as transport]
[status-im.ui.components.react :as react]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[status-im.utils.keychain.core :as keychain]
[status-im.utils.mobile-sync :as utils.mobile-sync]
@@ -40,7 +41,6 @@
[status-im.wallet.prices :as prices]
[status-im2.common.json-rpc.events :as json-rpc]
[status-im2.contexts.activity-center.events :as activity-center]
[status-im2.contexts.chat.messages.link-preview.events :as link-preview]
[status-im2.navigation.events :as navigation]
[status-im2.setup.log :as logging]
[taoensso.timbre :as log]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.multiaccounts.logout.core
(:require [re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.core :as multiaccounts]
[status-im.native-module.core :as status]
[status-im.notifications.core :as notifications]
@@ -2,10 +2,10 @@
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.mnemonic :as mnemonic]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.nfc :as nfc]
[status-im.multiaccounts.core :as multiaccounts]
[status-im.multiaccounts.create.core :as multiaccounts.create]
+1 -1
View File
@@ -1,5 +1,5 @@
(ns status-im.multiaccounts.update.core
(:require [status-im2.constants :as constants]
(:require [status-im.constants :as constants]
[utils.re-frame :as rf]
[status-im.utils.types :as types]
[taoensso.timbre :as log]))
+8 -1
View File
@@ -6,7 +6,7 @@
[status-im.utils.react-native :as react-native-utils]
[status-im.utils.types :as types]
[taoensso.timbre :as log]
[status-im2.constants :as constants]))
[status-im.constants :as constants]))
(defn status
[]
@@ -415,6 +415,13 @@
(log/debug "[native-module] set-blank-preview-flag")
(.setBlankPreviewFlag ^js (status) flag))
(defn is24Hour
[]
(log/debug "[native-module] is24Hour")
;;NOTE: we have to check for status module because of tests
(when (status)
(.-is24Hour ^js (status))))
(defn get-device-model-info
[]
(log/debug "[native-module] get-device-model-info")
+1 -1
View File
@@ -2,7 +2,7 @@
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im.ethereum.core :as ethereum]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.node.core :as node]
[utils.re-frame :as rf]
[status-im.utils.http :as http]
+1 -3
View File
@@ -1,7 +1,7 @@
(ns status-im.node.core
(:require [re-frame.core :as re-frame]
[status-im.native-module.core :as status]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[status-im.utils.platform :as utils.platform]
[status-im.utils.types :as types]
@@ -69,8 +69,6 @@
:EnableDiscV5 true
:Host "0.0.0.0"
:AutoUpdate true
;; Temporary fix until https://github.com/status-im/status-go/issues/3024 is resolved
:Nameserver "1.1.1.1"
:PeerExchange true
:Port 0
:UDPPort 0})
+1 -1
View File
@@ -5,7 +5,7 @@
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im.notifications.android :as pn-android]
[status-im.notifications.local :as local]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[taoensso.timbre :as log]))
+1 -1
View File
@@ -8,7 +8,7 @@
[status-im.chat.models :as chat.models]
[status-im.ethereum.decode :as decode]
[status-im.ethereum.tokens :as tokens]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.notifications.android :as pn-android]
[utils.re-frame :as rf]
[status-im.utils.money :as money]
+2 -2
View File
@@ -1,8 +1,8 @@
(ns status-im.pairing.core
(:require [re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.multiaccounts.update.core :as multiaccounts.update]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[status-im.utils.platform :as utils.platform]
[status-im2.common.json-rpc.events :as json-rpc]
+22
View File
@@ -0,0 +1,22 @@
(ns status-im.profile.db
(:require [cljs.spec.alpha :as spec]
[clojure.string :as string]
[status-im.chat.constants :as chat.constants]))
(defn correct-name?
[username]
(when-let [username (some-> username
(string/trim))]
(every? false?
[(string/blank? username)
(string/includes? username chat.constants/command-char)])))
(defn base64-png?
[photo-path]
(string/starts-with? photo-path "data:image/png;base64,"))
(defn base64-jpeg?
[photo-path]
(string/starts-with? photo-path "data:image/jpeg;base64,"))
(spec/def :profile/name correct-name?)
+1 -1
View File
@@ -5,7 +5,7 @@
[status-im.chat.models :as chat]
[status-im.ethereum.core :as ethereum]
[status-im.group-chats.core :as group-chats]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.router.core :as router]
[utils.re-frame :as rf]
[status-im.utils.utils :as utils]
+1 -1
View File
@@ -4,7 +4,7 @@
[re-frame.core :as re-frame]
[status-im.add-new.db :as public-chat.db]
[status-im.chat.models :as chat.models]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip681 :as eip681]
[status-im.ethereum.ens :as ens]
+5 -5
View File
@@ -1,14 +1,14 @@
(ns status-im.signals.core
(:require [status-im.chat.models.message :as models.message]
(:require [status-im.chat.models.link-preview :as link.preview]
[status-im.chat.models.message :as models.message]
[status-im.ethereum.subscriptions :as ethereum.subscriptions]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.mailserver.core :as mailserver]
[status-im.multiaccounts.login.core :as login]
[status-im.notifications.local :as local-notifications]
[status-im.transport.message.core :as transport.message]
[status-im.visibility-status-updates.core :as visibility-status-updates]
[utils.re-frame :as rf]
[status-im2.contexts.chat.messages.link-preview.events :as link-preview]
[status-im.visibility-status-updates.core :as visibility-status-updates]
[taoensso.timbre :as log]))
(rf/defn status-node-started
@@ -104,7 +104,7 @@
true))
"local-notifications" (local-notifications/process cofx
(js->clj event-js :keywordize-keys true))
"community.found" (link-preview/cache-community-preview-data (js->clj event-js
"community.found" (link.preview/cache-community-preview-data (js->clj event-js
:keywordize-keys
true))
"status.updates.timedout" (visibility-status-updates/handle-visibility-status-updates
+2 -2
View File
@@ -2,11 +2,11 @@
(:require [clojure.set :as set]
[clojure.string :as string]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im.ethereum.eip55 :as eip55]
[status-im.ethereum.tokens :as tokens]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.keycard.card :as keycard.card]
[status-im.keycard.common :as keycard.common]
[status-im.native-module.core :as status]
+1 -1
View File
@@ -3,7 +3,7 @@
[re-frame.core :as re-frame]
[status-im.bottom-sheet.core :as bottom-sheet]
[status-im.ethereum.core :as ethereum]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.popover.core :as popover]
[status-im.signing.eip1559 :as eip1559]
[utils.re-frame :as rf]
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.signing.keycard
(:require [re-frame.core :as re-frame]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.native-module.core :as status]
[utils.re-frame :as rf]
[status-im.utils.types :as types]
+2 -2
View File
@@ -1,9 +1,9 @@
(ns status-im.stickers.core
(:require [clojure.string :as string]
[re-frame.core :as re-frame]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.ethereum.core :as ethereum]
[status-im2.config :as config]
[status-im.utils.config :as config]
[utils.re-frame :as rf]
[status-im.utils.utils :as utils]
[status-im2.navigation.events :as navigation]))
+4 -4
View File
@@ -6,7 +6,7 @@
[status-im.chat.models.message :as models.message]
[status-im.chat.models.reactions :as models.reactions]
[status-im.communities.core :as models.communities]
[status-im2.constants :as constants]
[status-im.constants :as constants]
[status-im.contact.core :as models.contact]
[status-im.data-store.activities :as data-store.activities]
[status-im.data-store.chats :as data-store.chats]
@@ -235,11 +235,11 @@
(defn sort-js-messages!
"sort messages, so we can start process latest first,in that case we only need to process frist 20 and drop others"
[^js response-js messages]
[response-js messages]
(if (seq messages)
(set! (.-messages response-js)
(.sort (to-array messages)
(fn [^js a ^js b]
(fn [a b]
(- (.-clock b) (.-clock a)))))
(js-delete response-js "messages")))
@@ -334,7 +334,7 @@
(rf/defn transport-message-sent
{:events [:transport/message-sent]}
[cofx ^js response-js]
[cofx response-js]
(let [set-hash-fxs (map (fn [{:keys [localChatId id messageType]}]
(set-message-envelope-hash localChatId id messageType))
(types/js->clj (.-messages response-js)))]
@@ -1,6 +1,6 @@
(ns status-im.ui.components.action-sheet
(:require ["react-native" :refer (ActionSheetIOS)]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.utils.core :as utils]))
(defn- callback
+1 -1
View File
@@ -1,6 +1,6 @@
(ns status-im.ui.components.badge
(:require [quo.design-system.colors :as colors]
[utils.i18n :as i18n]
[i18n.i18n :as i18n]
[status-im.ui.components.react :as react]))
(defn badge

Some files were not shown because too many files have changed in this diff Show More