Compare commits

..
Author SHA1 Message Date
Samuel Hawksby-Robinson 5d245f721a Updated status-go version 2021-11-03 16:38:43 +00:00
4486 changed files with 100227 additions and 193741 deletions
+5
View File
@@ -0,0 +1,5 @@
{
"presets": [
"module:metro-react-native-babel-preset"
]
}
+171 -119
View File
@@ -1,55 +1,63 @@
legacy.status-im.utils.build/warning-handler
legacy.status-im.utils.build/get-current-sha
status-im.constants/spacing-char
status-im.constants/arg-wrapping-char
legacy.status-im.ios.core/init
legacy.status-im.ui.components.camera/aspects
legacy.status-im.ui.components.camera/capture-targets
legacy.status-im.ui.components.camera/set-torch
legacy.status-im.ui.components.camera/request-access-ios
legacy.status-im.chat.models.message-content/stylings
legacy.status-im.chat.models.message-content/actions
legacy.status-im.chat.models.message-content/blank-string
legacy.status-im.chat.models.message-content/sorted-ranges
legacy.status-im.ethereum.mnemonic/words->passphrase
native-module.core/listener
native-module.core/multiaccount-reset
native-module.core/extract-group-membership-signatures
native-module.core/sign-group-membership
native-module.core/update-mailservers
legacy.status-im.ethereum.abi-spec/bytes-to-hex
legacy.status-im.android.core/init
legacy.status-im.chat.models.message/transport-keys
legacy.status-im.utils.datetime/week
legacy.status-im.utils.datetime/time-ago
legacy.status-im.utils.datetime/format-date
legacy.status-im.utils.datetime/get-ordinal-date
status-im.utils.build/warning-handler
status-im.utils.build/get-current-sha
status-im.ethereum.resolver/name
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
status-im.ui.components.camera/set-torch
status-im.ui.components.camera/request-access-ios
status-im.chat.models.message-content/stylings
status-im.chat.models.message-content/actions
status-im.chat.models.message-content/blank-string
status-im.chat.models.message-content/sorted-ranges
status-im.ethereum.mnemonic/words->passphrase
status-im.native-module.core/listener
status-im.native-module.core/multiaccount-reset
status-im.native-module.core/extract-group-membership-signatures
status-im.native-module.core/sign-group-membership
status-im.native-module.core/update-mailservers
status-im.ethereum.abi-spec/bytes-to-hex
status-im.android.core/init
status-im.chat.models.message/transport-keys
status-im.utils.datetime/week
status-im.utils.datetime/time-ago
status-im.utils.datetime/format-date
status-im.utils.datetime/get-ordinal-date
reagent.dom/render
reagent.dom/unmount-component-at-node
reagent.dom/dom-node
reagent.dom/force-update-all
legacy.status-im.multiaccounts.create.core/get-new-key-code
legacy.status-im.ethereum.decode/string
legacy.status-im.ui.screens.network.views/mainnet?
legacy.status-im.data-store.chats/event->string
legacy.status-im.mailserver.constants/seven-days
legacy.status-im.mailserver.constants/connection-timeout
legacy.status-im.hardwallet.card/install-applet
legacy.status-im.hardwallet.card/install-cash-applet
legacy.status-im.multiaccount.login.data-test/all-contacts
legacy.status-im.multiaccount.login.data-test/multiaccounts
legacy.status-im.multiaccount.login.data-test/get-chats
legacy.status-im.multiaccount.login.data-test/transport
legacy.status-im.multiaccount.login.data-test/topics
legacy.status-im.utils.utils/clear-timeout
legacy.status-im.utils.handlers/logged-in
legacy.status-im.multiaccounts.model/credentials
legacy.status-im.multiaccounts.login.core/contract-fleet?
legacy.status-im.multiaccounts.login.core/fetch-nodes
status-im.config/rpc-networks-only?
status-im.config/waku-enabled?
legacy.status-im.utils.pairing/has-paired-installations?
legacy.status-im.tribute-to-talk.core-test/user-cofx
status-im.multiaccounts.create.core/get-new-key-code
status-im.ethereum.decode/string
status-im.ui.screens.network.views/mainnet?
status-im.data-store.chats/event->string
status-im.mailserver.constants/seven-days
status-im.mailserver.constants/connection-timeout
status-im.hardwallet.card/install-applet
status-im.hardwallet.card/install-cash-applet
status-im.multiaccount.login.data-test/all-contacts
status-im.multiaccount.login.data-test/multiaccounts
status-im.multiaccount.login.data-test/get-chats
status-im.multiaccount.login.data-test/transport
status-im.multiaccount.login.data-test/topics
status-im.utils.utils/clear-timeout
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-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
quo.gesture-handler/pan-gesture-handler
quo.gesture-handler/long-press-gesture-handler
quo.gesture-handler/pure-native-button
quo.gesture-handler/createNativeWrapper
quo.gesture-handler/animated-raw-button
quo.gesture-handler/states
mocks.js-dependencies/action-button
mocks.js-dependencies/camera
mocks.js-dependencies/dismiss-keyboard
@@ -78,36 +86,75 @@ mocks.js-dependencies/react-navigation-bottom-tabs
mocks.js-dependencies/react-native-haptic-feedback
mocks.js-dependencies/mock
quo.previews.main/init
legacy.status-im.chat.models.message-list-test/descending-range
legacy.status-im.chat.models.message-list-test/random-range
legacy.status-im.ethereum.eip165/supports?
legacy.status-im.utils.hex/valid-hex?
legacy.status-im.multiaccounts.core/chat-send?
legacy.status-im.hardwallet.simulated-keycard/install-cash-applet
legacy.status-im.hardwallet.simulated-keycard/sign-typed-data
legacy.status-im.utils.core/safe-read-message-content
legacy.status-im.ui.components.react/native-modules
legacy.status-im.ui.components.react/progress-bar
react-native.fs/move-file
react-native.fs/read-dir
react-native.fs/mkdir
react-native.fs/unlink
react-native.fs/file-exists?
legacy.status-im.ui.components.colors/white
legacy.status-im.ui.components.colors/black
legacy.status-im.ui.components.core/animated-header
legacy.status-im.ui.components.core/safe-area-provider
legacy.status-im.ui.components.core/safe-area-consumer
legacy.status-im.ui.components.core/safe-area-view
legacy.status-im.utils.universal-links.core/open!
legacy.status-im.transport.filters.core-test/member-2
legacy.status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
legacy.status-im.ethereum.ens/ttl
legacy.status-im.ethereum.ens/addr-hash
legacy.status-im.ethereum.ens/name-hash
legacy.status-im.ethereum.ens/ABI-hash
legacy.status-im.ethereum.ens/pubkey-hash
legacy.status-im.network.core/get-network
status-im.chat.models.message-list-test/descending-range
status-im.chat.models.message-list-test/random-range
status-im.ethereum.eip165/supports?
status-im.utils.hex/valid-hex?
status-im.multiaccounts.core/chat-send?
status-im.hardwallet.simulated-keycard/install-cash-applet
status-im.hardwallet.simulated-keycard/sign-typed-data
status-im.utils.core/safe-read-message-content
status-im.ui.components.react/native-modules
status-im.ui.components.react/progress-bar
status-im.utils.fs/move-file
status-im.utils.fs/read-dir
status-im.utils.fs/mkdir
status-im.utils.fs/unlink
status-im.utils.fs/file-exists?
quo.animated/code
quo.animated/eq
quo.animated/neq
quo.animated/greater-or-eq
quo.animated/not*
quo.animated/or*
quo.animated/and*
quo.animated/add
quo.animated/sub
quo.animated/multiply
quo.animated/abs
quo.animated/min*
quo.animated/max*
quo.animated/set
quo.animated/start-clock
quo.animated/stop-clock
quo.animated/bezier
quo.animated/linear
quo.animated/set-value
quo.animated/clock
quo.animated/debug
quo.animated/log
quo.animated/event
quo.animated/on-change
quo.animated/cond*
quo.animated/block
quo.animated/call*
quo.animated/timing
quo.animated/spring
quo.animated/clamp
quo.animated/with-spring
quo.animated/with-timing
quo.animated/re-timing
quo.design-system.colors/white
quo.design-system.colors/black
status-im.transport.core-test/messages
status-im.ethereum.core/sidechain?
status-im.ethereum.core/network-with-upstream-rpc?
status-im.ethereum.core/current-address
status-im.ethereum.core/network->network-name
status-im.ethereum.core/estimate-gas
quo.core/animated-header
quo.core/safe-area-provider
quo.core/safe-area-consumer
quo.core/safe-area-view
status-im.utils.universal-links.core/open!
status-im.transport.filters.core-test/member-2
status-im.ui.screens.chat.ttt/one-to-one-chat-description-container
status-im.ethereum.ens/ttl
status-im.ethereum.ens/addr-hash
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-im.constants/desktop-content-types
status-im.constants/blocks-per-hour
status-im.constants/one-earth-day
@@ -142,44 +189,49 @@ status-im.constants/debug-metrics
status-im.constants/scan-qr-code
status-im.constants/ipfs-proto-code
status-im.constants/swarm-proto-code
legacy.status-im.multiaccounts.update.publisher/publish-update!
legacy.status-im.utils.async/task-queue
legacy.status-im.utils.async/async-periodic-run!
legacy.status-im.desktop.core/app-root
legacy.status-im.desktop.core/init
legacy.status-im.chat.models-test/test-db
legacy.status-im.ui.components.spacing/padding-vertical
legacy.status-im.utils.money/percent-change
utils.debounce/clear-all
legacy.status-im.transport.db/create-chat
legacy.status-im.utils.priority-map/priority-map
legacy.status-im.utils.priority-map/priority-map-by
legacy.status-im.utils.priority-map/priority-map-keyfn
legacy.status-im.utils.priority-map/empty-message-map
legacy.status-im.wallet.choose-recipient.core/use-default-eth-gas
legacy.status-im.ui.components.animation/decay
legacy.status-im.ui.components.animation/remove-all-listeners
legacy.status-im.ui.components.animation/stop-animation
legacy.status-im.ui.components.animation/animated
legacy.status-im.ui.components.animation/add
legacy.status-im.ui.components.animation/subtract
legacy.status-im.ui.components.animation/get-layout
legacy.status-im.wallet.transactions-test/uri-query-data
legacy.status-im.utils.name/shortened-name
legacy.status-im.ui.components.button.haptic/trigger
legacy.status-im.contact.db/filter-dapps
legacy.status-im.contact.db/filter-group-contacts
legacy.status-im.contact.db/legacy-pending?
legacy.status-im.utils.transducers-test/preview-call-1
legacy.status-im.utils.transducers-test/preview-call-2
legacy.status-im.utils.types/to-string
legacy.status-im.chat.db/datemark?
legacy.status-im.chat.db/gap?
legacy.status-im.chat.db/map->sorted-seq
legacy.status-im.utils.snoopy/status-module-filter
legacy.status-im.utils.snoopy/websocket-filter
legacy.status-im.utils.snoopy/touches-filter
legacy.status-im.utils.snoopy/native-animation-filter
legacy.status-im.utils.snoopy/keyboard-observer-filter
legacy.status-im.utils.multihash/hex
legacy.status-im.utils.multihash/decode-array
status-im.multiaccounts.update.publisher/publish-update!
status-im.utils.async/task-queue
status-im.utils.async/async-periodic-run!
status-im.desktop.core/app-root
status-im.desktop.core/init
status-im.chat.models-test/test-db
quo.design-system.spacing/padding-vertical
status-im.utils.money/percent-change
status-im.utils.platform/isMacOs?
status-im.utils.platform/isNix?
status-im.utils.platform/isWin?
status-im.utils.platform/android-version>=
status-im.utils.debounce/clear-all
status-im.transport.db/create-chat
status-im.utils.priority-map/priority-map
status-im.utils.priority-map/priority-map-by
status-im.utils.priority-map/priority-map-keyfn
status-im.utils.priority-map/empty-message-map
status-im.wallet.choose-recipient.core/use-default-eth-gas
status-im.ui.components.animation/decay
status-im.ui.components.animation/remove-all-listeners
status-im.ui.components.animation/stop-animation
status-im.ui.components.animation/animated
status-im.ui.components.animation/add
status-im.ui.components.animation/subtract
status-im.ui.components.animation/get-layout
status-im.wallet.transactions-test/uri-query-data
quo.react-native/touchable-highlight
status-im.utils.name/shortened-name
status-im.ui.components.button.haptic/trigger
status-im.contact.db/filter-dapps
status-im.contact.db/filter-group-contacts
status-im.contact.db/legacy-pending?
status-im.utils.transducers-test/preview-call-1
status-im.utils.transducers-test/preview-call-2
status-im.utils.types/to-string
status-im.chat.db/datemark?
status-im.chat.db/gap?
status-im.chat.db/map->sorted-seq
status-im.utils.snoopy/status-module-filter
status-im.utils.snoopy/websocket-filter
status-im.utils.snoopy/touches-filter
status-im.utils.snoopy/native-animation-filter
status-im.utils.snoopy/keyboard-observer-filter
status-im.utils.multihash/hex
status-im.utils.multihash/decode-array
-1
View File
@@ -1 +0,0 @@
{:lint-as {babashka.fs/with-temp-dir clojure.core/let}}
-1
View File
@@ -1 +0,0 @@
{:hooks {:macroexpand {sci.core/copy-ns sci.core/copy-ns}}}
-9
View File
@@ -1,9 +0,0 @@
(ns sci.core)
(defmacro copy-ns
([ns-sym sci-ns]
`(copy-ns ~ns-sym ~sci-ns nil))
([ns-sym sci-ns opts]
`[(quote ~ns-sym)
~sci-ns
(quote ~opts)]))
+13 -76
View File
@@ -1,76 +1,13 @@
{:config-paths ["status-im"]
:lint-as {legacy.status-im.utils.views/defview clojure.core/defn
legacy.status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojure.core/let
legacy.status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
utils.re-frame/defn clj-kondo.lint-as/def-catch-all
quo.react/with-deps-check clojure.core/fn
quo.previews.preview/list-comp clojure.core/for
legacy.status-im.utils.styles/def clojure.core/def
legacy.status-im.utils.styles/defn clojure.core/defn
test-helpers.unit/deftest-sub clojure.core/defn
taoensso.tufte/defnp clojure.core/defn}
:linters {:case-duplicate-test {:level :error}
:case-quoted-test {:level :error}
:case-symbol-test {:level :error}
:clj-kondo-config {:level :error}
:cond-else {:level :error}
:consistent-alias {:level :error
:aliases {clojure.set set
clojure.string string
clojure.walk walk
malli.core malli
malli.dev.pretty malli.pretty
malli.dev.virhe malli.virhe
malli.error malli.error
malli.generator malli.generator
malli.transform malli.transform
malli.util malli.util
schema.core schema
taoensso.timbre log}}
:deprecated-namespace {:level :warning}
:docstring-blank {:level :error}
:equals-true {:level :error}
:inline-def {:level :error}
:invalid-arity {:skip-args [legacy.status-im.utils.fx/defn
utils.re-frame/defn]}
:loop-without-recur {:level :error}
:minus-one {:level :error}
:misplaced-docstring {:level :error}
:missing-body-in-when {:level :error}
:missing-clause-in-try {:level :error}
:missing-else-branch {:level :error}
:not-empty? {:level :error}
:plus-one {:level :error}
:redundant-do {:level :error}
:redundant-let {:level :error}
:refer-all {:level :error}
:shadowed-var {:level :error
;; We temporarily use :include to define an
;; allowlist of core Clojure vars. In the
;; future, as we progressively fix shadowed
;; vars, we should be able to delete this
;; option and lint all vars.
:exclude [type name]}
:single-operand-comparison {:level :error}
:syntax {:level :error}
:unbound-destructuring-default {:level :error}
:uninitialized-var {:level :error}
:unknown-require-option {:level :error}
:unreachable-code {:level :error}
:unresolved-namespace {:level :error}
;; TODO remove number when this is fixed
;; https://github.com/borkdude/clj-kondo/issues/867
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY
number
legacy.status-im.test-helpers/restore-app-db]}
:unresolved-var {:level :error}
:unsorted-required-namespaces {:level :error}
:unused-alias {:level :warning}
:unused-binding {:level :error}
:unused-import {:level :error}
:unused-namespace {:level :error}
:unused-private-var {:level :error}
:unused-referred-var {:level :error}
:use {:level :error}}
:config-in-ns {mocks.js-dependencies {:linters {:clojure-lsp/unused-public-var {:level :off}}}}}
{:lint-as {status-im.utils.views/defview clojure.core/defn
status-im.utils.views/letsubs clojure.core/let
reagent.core/with-let clojkure.core/let
status-im.utils.fx/defn clj-kondo.lint-as/def-catch-all
quo.react/with-deps-check clojure.core/fn
quo.previews.preview/list-comp clojure.core/for
status-im.utils.styles/def clojure.core/def
status-im.utils.styles/defn clojure.core/defn
taoensso.tufte/defnp clojure.core/defn}
:linters {:invalid-arity {:skip-args [status-im.utils.fx/defn]}
;;TODO remove number when this is fixed
;;https://github.com/borkdude/clj-kondo/issues/867
:unresolved-symbol {:exclude [PersistentPriorityMap.EMPTY number]}}}
-2
View File
@@ -1,2 +0,0 @@
{:lint-as {malli.experimental/defn schema.core/defn}
:linters {:unresolved-symbol {:exclude [(malli.core/=>)]}}}
@@ -1,4 +0,0 @@
{:linters
{:unresolved-symbol
{:exclude [(cljs.test/is [match? thrown-match?])
(clojure.test/is [match? thrown-match?])]}}}
@@ -1,5 +0,0 @@
{:lint-as
{rewrite-clj.zip/subedit-> clojure.core/->
rewrite-clj.zip/subedit->> clojure.core/->>
rewrite-clj.zip/edit-> clojure.core/->
rewrite-clj.zip/edit->> clojure.core/->>}}
-8
View File
@@ -1,8 +0,0 @@
{:hooks
{:analyze-call
{utils.i18n/label utils.i18n/label
test-helpers.component/get-all-by-translation-text utils.i18n/label
test-helpers.component/get-by-translation-text utils.i18n/label
test-helpers.component/query-all-by-translation-text utils.i18n/label
test-helpers.component/query-by-translation-text utils.i18n/label}}
:linters {:status-im.linter/invalid-translation-keyword {:level :error}}}
-26
View File
@@ -1,26 +0,0 @@
(ns utils.i18n
(:require [clj-kondo.hooks-api :as hooks]))
(defn label
"Verify call to `utils.i18n/label` pass the translation keyword qualified with `t`."
[{:keys [node]}]
(let [[_ translation-key-node & _] (:children node)]
(when (and (hooks/keyword-node? translation-key-node)
(not= "t" (-> translation-key-node hooks/sexpr namespace)))
(hooks/reg-finding! (assoc (meta translation-key-node)
:message "Translation keyword should be qualified with \"t\""
:type :status-im.linter/invalid-translation-keyword)))))
(comment
;; Valid
(label {:node (hooks/parse-string "(i18n/label :t/foo {:var \"hello\"})")
:cljc false
:lang :cljs
:filename ""
:config {}
:ns ""
:context nil})
;; Invalid
(label {:node (hooks/parse-string "(i18n/label :foo)")})
)
-1
View File
@@ -1 +0,0 @@
{:hooks {:analyze-call {taoensso.encore/defalias taoensso.encore/defalias}}}
@@ -1,16 +0,0 @@
(ns taoensso.encore
(:require
[clj-kondo.hooks-api :as hooks]))
(defn defalias [{:keys [node]}]
(let [[sym-raw src-raw] (rest (:children node))
src (if src-raw src-raw sym-raw)
sym (if src-raw
sym-raw
(symbol (name (hooks/sexpr src))))]
{:node (with-meta
(hooks/list-node
[(hooks/token-node 'def)
(hooks/token-node (hooks/sexpr sym))
(hooks/token-node (hooks/sexpr src))])
(meta src))}))
+5 -8
View File
@@ -2,9 +2,10 @@ CACHED_WEBVIEWS_ENABLED=1
DEBUG_WEBVIEW=1
DEFAULT_NETWORK=mainnet_rpc
DEV_BUILD=1
ERC20_CONTRACT_WARNINGS=0
ETHEREUM_DEV_CLUSTER=1
EXTENSIONS=0
FLEET=status.prod
FLEET=eth.prod
GROUP_CHATS_ENABLED=1
LOG_LEVEL=info
MAILSERVER_CONFIRMATIONS_ENABLED=1
@@ -21,16 +22,12 @@ STATUS_GO_ENABLE_NIMBUS=0
KEYCARD_TEST_MENU=0
QR_READ_TEST_MENU=1
ENABLE_ROOT_ALERT=1
ENABLE_REFERRAL_INVITE=1
ENABLE_QUO_PREVIEW=1
MAX_IMAGES_BATCH=5
APN_TOPIC=im.status.ethereum.pr
COMMUNITIES_ENABLED=1
DATABASE_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1
COLLECTIBLES_ENABLED=1
COMMANDS_ENABLED=1
TWO_MINUTES_SYNCING=1
SWAP_ENABLED=1
STICKERS_TEST_ENABLED=1
LOCAL_PAIRING_ENABLED=1
TEST_STATEOFUS=1
FAST_CREATE_COMMUNITY_ENABLED=1
+9 -9
View File
@@ -1,10 +1,11 @@
DEBUG_WEBVIEW=1
DEFAULT_NETWORK=goerli_rpc
DEFAULT_NETWORK=testnet_rpc
ERC20_CONTRACT_WARNINGS=1
ETHEREUM_DEV_CLUSTER=1
EXTENSIONS=0
FLEET=status.prod
FLEET=eth.staging
GROUP_CHATS_ENABLED=1
LOG_LEVEL=debug
LOG_LEVEL=info
MAILSERVER_CONFIRMATIONS_ENABLED=0
PAIRING_POPUP_DISABLED=1
PFS_ENCRYPTION_ENABLED=1
@@ -21,15 +22,14 @@ COMMANDS_ENABLED=1
KEYCARD_TEST_MENU=1
QR_READ_TEST_MENU=1
ENABLE_ROOT_ALERT=0
ENABLE_REFERRAL_INVITE=1
MAX_IMAGES_BATCH=5
APN_TOPIC=im.status.ethereum.pr
VERIFY_TRANSACTION_CHAIN_ID=5
VERIFY_ENS_CHAIN_ID=5
VERIFY_TRANSACTION_CHAIN_ID=3
VERIFY_ENS_CHAIN_ID=3
TEST_STATEOFUS=1
DATABASE_MANAGEMENT_ENABLED=1
COMMUNITIES_ENABLED=1
COMMUNITIES_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1
TWO_MINUTES_SYNCING=1
STICKERS_TEST_ENABLED=1
LOCAL_PAIRING_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=1
+10 -10
View File
@@ -1,11 +1,12 @@
CACHED_WEBVIEWS_ENABLED=1
DEBUG_WEBVIEW=1
DEFAULT_NETWORK=goerli_rpc
DEFAULT_NETWORK=testnet_rpc
ERC20_CONTRACT_WARNINGS=0
ETHEREUM_DEV_CLUSTER=1
EXTENSIONS=0
FLEET=status.prod
FLEET=eth.prod
GROUP_CHATS_ENABLED=1
LOG_LEVEL=debug
LOG_LEVEL=info
MAILSERVER_CONFIRMATIONS_ENABLED=1
MAINNET_WARNING_ENABLED=1
PFS_ENCRYPTION_ENABLED=1
@@ -20,18 +21,17 @@ STATUS_GO_ENABLE_NIMBUS=0
COMMANDS_ENABLED=1
KEYCARD_TEST_MENU=0
ENABLE_ROOT_ALERT=1
ENABLE_REFERRAL_INVITE=1
DISABLE_WALLET_ON_MOBILE_NETWORK=1
APN_TOPIC=im.status.ethereum.pr
VERIFY_TRANSACTION_CHAIN_ID=5
VERIFY_ENS_CHAIN_ID=5
VERIFY_TRANSACTION_CHAIN_ID=3
VERIFY_ENS_CHAIN_ID=3
TEST_STATEOFUS=1
BLANK_PREVIEW=0
MAX_IMAGES_BATCH=5
GOOGLE_FREE=0
DATABASE_MANAGEMENT_ENABLED=1
COMMUNITIES_ENABLED=1
COMMUNITIES_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1
TWO_MINUTES_SYNCING=1
ENABLE_QUO_PREVIEW=1
STICKERS_TEST_ENABLED=1
LOCAL_PAIRING_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=1
+5 -3
View File
@@ -1,8 +1,9 @@
DEBUG_WEBVIEW=1
DEFAULT_NETWORK=mainnet_rpc
ERC20_CONTRACT_WARNINGS=0
ETHEREUM_DEV_CLUSTER=1
EXTENSIONS=0
FLEET=status.prod
FLEET=eth.prod
GROUP_CHATS_ENABLED=1
LOG_LEVEL=info
MAILSERVER_CONFIRMATIONS_ENABLED=1
@@ -12,13 +13,14 @@ PFS_TOGGLE_VISIBLE=1
POW_TARGET=0.002
POW_TIME=1
SNOOPY=0
KEYCARD_TEST_MENU=0
RPC_NETWORKS_ONLY=0
PARTITIONED_TOPIC=0
CONTRACT_NODES=1
ENABLE_ROOT_ALERT=1
ENABLE_REFERRAL_INVITE=0
MAX_IMAGES_BATCH=5
BLANK_PREVIEW=0
COMMUNITIES_ENABLED=1
DATABASE_MANAGEMENT_ENABLED=1
METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=0
+4 -3
View File
@@ -1,8 +1,9 @@
DEBUG_WEBVIEW=0
DEFAULT_NETWORK=mainnet_rpc
ERC20_CONTRACT_WARNINGS=0
ETHEREUM_DEV_CLUSTER=0
EXTENSIONS=0
FLEET=status.prod
FLEET=eth.prod
GROUP_CHATS_ENABLED=1
LOG_LEVEL=
MAILSERVER_CONFIRMATIONS_ENABLED=1
@@ -12,11 +13,11 @@ PFS_TOGGLE_VISIBLE=0
POW_TARGET=0.002
POW_TIME=1
SNOOPY=0
KEYCARD_TEST_MENU=0
RPC_NETWORKS_ONLY=1
PARTITIONED_TOPIC=0
ENABLE_ROOT_ALERT=1
MAX_IMAGES_BATCH=1
ENABLE_REFERRAL_INVITE=0
METRICS_ENABLED=0
DELETE_MESSAGE_ENABLED=1
COLLECTIBLES_ENABLED=1
FAST_CREATE_COMMUNITY_ENABLED=0
+1 -1
View File
@@ -1 +1 @@
layout node
layout node
+3 -3
View File
@@ -1,4 +1,4 @@
module.exports = {
root: true,
extends: '@react-native',
};
root: true,
extends: '@react-native-community',
};
+1 -1
View File
@@ -43,4 +43,4 @@ As a <user|developer|...>, I want to <task> so that <goal>.
[comment]: # (if on Android please replicate bug whilst running adb logcat)
```
...
```
```
+5 -4
View File
@@ -1,8 +1,8 @@
---
name: MVPBug Report
about: MVPBug Report
name: Bug Report
about: Bug Report
title: ''
labels: 'E:Mobile Bug MVP'
labels: bug
assignees: ''
---
@@ -22,7 +22,8 @@ assignees: ''
### Reproduction
1.
1) Open Status
2)
### Additional Information
+16 -17
View File
@@ -10,7 +10,7 @@ Issue to manage mobile release <version>
### Scope
[comment]: # (Add milestone from github)
https://github.com/status-im/status-mobile/milestone/
https://github.com/status-im/status-react/milestone/
- release notes:
- release branch:
@@ -27,11 +27,11 @@ Upgrade (e2e):
### Process
#### 1) Kick-off
- [ ] 1. Translation PRs is merged before cutting branch (Jinho)
- [ ] 2. Prepare scope of visible changes based on commits history, started from previous release branch cut ([guide](https://notes.status.im/how-to-prepare-release-notes))
- [ ] 3. Update [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) with release notes (make PR based on previous step)
- [ ] 4. Create release branch using this [guide](https://github.com/status-im/status-mobile/blob/develop/doc/RELEASE_GUIDE.md), bump VERSION (merge created PR ([example](https://github.com/status-im/status-mobile/pull/12504) ) to develop) and get successful release builds (so, testing can be started)
- [ ] 2. Prepare scope of visible changes based on commits history, started from previous release branch cut ([example]( https://notes.status.im/1.14-release-notes?view))
- [ ] 3. Update [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) with release notes (make PR based on previous step)
- [ ] 4. Create release branch using this [guide](https://github.com/status-im/status-react/blob/develop/doc/RELEASE_GUIDE.md), bump VERSION (merge created PR ([example](https://github.com/status-im/status-react/pull/12504) ) to develop) and get successful release builds (so, testing can be started)
- [ ] 5. Based on release scope, ask for comms (Jonny)
- [ ] 6. Make sure that assets (screenshots, video) in stores are up-to-date, more info [here](https://notes.status.im/how-to-update-assets)
- [ ] 6. Make sure that assets (screenshots, video) in stores are up to date. If should be updated, ask @cammellos for help
#### 2) Testing
[comment]: # (Section will be maintained by QA)
@@ -53,15 +53,14 @@ Upgrade (e2e):
#### 3) Submission
- [ ] 1. Prepare PR for F-droid build ([instruction]( https://github.com/status-im/status-mobile/blob/develop/doc/FDROID.md))
- [ ] 2. Release notes written and added (500 character limit for updates (Android) and PR for [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) is ready to be merged (from 1.3 step)
- [ ] 3. Submit beta version for Android (Open Testing in Play Store)
- [ ] 4. Submit iOS build to Apple review ([instruction](https://drive.google.com/file/d/10Cl7PBB7TFPkZiVbfzdFGpfMRP9bxXuq/view?usp=sharing), be careful - low quality of audio)
- [ ] 5. Play store content reviewed and updated
- [ ] 6. Privacy policy reviewed and updated (ask in channel)
- [ ] 7. Countries to be excluded (ask in channel)
- [ ] 8. Changes to our FAQ made (should be checked and if any changes needed, ask Jakub to made them)
- [ ] 1. Release notes written and added (500 character limit for updates (Android) and PR for [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) is ready to be merged (from 1.3 step)
- [ ] 2. Submit beta version for Android (Open Testing in Play Store)
- [ ] 3. Submit iOS build to Apple review ([instruction](https://drive.google.com/file/d/10Cl7PBB7TFPkZiVbfzdFGpfMRP9bxXuq/view?usp=sharing), be careful - low quality of audio)
- [ ] 4. Play store content reviewed and updated
- [ ] 5. Privacy policy reviewed and updated (ask in channel)
- [ ] 6. Countries to be excluded (ask in channel)
- [ ] 7. Changes to our FAQ made (should be checked and if any changes needed, ask Jakub to made them)
- [ ] 8. Prepare PR for F-droid build ([instruction]( https://github.com/status-im/status-react/blob/develop/doc/FDROID.md))
#### 4) Before publishing
- [ ] 1. Translations for comms available (marketing, ask in the channel)
@@ -69,9 +68,9 @@ Upgrade (e2e):
- [ ] 3. Upload builds for DO store, https://dev.status.im/ (Jakub)
#### 5) At time of publishing
- [ ] 1. Notify marketing to push comms and blog post (Jonny + get review on blog from QA team)
- [ ] 1. Notify marketing to push comms and blog post (Jonny)
- [ ] 2. Publish release to app store and playstore
- [ ] 3. Final push to update prod site https://status.im/, [instructions](https://github.com/status-im/infra-docs/blob/master/articles/status_release_upload.md) (Jakub - requires credentials to upload)
- [ ] 4. Add the link to the post about the release and publish the release: https://github.com/status-im/status-mobile/releases (Jakub)
- [ ] 5. Merge PR for updating [RELEASES.md](https://github.com/status-im/status-mobile/blob/develop/RELEASES.md) (from 1.3 step)
- [ ] 4. Add the link to the post about the release and publish the release: https://github.com/status-im/status-react/releases (Jakub)
- [ ] 5. Merge PR for updating [RELEASES.md](https://github.com/status-im/status-react/blob/develop/RELEASES.md) (from 1.3 step)
-30
View File
@@ -1,30 +0,0 @@
---
name: Wont fix Report
about: to facilitate future handling, identify and address non-urgent issues that won't be prioritized in the near future
title: ''
labels: likely_wont_fix
assignees: ''
---
## Problem
#### Expected behavior
#### Actual behavior
### Reproduction
1.
### Additional Information
- Status version: release
- Operating System: Android, iOS
[comment]: # (Please, add logs/notes if necessary)
-6
View File
@@ -63,10 +63,4 @@ Documentation change PR (review please): https://github.com/status-im/status.im/
<!-- (PRs will only be accepted if squashed into single commit.) -->
### Before and after screenshots comparison
| Figma (if available) | iOS (if available) | Android (if available)
| --- | --- | --- |
| Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. | Please embed Image/Video here of the before and after. |
status: ready <!-- Can be ready or wip -->
+2 -2
View File
@@ -9,8 +9,8 @@ project-board:
test-column-name: 'E2E Tests'
automated-tests:
repo-full-name: 'status-im/status-mobile'
job-full-name: 'status-mobile/e2e/status-app-prs'
repo-full-name: 'status-im/status-react'
job-full-name: 'end-to-end-tests/status-app-prs'
kickoff-column-name: 'E2E Tests'
github-team:
+17
View File
@@ -0,0 +1,17 @@
name: Zenhub integration assigned
on:
issues:
types:
- assigned
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: status-im/zenhub-automations@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENHUB_API_KEY: ${{ secrets.ZENHUB_TOKEN }}
INPROG_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyODI1Mg
NEXT_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyNzk2MQ
REVIEW_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzIyNjk0MTA
+15
View File
@@ -0,0 +1,15 @@
name: Zenhub integration branch
on:
create:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: status-im/zenhub-automations@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENHUB_API_KEY: ${{ secrets.ZENHUB_TOKEN }}
INPROG_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyODI1Mg
NEXT_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyNzk2MQ
REVIEW_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzIyNjk0MTA
+17
View File
@@ -0,0 +1,17 @@
name: Zenhub integration milestoned
on:
issues:
types:
- milestoned
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: status-im/zenhub-automations@master
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENHUB_API_KEY: ${{ secrets.ZENHUB_TOKEN }}
INPROG_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyODI1Mg
NEXT_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyNzk2MQ
REVIEW_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzIyNjk0MTA
+20
View File
@@ -0,0 +1,20 @@
name: Zenhub integration PR
on:
pull_request:
branches: [ develop ]
types:
- ready_for_review
- opened
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: status-im/zenhub-automations@master
if: github.event.pull_request.draft == false
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENHUB_API_KEY: ${{ secrets.ZENHUB_TOKEN }}
INPROG_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyODI1Mg
NEXT_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzMyNzk2MQ
REVIEW_COLUMN: Z2lkOi8vcmFwdG9yL1BpcGVsaW5lLzIyNjk0MTA
+5 -30
View File
@@ -7,8 +7,6 @@
# Xcode
#
/ios/.xcode.env.local
/component-spec
result/
build/
*.pbxuser
@@ -36,17 +34,13 @@ project.xcworkspace
**/android/.project
**/android/.settings/org.eclipse.buildship.core.prefs
local.properties
*.hprof
.cxx/
*.keystore
!debug.keystore
# Atom
.tags*
# VS Code
.vscode/
workspace.code-workspace
.vscode/ipch/
.vscode/settings.json
# node.js
#
@@ -101,12 +95,12 @@ doo-index.html
# Status
Statusgo.framework
Statusgo.xcframework
#ios
/ios/Pods/
/ios/logs/
/ios/StatusIm.xcworkspace
/ios/react-native-xcode.log
/ios/set_xcode_version.log
.ruby-version
status-e2e/
@@ -174,23 +168,4 @@ project.clj
##appium
test/appium/report/
result.xml
test/appium/tests/users.py
##node bindings
/bin/
/lib/
## visual tests
/artifacts
/.calva/
## component-tests
*.log
## local xcode env introduced in react-native 0.69
.xcode.env.local
## git hooks
lefthook.yml
result.xml
-1
View File
@@ -1 +0,0 @@
{:clean {:ns-inner-blocks-indentation :keep}}
+4 -4
View File
@@ -1,10 +1,10 @@
{
"include": [
"target/test/legacy/status_im/**"
"target/test/status_im/**"
],
"exclude": [
"target/test/legacy/status_im/test/**",
"target/test/legacy/status_im/ui/**"
"target/test/status_im/test/**",
"target/test/status_im/ui/**"
],
"report-dir": "./coverage-report",
"all": true,
@@ -14,4 +14,4 @@
"exclude-after-remap": false,
"extension": [".js"],
"reporter": ["lcovonly"]
}
}
-10
View File
@@ -1,10 +0,0 @@
*
!*.js
!*/
*.clj-kondo
*.shadow-cljs
modules
result
target
component-spec
/app
+5 -8
View File
@@ -1,9 +1,6 @@
module.exports = {
arrowParens: 'always',
printWidth: 120,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'all',
useTabs: false,
};
bracketSpacing: false,
jsxBracketSameLine: true,
singleQuote: true,
trailingComma: 'all',
};
-12
View File
@@ -1,12 +0,0 @@
{
"editor.formatOnSave": true,
"clojure.format.enable": false,
"[clojure]": {
"editor.defaultFormatter": "rflagreca.vscode-clj-zprint"
},
"vscode-clj-zprint.IgnoreExternalFiles": false,
"vscode-clj-zprint.CommunityFormatting": false,
"vscode-clj-zprint.OptionsMap": "",
"vscode-clj-zprint.width": "",
"vscode-clj-zprint.Styles.UseOnlyTheseStyles": false
}
+10
View File
@@ -0,0 +1,10 @@
{
"files.associations": {
"*.android": "groovy",
"*.ios": "groovy",
"*.linux": "groovy",
"*.macos": "groovy",
"*.windows": "groovy",
"*.nix-cache": "groovy",
},
}
-60
View File
@@ -1,60 +0,0 @@
;; -*- mode: clojure -*-
;; vi: ft=clojure
{:width 105
:remove {:fn-force-nl #{:noarg1-body}}
:style
[;; community style https://github.com/kkinnear/zprint/blob/main/doc/reference.md#community
:community
;; no comma in map
:no-comma
:custom-justify
;; respect all newlines https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-nl
:respect-nl
;; respect blank line https://github.com/kkinnear/zprint/blob/main/doc/reference.md#respect-bl
:respect-bl
;; hang multiline left-hand-thing https://github.com/kkinnear/zprint/issues/273
:multi-lhs-hang]
:fn-map
{"reg-sub" :arg1-pair
"h/describe" :arg1-body
"h/describe-skip" :arg1-body
"h/describe-only" :arg1-body
"h/test" :arg1-body
"h/test-skip" :arg1-body
"h/test-only" :arg1-body
"global.describe" :arg1-body
"global.test" :arg1-body
"list-comp" :binding
"defview" :arg1-body
"letsubs" :binding
"with-let" "let"
"reg-event-fx" :arg1-pair
"reg-fx" :arg1-pair
"testing" :arg1-body
"deftest-sub" :arg1-body
"wait-for" :arg1-body
"with-deps-check" :arg1-body
"schema/=>" :arg1-body
"->" [:noarg1-body
{:list {:constant-pair? false :force-nl? false}
:next-inner-restore [[:list :constant-pair?]]}]
"set!" "reset!"
"assoc-when" "assoc"
"assoc-some" "assoc"
"conj-when" "conj"
"conj-some" "conj"}
:style-map
{:no-comma {:map {:comma? false}}
:custom-justify
{:doc "Justify everything using pre-1.1.2 approach"
:binding {:justify? true :justify {:max-variance 1000}}
:map {:justify? true :justify {:max-variance 1000}}
:pair {:justify? true :justify {:max-variance 1000}}}}}
+83 -196
View File
@@ -1,4 +1,4 @@
.PHONY: nix-add-gcroots clean nix-clean run-metro test release _list _fix-node-perms _tmpdir-rm
.PHONY: nix-add-gcroots clean nix-clean run-metro test release _list _fix-node-perms _tmpdir-mk _tmpdir-rm
help: SHELL := /bin/sh
help: ##@other Show this help
@@ -14,17 +14,17 @@ WHITE := $(shell tput -Txterm setaf 7)
YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
HELP_FUN = \
%help; \
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
for (sort keys %help) { \
print "${WHITE}$$_:${RESET}\n"; \
for (@{$$help{$$_}}) { \
$$sep = " " x (32 - length $$_->[0]); \
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
}; \
print "\n"; \
}
%help; \
while(<>) { push @{$$help{$$2 // 'options'}}, [$$1, $$3] if /^([a-zA-Z\-]+)\s*:.*\#\#(?:@([a-zA-Z\-]+))?\s(.*)$$/ }; \
print "Usage: make [target]\n\nSee STARTING_GUIDE.md for more info.\n\n"; \
for (sort keys %help) { \
print "${WHITE}$$_:${RESET}\n"; \
for (@{$$help{$$_}}) { \
$$sep = " " x (32 - length $$_->[0]); \
print " ${YELLOW}$$_->[0]${RESET}$$sep${GREEN}$$_->[1]${RESET}\n"; \
}; \
print "\n"; \
}
HOST_OS := $(shell uname | tr '[:upper:]' '[:lower:]')
# This can come from Jenkins
@@ -32,26 +32,19 @@ ifndef BUILD_TAG
export BUILD_TAG := $(shell git rev-parse --short HEAD)
endif
# We don't want to use /run/user/$UID because it runs out of space too easilly.
export TMPDIR = /tmp/tmp-status-mobile-$(BUILD_TAG)
# This has to be specified for both the Node.JS server process and the Qt process.
# We don't want to use /run/user/$UID because it runs out of space too easilly
export TMPDIR = /tmp/tmp-status-react-$(BUILD_TAG)
# this has to be specified for both the Node.JS server process and the Qt process
export REACT_SERVER_PORT ?= 5001
# Fix for ERR_OSSL_EVP_UNSUPPORTED error.
export NODE_OPTIONS += --openssl-legacy-provider
# The path can be anything, but home is usually safest.
export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
# Our custom config is located in nix/nix.conf
export NIX_USER_CONF_FILES = $(PWD)/nix/nix.conf
export NIX_CONF_DIR = $(PWD)/nix
# Location of symlinks to derivations that should not be garbage collected
export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-mobile
export _NIX_GCROOTS = /nix/var/nix/gcroots/per-user/$(USER)/status-react
# Defines which variables will be kept for Nix pure shell, use semicolon as divider
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,\
BUILD_TYPE,BUILD_NUMBER,COMMIT_HASH,\
ANDROID_GRADLE_OPTS,ANDROID_ABI_SPLIT,ANDROID_ABI_INCLUDE,\
STATUS_GO_SRC_OVERRIDE,STATUS_GO_IPFS_GATEWAY_URL
export _NIX_KEEP ?= TMPDIR,BUILD_ENV,STATUS_GO_SRC_OVERRIDE,NIMBUS_SRC_OVERRIDE
# Useful for Android release builds
# Useful for Andoird release builds
TMP_BUILD_NUMBER := $(shell ./scripts/version/gen_build_no.sh | cut -c1-10)
# MacOS root is read-only, read nix/README.md for details
@@ -64,10 +57,13 @@ endif
# Nix targets
#----------------
# WARNING: This has to be located right before all the targets.
# WARNING: This has to be located right before the targets
ifdef IN_NIX_SHELL
SHELL := env bash
else
SHELL := ./nix/scripts/shell.sh
endif
shell: export TARGET ?= default
shell: ##@prepare Enter into a pre-configured shell
ifndef IN_NIX_SHELL
@ENTER_NIX_SHELL
@@ -84,16 +80,12 @@ nix-gc-protected:
@echo -e "$(YELLOW)The following paths are protected:$(RESET)" && \
ls -1 $(_NIX_GCROOTS) | sed 's/^/ - /'
nix-upgrade: SHELL := /bin/sh
nix-upgrade: ##@nix Upgrade Nix interpreter to current version.
nix/scripts/upgrade.sh
nix-gc: export TARGET := nix
nix-gc: nix-gc-protected ##@nix Garbage collect all packages older than 20 days from /nix/store
nix-store --gc
nix-clean: export TARGET := default
nix-clean: ##@nix Remove all status-mobile build artifacts from /nix/store
nix-clean: ##@nix Remove all status-react build artifacts from /nix/store
nix/scripts/clean.sh
nix-purge: SHELL := /bin/sh
@@ -108,7 +100,7 @@ nix-update-clojure: export TARGET := clojure
nix-update-clojure: ##@nix Update maven Nix expressions based on current clojure setup
nix/deps/clojure/generate.sh
nix-update-gems: export TARGET := fastlane
nix-update-gems: export TARGET := default
nix-update-gems: ##@nix Update Ruby gems in fastlane/Gemfile.lock and fastlane/gemset.nix
fastlane/update.sh
@@ -125,22 +117,16 @@ _fix-node-perms: ##@prepare Fix permissions so that directory can be cleaned
$(shell test -d node_modules && chmod -R 744 node_modules)
$(shell test -d node_modules.tmp && chmod -R 744 node_modules.tmp)
$(TMPDIR): SHELL := /bin/sh
$(TMPDIR): ##@prepare Create a TMPDIR for temporary files
_tmpdir-mk: SHELL := /bin/sh
_tmpdir-mk: ##@prepare Create a TMPDIR for temporary files
@mkdir -p "$(TMPDIR)"
# Make sure TMPDIR exists every time make is called
_tmpdir-mk: $(TMPDIR)
-include _tmpdir-mk
_tmpdir-rm: SHELL := /bin/sh
_tmpdir-rm: ##@prepare Remove TMPDIR
rm -fr "$(TMPDIR)"
_install-hooks: SHELL := /bin/sh
_install-hooks: ##@prepare Create prepare-commit-msg git hook symlink
@ln -s -f ../../scripts/hooks/prepare-commit-msg .git/hooks
-include _install-hooks
# Remove directories and ignored files
clean: SHELL := /bin/sh
clean: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
@@ -154,7 +140,7 @@ purge: _fix-node-perms _tmpdir-rm ##@prepare Remove all output folders
watchman-clean: export TARGET := watchman
watchman-clean: ##@prepare Delete repo directory from watchman
watchman watch-del $${STATUS_MOBILE_HOME}
watchman watch-del $${STATUS_REACT_HOME}
pod-install: export TARGET := ios
pod-install: ##@prepare Run 'pod install' to install podfiles and update Podfile.lock
@@ -162,15 +148,14 @@ pod-install: ##@prepare Run 'pod install' to install podfiles and update Podfile
update-fleets: ##@prepare Download up-to-date JSON file with current fleets state
curl -s https://fleets.status.im/ \
| sed 's/"warning": "/"warning": "DO NOT EDIT! /' \
| jq --indent 4 --sort-keys . \
> resources/config/fleets.json
$(KEYSTORE_PATH): export TARGET := keytool
$(KEYSTORE_PATH):
keystore: export TARGET := keytool
keystore: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
keystore: ##@prepare Generate a Keystore for signing Android APKs
@./scripts/generate-keystore.sh
keystore: $(KEYSTORE_PATH) ##@prepare Generate a Keystore for signing Android APKs
fdroid-max-watches: SHELL := /bin/sh
fdroid-max-watches: ##@prepare Bump max_user_watches to avoid ENOSPC errors
sysctl fs.inotify.max_user_watches=524288
@@ -186,7 +171,7 @@ fdroid-fix-tmp: ##@prepare Fix TMPDIR permissions so Vagrant user is the owner
fdroid-build-env: fdroid-max-watches fdroid-nix-dir fdroid-fix-tmp ##@prepare Setup build environment for F-Droud build
fdroid-pr: export TARGET := android-sdk
fdroid-pr: export TARGET := android
fdroid-pr: ##@prepare Create F-Droid release PR
ifndef APK
$(error APK env var not defined)
@@ -203,41 +188,44 @@ xcode-clean: ##@prepare Clean XCode derived data and archives
#----------------
release: release-android release-ios ##@build Build release for Android and iOS
build-fdroid: export BUILD_ENV = prod
build-fdroid: export BUILD_TYPE = release
build-fdroid: export ANDROID_ABI_SPLIT = false
build-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64
build-fdroid: ##@build Build release for F-Droid
@scripts/build-android.sh
build-android: export BUILD_ENV ?= prod
build-android: export BUILD_TYPE ?= nightly
build-android: export BUILD_NUMBER ?= $(TMP_BUILD_NUMBER)
build-android: export ANDROID_ABI_SPLIT ?= false
build-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
build-android: ##@build Build unsigned Android APK
@scripts/build-android.sh
release-android: export TARGET := keytool
release-android: export BUILD_ENV ?= prod
release-android: export BUILD_TYPE ?= nightly
release-android: export BUILD_NUMBER ?= $(TMP_BUILD_NUMBER)
release-android: export KEYSTORE_PATH ?= $(HOME)/.gradle/status-im.keystore
release-android: keystore build-android ##@build Build signed Android APK
@scripts/sign-android.sh result/app-release-unsigned.apk
release-android: export ANDROID_APK_SIGNED ?= true
release-android: export ANDROID_ABI_SPLIT ?= false
release-android: export ANDROID_ABI_INCLUDE ?= armeabi-v7a;arm64-v8a;x86
release-android: keystore ##@build Build release for Android
scripts/release-android.sh
release-fdroid: export BUILD_ENV = prod
release-fdroid: export BUILD_TYPE = release
release-fdroid: export ANDROID_APK_SIGNED = false
release-fdroid: export ANDROID_ABI_SPLIT = false
release-fdroid: export ANDROID_ABI_INCLUDE = armeabi-v7a;arm64-v8a;x86;x86_64
release-fdroid: ##@build Build release for F-Droid
sed -i -e '$$aGOOGLE_FREE=1' .env.release
scripts/release-android.sh
release-ios: export TARGET := ios
release-ios: export IOS_STATUS_GO_TARGETS := ios/arm64
release-ios: export BUILD_ENV ?= prod
release-ios: watchman-clean ios-clean jsbundle ##@build Build release for iOS release
xcodebuild \
-scheme StatusIm \
-configuration Release \
-workspace ios/StatusIm.xcworkspace \
-destination 'generic/platform=iOS' \
-UseModernBuildSystem=N clean archive
release-ios: watchman-clean ##@build Build release for iOS release
@git clean -dxf -f target/ios && \
$(MAKE) jsbundle-ios && \
xcodebuild -workspace ios/StatusIm.xcworkspace -scheme StatusIm -configuration Release -destination 'generic/platform=iOS' -UseModernBuildSystem=N clean archive
jsbundle: SHELL := /bin/sh
jsbundle: export BUILD_ENV ?= prod
jsbundle: ##@build Build JavaScript and Clojurescript bundle for iOS and Android
nix/scripts/build.sh targets.mobile.jsbundle
jsbundle-android: SHELL := /bin/sh
jsbundle-android: export TARGET := android
jsbundle-android: export BUILD_ENV ?= prod
jsbundle-android: ##@jsbundle Compile JavaScript and Clojurescript into app directory
# Call nix-build to build the 'targets.mobile.android.jsbundle' attribute and copy the.js files to the project root
nix/scripts/build.sh targets.mobile.android.jsbundle && \
mv result/* ./
jsbundle-ios: export TARGET := ios
jsbundle-ios: export BUILD_ENV ?= prod
jsbundle-ios: ##@jsbundle Compile JavaScript and Clojure into index.ios.js
yarn shadow-cljs release mobile
#--------------
# status-go lib
@@ -251,10 +239,6 @@ status-go-ios: SHELL := /bin/sh
status-go-ios: ##@status-go Compile status-go for iOS app
nix/scripts/build.sh targets.status-go.mobile.ios
status-go-library: SHELL := /bin/sh
status-go-library: ##@status-go Compile status-go for node-js
nix/scripts/build.sh targets.status-go.library
#--------------
# Watch, Build & Review changes
#--------------
@@ -273,16 +257,11 @@ run-re-frisk: ##@run Start re-frisk server
# TODO: Migrate this to a Nix recipe, much the same way as nix/mobile/android/targets/release-android.nix
run-android: export TARGET := android
# INFO: If it's empty (no devices attached, parsing issues, script error) - for Nix it's the same as not set.
run-android: export ANDROID_ABI_INCLUDE ?= $(shell ./scripts/adb_devices_abis.sh)
run-android: ##@run Build Android APK and start it on the device
npx react-native run-android --appIdSuffix debug
SIMULATOR=iPhone 13
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
SIMULATOR=
run-ios: export TARGET := ios
run-ios: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
run-ios: export XCBeautify=$(shell which xcbeautify) # for react-native-cli to pick this up and to auto format output
run-ios: ##@run Build iOS app and start it in a simulator/device
ifneq ("$(SIMULATOR)", "")
npx react-native run-ios --simulator="$(SIMULATOR)"
@@ -290,151 +269,59 @@ else
npx react-native run-ios
endif
show-ios-devices: ##@other shows connected ios device and its name
xcrun xctrace list devices
# TODO: fix IOS_STATUS_GO_TARGETS to be either amd64 or arm64 when RN is upgraded
run-ios-device: export TARGET := ios
run-ios-device: export IOS_STATUS_GO_TARGETS := ios/arm64;iossimulator/amd64
run-ios-device: ##@run iOS app and start it on a connected device by its name
ifndef DEVICE_NAME
$(error Usage: make run-ios-device DEVICE_NAME=your-device-name)
endif
react-native run-ios --device "$(DEVICE_NAME)"
#--------------
# Tests
#--------------
# Get all clojure files, including untracked, excluding removed
define find_all_clojure_files
$$(comm -23 <(sort <(git ls-files --cached --others --exclude-standard)) <(sort <(git ls-files --deleted)) | grep -E '((\.clj-kondo\/status-im)|(src).*\.clj[sc]?$$)|((\.clj-kondo\/(status-im|config))|(src).*\.edn$$)|shadow-cljs\.edn')
endef
lint: export TARGET := clojure
lint: export CLJ_LINTER_PRINT_WARNINGS ?= false
lint: ##@test Run code style checks
@sh scripts/lint/re-frame-in-quo-components.sh && \
sh scripts/lint/direct-require-component-outside-quo.sh && \
sh scripts/lint/require-i18n-resource-first.sh && \
clj-kondo --config .clj-kondo/config.edn --cache false --fail-level error --lint src $(if $(filter $(CLJ_LINTER_PRINT_WARNINGS),true),,| grep -v ': warning: ') && \
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
scripts/lint/translations.clj && \
zprint '{:search-config? true}' -sfc $$ALL_CLOJURE_FILES && \
sh scripts/lint/trailing-newline.sh && \
node_modules/.bin/prettier --write .
yarn clj-kondo --confg .clj-kondo/config.edn --lint src && \
TARGETS=$$(git diff --diff-filter=d --cached --name-only src && echo src) && \
clojure -Scp "$$CLASS_PATH" -m cljfmt.main check --indents indentation.edn $$TARGETS
# NOTE: We run the linter twice because of https://github.com/kkinnear/zprint/issues/271
lint-fix: export TARGET := clojure
lint-fix: ##@test Run code style checks and fix issues
ALL_CLOJURE_FILES=$(call find_all_clojure_files) && \
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
zprint '{:search-config? true}' -sw $$ALL_CLOJURE_FILES && \
clojure-lsp --ns-exclude-regex ".*/\.clj-kondo/.*|.*/src/status_im/core\.cljs|.*/src/test_helpers/component_tests_preload\.cljs$$" clean-ns && \
sh scripts/lint/trailing-newline.sh --fix && \
node_modules/.bin/prettier --write .
clojure -Scp "$$CLASS_PATH" -m cljfmt.main fix src --indents indentation.edn
shadow-server: export TARGET := clojure
shadow-server:##@ Start shadow-cljs in server mode for watching
yarn shadow-cljs server
_test-clojure: export TARGET := clojure
_test-clojure: export WATCH ?= false
_test-clojure:
ifeq ($(WATCH), true)
yarn install && \
yarn shadow-cljs compile mocks && \
nodemon --exec "yarn shadow-cljs compile test && node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO" -e cljs
else
yarn install && \
test: export TARGET := clojure
test: ##@test Run tests once in NodeJS
yarn shadow-cljs compile mocks && \
yarn shadow-cljs compile test && \
node --require ./test-resources/override.js "$$SHADOW_OUTPUT_TO"
endif
node --require ./test-resources/override.js target/test/test.js
test: export SHADOW_OUTPUT_TO := target/test/test.js
test: export SHADOW_NS_REGEXP := .*-test$$
test: ##@test Run all Clojure tests
test: _test-clojure
test-watch-for-repl: export SHADOW_OUTPUT_TO := target/test/test.js
test-watch-for-repl: export SHADOW_NS_REGEXP := .*-test$$
test-watch-for-repl: ##@test Watch all Clojure tests and support REPL connections
yarn install
rm -f target/test/test.js
yarn shadow-cljs compile mocks && \
concurrently --kill-others --prefix-colors 'auto' --names 'build,repl' \
'yarn shadow-cljs watch test --verbose' \
"until [ -f $$SHADOW_OUTPUT_TO ] ; do sleep 1 ; done ; node --require ./test-resources/override.js $$SHADOW_OUTPUT_TO --repl"
test-unit: export SHADOW_OUTPUT_TO := target/unit_test/test.js
test-unit: export SHADOW_NS_REGEXP := ^(?!status-im\.integration-test).*-test$$
test-unit: ##@test Run unit tests
test-unit: _test-clojure
test-integration: export SHADOW_OUTPUT_TO := target/integration_test/test.js
test-integration: export SHADOW_NS_REGEXP := ^status-im\.integration-test.*$$
test-integration: ##@test Run integration tests
test-integration: _test-clojure
android-test: jsbundle
android-test: export TARGET := android
android-test:
cd android && ./gradlew test
component-test-watch: export TARGET := clojure
component-test-watch: export COMPONENT_TEST := true
component-test-watch: export BABEL_ENV := test
component-test-watch: export JEST_USE_SILENT_REPORTER := false
component-test-watch: ##@ Watch tests and re-run no changes to cljs files
@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
nodemon --exec 'yarn shadow-cljs compile component-test && jest --config=test/jest/jest.config.js --testEnvironment node ' -e cljs
component-test: export TARGET := clojure
component-test: export COMPONENT_TEST := true
component-test: export BABEL_ENV := test
component-test: export JEST_USE_SILENT_REPORTER := false
component-test: ##@test Run component tests once in NodeJS
@scripts/check-metro-shadow-process.sh
rm -rf ./component-spec
yarn shadow-cljs compile component-test && \
jest --clearCache && jest --config=test/jest/jest.config.js --testEnvironment node
coverage: ##@test Run tests once in NodeJS generating coverage
@scripts/run-coverage.sh
#--------------
# Other
#--------------
geth-connect: export TARGET := android-sdk
geth-connect: export TARGET := android-env
geth-connect: ##@other Connect to Geth on the device
adb forward tcp:8545 tcp:8545 && \
build/bin/geth attach http://localhost:8545
ios-clean: SHELL := /bin/sh
ios-clean: ##@prepare Clean iOS build artifacts
git clean -dxf -f target/ios
android-clean: export TARGET := gradle
android-clean: ##@prepare Clean Gradle state
git clean -dxf -f ./android/app/build; \
[[ -d android/.gradle ]] && cd android && ./gradlew clean
android-ports: export TARGET := android-sdk
android-ports: export TARGET := android-env
android-ports: ##@other Add proxies to Android Device/Simulator
adb reverse tcp:8081 tcp:8081 && \
adb reverse tcp:3449 tcp:3449 && \
adb reverse tcp:4567 tcp:4567 && \
adb forward tcp:5561 tcp:5561
android-devices: export TARGET := android-sdk
android-devices: export TARGET := android-env
android-devices: ##@other Invoke adb devices
adb devices
android-logcat: export TARGET := android-sdk
android-logcat: ##@other Read status-mobile logs from Android phone using adb
android-logcat: export TARGET := android-env
android-logcat: ##@other Read status-react logs from Android phone using adb
adb logcat | grep -e RNBootstrap -e ReactNativeJS -e ReactNative -e StatusModule -e StatusNativeLogs -e 'F DEBUG :' -e 'Go :' -e 'GoLog :' -e 'libc :'
android-install: export TARGET := android-sdk
android-install: export TARGET := android-env
android-install: export BUILD_TYPE ?= release
android-install: ##@other Install APK on device using adb
adb install result/app-$(BUILD_TYPE).apk
+32 -33
View File
@@ -2,61 +2,54 @@
[<img src="https://play.google.com/intl/en_us/badges/images/generic/en-play-badge.png" alt="Get it on Google Play" height="80"/>](https://play.google.com/store/apps/details?id=im.status.ethereum)
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80"/>](https://f-droid.org/packages/im.status.ethereum/)
[<img src="doc/github_badge.png" alt="Get it on Github" height="80"/>](https://github.com/status-im/status-react/releases)
[Get it on Github](https://github.com/status-im/status-mobile/releases)
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middlemen and `go-ethereum` running directly on your device.
Join us in creating a browser, messenger, and gateway to a decentralized world. Status is a free (libre) open source mobile client targeting Android & iOS built entirely on [Ethereum](https://ethereum.org/) technologies. That's right, no middle men and `go-ethereum` running directly on your device.
[![Getting started with Status](https://i.imgur.com/C0aZZEL.jpg)](https://www.youtube.com/watch?v=oDCSEmS9c3o "Getting started with Status")
## Why?
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
We believe in a medium of pure free trade, economies with fair, permission-less access and a world without intermediaries. We want to create policies that can exist between friends or scale globally, we want to communicate securely and be uninhibited by legacy systems.
We want to take responsibility for our data, and the way we conduct ourselves privately and promote this way of life to a mass audience.
We want to take responsibility for our data, the way we conduct ourselves privately and promote this way of life to a mass audience.
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provide us with a path forward.
We want deep insights into our own economies so we can make informed, data-driven decisions on how to make our lives better. The Ethereum blockchain, Smart Contracts, Swarm and Whisper provides us a path forward.
If this interests you, **help us make Status a reality** - anyone can contribute and we need everyone at any skill level to participate.
## How to Contribute?
Go straight to the [docs](doc/) and choose what interests you:
Go straight to the [docs](https://status.im/docs) or [join our chat](https://join.status.im/chat/public/status) and choose what interests you:
- **Developer** Developers are the heart of software and to keep Status beating
we need all the help we can get! If you're looking to code in ClojureScript or
Golang then Status is the project for you! We use React Native and there is even
some Java/Objective-C too! Want to learn more about it? Start by reading our
[Developer Introduction](doc/starting-guide.md) which guides you
through the technology stack and start browsing [beginner
issues](https://github.com/status-im/status-mobile/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20).
Then you can read how to [Build
Status](doc/starting-guide.md), which talks about managing
project dependencies, coding guidelines and testing procedures.
Check out our [coding guidelines](doc/new-guidelines.md).
- **Developer**
Developers are the heart of software and to keep Status beating we need all the help we can get! If you're looking to code in ClojureScript or Golang then Status is the project for you! We use React Native and there is even some Java/Objective-C too!
Want to learn more about it? Start by reading our [Developer Introduction](https://status.im/developer_tools/) which guides you through the technology stack and start browsing [beginner issues](https://github.com/status-im/status-react/issues?utf8=%E2%9C%93&q=is%3Aopen%20is%3Aissue%20label%3A%22good%20first%20issue%22%20). Then you can read how to [Build Status](https://status.im/technical/build_status/), which talks about managing project dependencies, coding guidelines and testing procedures.
- **Community Management**
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and the long-lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
- **Community Management**
Metcalfe's law states that the value of a network is proportional to the square of the number of connected users of the system - without community Status is meaningless. We're looking to create a positive, fun environment to explore new ideas, experiment and grow the Status community. Building a community takes a lot of work but the people you'll meet and long lasting relationships you form will be well worth it, check out our [Mission and Community Principles](https://status.im/about)
- **Specification / Documentation**
John Dewey once said, "Education is not preparation for life; education is life *itself* ". Developers and Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, check out our [docs](doc/) and see how you can improve what we have.
- **Specification / Documentation**
John Dewey once said "Education is not preparation for life; education is life *itself* ". Developers & Designers need guidance and it all starts from documentation and specifications. Our software is only as good as its documentation, head over to our [docs](https://status.im/docs) and see how you can improve what we have.
- **Blog Writing**
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page.
- **Blog Writing**
Content is King, keeping our blog up to date and informing the community of news helps keep everyone on the same page. [Jump into our chat](https://join.status.im/chat/public/status) and discuss with the team how you can contribute!
- **Testers**
It's bug-hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](doc/starting-guide.md) or if an android user checks out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-mobile/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
- **Testers**
It's bug hunting season! Status is currently under active development and there is sure to be a bunch of learning, [build status from scratch](https://status.im/technical/build_status/) or if an android user check out our [nightly builds](https://status.im/nightly). You can shake your phone to submit bug reports, or start browsing our [Github Issues](https://github.com/status-im/status-react/issues). Every bug you find brings Status closer to stable, usable software for everyone to enjoy!
- **Security**
- **Security**
Status is a visual interface to make permanent changes on the Blockchain, it handles crypto-tokens that have real value and allows 3rd party code execution. Security is paramount to its success. You are given permission to break Status as hard as you can, as long as you share your findings with the community!
- **Evangelism**
Help us spread the word! Tell a friend *right now*, in fact, tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
- **Evangelism**
Help us spread the word! Tell a friend *right now*, in fact tell **everyone** - yell from a mountain if you have to, every person counts! If you've got a great story to tell or have some interesting way you've spread the word about Status let us know about it in our [chat](https://join.status.im/chat/public/status)
## Status API
View our [API Docs](https://status.im/developer_tools/status_web_api.html) and learn how to integrate your DApp into Status. You can read more about how to add your DApp to Status [here](https://status.im/developer_tools/add_your_dapp.html).
## Give me Binaries!
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/), or by [building it yourself](https://status.im/technical/build_status/).
You can get our Beta builds for both Android and iOS on our [website](https://status.im), through our [nightly builds](https://status.im/nightly/) or by [building it yourself](https://status.im/technical/build_status/).
## Core Contributors
@@ -67,8 +60,14 @@ Without the dedication of these outstanding individuals, Status would not exist.
## Contact us
Feel free to email us at [support@status.im](mailto:support@status.im).
Feel free to email us at [support@status.im](mailto:support@status.im) or better yet, [join our chat](https://join.status.im/chat/public/status).
## License
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-mobile/blob/develop/LICENSE.md)
Licensed under the [Mozilla Public License v2.0](https://github.com/status-im/status-react/blob/develop/LICENSE.md)
## Testing Supported by
[![BrowserStack Status](https://www.browserstack.com/automate/badge.svg?badge_key=SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)](https://www.browserstack.com/automate/public-build/SFBWQ3k5R2tnT2t6UGsxU1h1U0g3VFlCNnoxVTRHYWNoTDhsb1laaTJZWT0tLUZMUm5sSVFBSU9qSWM1RUJvK1I3Z3c9PQ==--ad15ae7992b432b33743749d40318952415bd98f)
[![Coverage Status](https://coveralls.io/repos/github/status-im/status-react/badge.svg?)](https://coveralls.io/github/status-im/status-react)
+125 -282
View File
@@ -1,201 +1,44 @@
## 1.20 Release notes
### Features
* Add session management for wallet connect by @cammellos in https://github.com/status-im/status-mobile/pull/13799
* [#13181] Cannot delete images or audio messages by @flexsurfer in https://github.com/status-im/status-mobile/pull/13210
* [#13230] Show default syncing interval by @rasom in https://github.com/status-im/status-mobile/pull/13234
* Add support for mutual contact requests by @cammellos in https://github.com/status-im/status-mobile/pull/13054
* Implement Information box and ens banner view by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13753
* Profile picture sync by @siphiuel in https://github.com/status-im/status-mobile/commit/fbfab9fd3bdbcfa6cdd9a24a6bce526da8252fd3
### Improvements
* Improve notifications life-cycle by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13248
* Simpledapp on Goerli by @churik in https://github.com/status-im/status-mobile/pull/13732
* Include share action on longpress image menu by @jo-mut in https://github.com/status-im/status-mobile/pull/13359
* fast image loading indicator by @flexsurfer in https://github.com/status-im/status-mobile/pull/13431
* [#13355] Long time (5-15 sec) for loading chat messages by @flexsurfer in https://github.com/status-im/status-mobile/pull/13425
* [Fixes: #13416] resize image in status-go as well, alert user if fails by @cammellos in https://github.com/status-im/status-mobile/pull/13422
* [#12566] Remove legacy dependency on mailserver password by @erikseppanen in https://github.com/status-im/status-mobile/pull/13511
* Wallet sync for generated accounts by @siphiuel in https://github.com/status-im/status-mobile/pull/13487
* feat: lottie splash screen by @yqrashawn in https://github.com/status-im/status-mobile/pull/13714
* [#13647] Update all settings on pairing with a new wallet account by @rasom in https://github.com/status-im/status-mobile/pull/13742
* Improve ethereum.send by @qfrank in https://github.com/status-im/status-mobile/pull/13724
### Redesign
* quo, Switcher Navigation by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13167
* Switcher and Bottom Tabs Animations and UI Performance Improvements by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13470
* feat: add token tag component (#13599) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13644
* [13565] icon-avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13692
* [13562] Wallet user avatar component by @ibrkhalil in https://github.com/status-im/status-mobile/pull/13681
* Reply component in chat input & quoted messages redesign by @briansztamfater in https://github.com/status-im/status-mobile/pull/13706
* Wallet redesign by @flexsurfer in https://github.com/status-im/status-mobile/pull/13172
* [Potential: #13596] Add status-tags component by @cammellos in https://github.com/status-im/status-mobile/pull/13597
* Chat views redesign by @briansztamfater in https://github.com/status-im/status-mobile/pull/13184
* Implementation of React Native Blur view for android by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13663
* feat: add token overview component (status-im#13555) by @J-Son89 in https://github.com/status-im/status-mobile/pull/13767
### Bug Fixes
* fix screen orientation on android by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13218
* Don't unmute contact while adding by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13237
* fix chat image long press issue by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13371
* [#13149] Timeline images stretch off screen by @siddarthkay in https://github.com/status-im/status-mobile/pull/13211
* [#13233] Proper message after clearing history in pubchat by @rasom in https://github.com/status-im/status-mobile/pull/13241
* [#13235] Fix opening of the last shown chat with local notifications by @rasom in https://github.com/status-im/status-mobile/pull/13252
* [#13201] Fix handling of favourits syncing by @rasom in https://github.com/status-im/status-mobile/pull/13253
* [#13257] Fix sync devices sorting by @rasom in https://github.com/status-im/status-mobile/pull/13282
* [#13283] Fix syncing of adding contact after removal by @rasom in https://github.com/status-im/status-mobile/pull/13292
* [#13263] Fix for ENS warning showing on custom domains by @daferna in https://github.com/status-im/status-mobile/pull/13312
* fix can't share deep link from profile on ios by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13420
* Fix sending logs from iOS by @bitgamma in https://github.com/status-im/status-mobile/pull/13619
* fix #13642: Cannot sign in on claim.lens.xyz by @qfrank in https://github.com/status-im/status-mobile/pull/13668
* [#13493] Can not switch to xDai chain by @flexsurfer in https://github.com/status-im/status-mobile/pull/13709
* fix bookmarks not syncing by @Parveshdhull in https://github.com/status-im/status-mobile/pull/13727
* fix: set max option not work when send from qrcode by @yqrashawn in https://github.com/status-im/status-mobile/pull/13733
* [#13835] Fix Generate keys button by @rasom in https://github.com/status-im/status-mobile/pull/13841
* Fix disappearing of the last notification when paired by @rasom in https://github.com/status-im/status-mobile/pull/13796
* [#13766] custom networkid fix by @ flexsurfer in https://github.com/status-im/status-mobile/pull/13765
## New Contributors
* @siddarthkay made their first contribution in https://github.com/status-im/status-mobile/pull/13185
* @daferna made their first contribution in https://github.com/status-im/status-mobile/pull/13312
* @smohamedjavid made their first contribution in https://github.com/status-im/status-mobile/pull/13364
* @ibrkhalil made their first contribution in https://github.com/status-im/status-mobile/pull/13450
* @PEZ made their first contribution in https://github.com/status-im/status-mobile/pull/13494
* @erikseppanen made their first contribution in https://github.com/status-im/status-mobile/pull/13511
* @Rende11 made their first contribution in https://github.com/status-im/status-mobile/pull/13609
* @yqrashawn made their first contribution in https://github.com/status-im/status-mobile/pull/13739
* @ilmotta made their first contribution in https://github.com/status-im/status-mobile/pull/13747
* @phrohdoh made their first contribution in https://github.com/status-im/status-mobile/pull/13772
* @J-Son89 made their first contribution in https://github.com/status-im/status-mobile/pull/13767
**Full Changelog**: https://github.com/status-im/status-mobile/compare/1.19.0...1.20.0
## 1.19 Release notes
### Features
* 💬 Re-open app on the last open chat ([details](https://github.com/status-im/status-mobile/issues/12782))
* 🪙 Support \$UBI token ([details](https://github.com/status-im/status-mobile/issues/12975))
* 🔔 Implementation of remote android notifications ([details](https://github.com/status-im/status-mobile/issues/12866))
* 🔁 Sync clear history on paired devices ([details](https://github.com/status-im/status-mobile/issues/13004))
* 📑 Synchronize browser bookmarks/favorites across devices ([details](https://github.com/status-im/status-mobile/issues/12961))
* 🔕 Add mute option to android ([details](https://github.com/status-im/status-mobile/issues/12890))
* 👛 Wallet Connect 2.0 integration ([details](https://github.com/status-im/status-mobile/issues/12546))
* 💰 Implement Wallet Connect 1.0 ([details](https://github.com/status-im/status-mobile/issues/12870))
* ⚙️ Sync settings ([details](https://github.com/status-im/status-mobile/pull/13053))
### Improvements
* Improve order of mailserver requests ([details](https://github.com/status-im/status-mobile/issues/12783))
* Load images from an https server ([details](https://github.com/status-im/status-mobile/issues/12855))
* Load audio messages from https server ([details](https://github.com/status-im/status-mobile/issues/13116))
* Show message timestamps on tap, remove from bubbles 🕙 ([details](https://github.com/status-im/status-mobile/pull/12915))
* support PUK and seed recovery during onboarding ([details](https://github.com/status-im/status-mobile/pull/12955))
* update react-native-webview ([details](https://github.com/status-im/status-mobile/pull/12987))
* Add group members to mentionable list ([details](https://github.com/status-im/status-mobile/pull/12994))
* always use english for fallback text ([details](https://github.com/status-im/status-mobile/pull/13019))
* Disable chat input for chats with a blocked user ([details](https://github.com/status-im/status-mobile/pull/13162))
* Handle timeouts on mailserver requests ([details](https://github.com/status-im/status-mobile/issues/13022))
* Human Readable data display when signing using eth_signTypedData_v3 ([details](https://github.com/status-im/status-mobile/issues/12535))
### Bug Fixes
* Bug/fix opensea api ([details](https://github.com/status-im/status-mobile/pull/13021))
* Show "Fetch more messages" only in public chats and communities ([details](https://github.com/status-im/status-mobile/pull/12927))
* Chats are not synced if delete and re-add them on the first device while the second device is offline ([details](https://github.com/status-im/status-mobile/issues/12913))
* fix distortion of app theme due to change in system theme ([details](https://github.com/status-im/status-mobile/pull/12934))
* Unable to perform swap on 1inch.exchange if initial swap was cancelled by closing bottom sheet ([details](https://github.com/status-im/status-mobile/issues/12920))
* Error when trying to edit 'per-gas price limit' on 1inch.exchange ([details](https://github.com/status-im/status-mobile/issues/12991))
* Allow adding emoji in status input even if it exceeds limit ([details](https://github.com/status-im/status-mobile/pull/12949))
* Allow adding emoji to group intro message if it exceeds limit ([details](https://github.com/status-im/status-mobile/pull/13024))
* Use higher base fee value for default tx fee calculation ([details](https://github.com/status-im/status-mobile/pull/13020))
* Profile QR code overlaps share menu during sharing (IOS) ([details](https://github.com/status-im/status-mobile/pull/13050))
* No value in 'Gas amount limit' field in NFT dapps ([details](https://github.com/status-im/status-mobile/pull/13051))
* Stop showing fetch more button for cleared history ([details](https://github.com/status-im/status-mobile/pull/13084))
* fix ens resolve issue while following deep link ([details](https://github.com/status-im/status-mobile/pull/13080))
* Fix deadlock on syncing all data ([details](https://github.com/status-im/status-mobile/pull/13128))
* Fix broken username and timestamp layout for long usernames ([details](https://github.com/status-im/status-mobile/pull/13174))
## 1.18.0 Release notes :package:
### Features
* 🚦Online status indicator <https://github.com/status-im/status-mobile/issues/12547>
* 👛 Add possibility to select wallet for ENS names <https://github.com/status-im/status-mobile/pull/12761>
* 🐞 Bug reporting and logs sharing improvements <https://github.com/status-im/status-mobile/pull/12773>
* 🍳 Simplify Keycard onboarding by using defaults for pairing password <https://github.com/status-im/status-mobile/issues/12685>
* 💾 Backup contacts via Waku <https://github.com/status-im/status-mobile/issues/12550>
* 🪙 Added ENS token <https://github.com/status-im/status-mobile/issues/12807>
* 🌠 Using react-native-fast-image for stickers <https://github.com/status-im/status-mobile/pull/12769>
#### Message reliability improvements
* 𝌗 Show loading until all messages are processed <https://github.com/status-im/status-mobile/pull/12834>
* 💪🏼 More robust message confirmations handling <https://github.com/status-im/status-mobile/pull/12824>
* 📶 Allow sending messages when offline <https://github.com/status-im/status-mobile/issues/11889>
#### Improvements on device pairing
* 🔔💻 Notification in activity centre now sync across devices <https://github.com/status-im/status-mobile/issues/12571>
* ✅💻 Sync read messages across devices <https://github.com/status-im/status-mobile/pull/12698>
#### Network settings improvements
* ✨ Add Binance Smart chain <https://github.com/status-im/status-mobile/pull/12809>
* ♏︎ Added custom network symbol <https://github.com/status-im/status-mobile/commit/c16b0860ec921a61c119857de27c6f29e301e4f6>
* 💰 Network fee on xDai chain <https://github.com/status-im/status-mobile/pull/12845>
* 📇 Support tx history (in a way) when on BSC chains <https://github.com/status-im/status-mobile/pull/12843>
* 🙅🏻 Remove POA network from the list <https://github.com/status-im/status-mobile/pull/12887>
### Bug Fixes
* Fix activity center community invite preview <https://github.com/status-im/status-mobile/pull/12803>
* Missing notifications for some contacts <https://github.com/status-im/status-mobile/issues/12776>
* Fixes scrolling issues on the 'Max priority fee' bottom sheet <https://github.com/status-im/status-mobile/issues/12530>
* Handle Keycard timeout on iOS 15 <https://github.com/status-im/status-mobile/pull/12826>
* Allow user to be reinvited to the same group after leaving <https://github.com/status-im/status-mobile/pull/12814>
* Fix for "TypeError: Network request failed" when switching to Goerli network <https://github.com/status-im/status-mobile/issues/11964>
* Fix for Spin of death on adding custom NFT token contract <https://github.com/status-im/status-mobile/issues/12365>
* Changing screen orientation results in breaking images / layout <https://github.com/status-im/status-mobile/issues/12858>
## 1.17
### For iOS and Android
### Features
- 🖼️ Add ability to Share image from Status ([details](https://github.com/status-im/status-mobile/pull/12528))
- 🕵️ Private Profile Photos ([details](https://github.com/status-im/status-mobile/pull/11768))
- 🥥 Custom Emoji Thumbnails for Community Channels ([details](https://github.com/status-im/status-mobile/pull/12594))
- 🔄 Sync deleted chats ([details](https://github.com/status-im/status-mobile/pull/12662))
- 🔃 Sync removed/deleted/blocked contacts ([details](https://github.com/status-im/status-mobile/pull/12541))
- 💸 Allow overriding nonce when sending transaction ([details](https://github.com/status-im/status-mobile/pull/12679))
- 🗑️ Delete messages ([details](https://github.com/status-im/status-mobile/pull/12390))
- 🎨 NFT Support via OpenSea ([details](https://github.com/status-im/status-mobile/pull/12485))
- 🤳🏻 Enable collectibles and NFT as profile picture ([details](https://github.com/status-im/status-mobile/pull/12615))
- 🖼️ Add ability to Share image from Status ([details](https://github.com/status-im/status-react/pull/12528))
- 🕵️ Private Profile Photos ([details](https://github.com/status-im/status-react/pull/11768))
- 🥥 Custom Emoji Thumbnails for Community Channels ([details](https://github.com/status-im/status-react/pull/12594))
- 🔄 Sync deleted chats ([details](https://github.com/status-im/status-react/pull/12662))
- 🔃 Sync removed/deleted/blocked contacts ([details](https://github.com/status-im/status-react/pull/12541))
- 💸 Allow overriding nonce when sending transaction ([details](https://github.com/status-im/status-react/pull/12679))
- 🗑️ Delete messages ([details](https://github.com/status-im/status-react/pull/12390))
- 🎨 NFT Support via OpenSea ([details](https://github.com/status-im/status-react/pull/12485))
- 🤳🏻 Enable collectibles and NFT as profile picture ([details](https://github.com/status-im/status-react/pull/12615))
### Improvements
- Move pull to refresh to the account overview screen ([details](https://github.com/status-im/status-mobile/pull/12479))
- Add $RARE token to our default list ([details](https://github.com/status-im/status-mobile/pull/12521))
- Small UI Design Improvements ([details](https://github.com/status-im/status-mobile/pull/12544))
- Chats list performance ([details](https://github.com/status-im/status-mobile/pull/12554))
- Add push notification on group chat invite ([details](https://github.com/status-im/status-mobile/pull/12440))
- Contacts performance ([details](https://github.com/status-im/status-mobile/pull/12643))
- Add profile image in push notifications ([details](https://github.com/status-im/status-mobile/pull/12427))
- Enable UI for signing legacy txs on networks without eip1559 ([details](https://github.com/status-im/status-mobile/pull/12692))
- Doubled the character limit on timeline posts ([details](https://github.com/status-im/status-mobile/commit/a9333ad52ca71f512d5306f802927d0c20d63944))
- Move pull to refresh to the account overview screen ([details](https://github.com/status-im/status-react/pull/12479))
- Add $RARE token to our default list ([details](https://github.com/status-im/status-react/pull/12521))
- Small UI Design Improvements ([details](https://github.com/status-im/status-react/pull/12544))
- Chats list performance ([details](https://github.com/status-im/status-react/pull/12554))
- Add push notification on group chat invite ([details](https://github.com/status-im/status-react/pull/12440))
- Contacts performance ([details](https://github.com/status-im/status-react/pull/12643))
- Add profile image in push notifications ([details](https://github.com/status-im/status-react/pull/12427))
- Enable UI for signing legacy txs on networks without eip1559 ([details](https://github.com/status-im/status-react/pull/12692))
- Doubled the character limit on timeline posts ([details](https://github.com/status-im/status-react/commit/a9333ad52ca71f512d5306f802927d0c20d63944))
### Bugfixes
- Don't show notifications from self ([details](https://github.com/status-im/status-mobile/pull/12505))
- Request permissions before saving images ([details](https://github.com/status-im/status-mobile/pull/12516))
- Re-enable amount/fee validation on tx signing ([details](https://github.com/status-im/status-mobile/pull/12537))
- Fix browser history sorting ([details](https://github.com/status-im/status-mobile/pull/12497))
- Fix show/hide password on Android ([details](https://github.com/status-im/status-mobile/pull/12536))
- Fix connecting autofarm.network dapps with status wallet freezes ([details](https://github.com/status-im/status-mobile/pull/12529))
- RPC URL is lower-cased when entered in URL field when adding ([details](https://github.com/status-im/status-mobile/pull/12574))
- Allow retrieving of profile updates after removing contact ([details](https://github.com/status-im/status-mobile/pull/12581))
- Fetch history on receiving pubchat installation ([details](https://github.com/status-im/status-mobile/pull/12644))
- Can't send funds to multisig - Out of gas ([details](https://github.com/status-im/status-mobile/pull/12648))
- Fix handling errors on eth_gasPrice ([details](https://github.com/status-im/status-mobile/pull/12710))
- Don't show notifications from self ([details](https://github.com/status-im/status-react/pull/12505))
- Request permissions before saving images ([details](https://github.com/status-im/status-react/pull/12516))
- Re-enable amount/fee validation on tx signing ([details](https://github.com/status-im/status-react/pull/12537))
- Fix browser history sorting ([details](https://github.com/status-im/status-react/pull/12497))
- Fix show/hide password on Android ([details](https://github.com/status-im/status-react/pull/12536))
- Fix connecting autofarm.network dapps with status wallet freezes ([details](https://github.com/status-im/status-react/pull/12529))
- RPC URL is lower-cased when entered in URL field when adding ([details](https://github.com/status-im/status-react/pull/12574))
- Allow retrieving of profile updates after removing contact ([details](https://github.com/status-im/status-react/pull/12581))
- Fetch history on receiving pubchat installation ([details](https://github.com/status-im/status-react/pull/12644))
- Can't send funds to multisig - Out of gas ([details](https://github.com/status-im/status-react/pull/12648))
- Fix handling errors on eth_gasPrice ([details](https://github.com/status-im/status-react/pull/12710))
## 1.16
@@ -203,88 +46,88 @@
### Features
- EIP-1159 support ([#12369](https://github.com/status-im/status-mobile/pull/12369))
- Hide/show option for accounts in the wallet ([#12438](https://github.com/status-im/status-mobile/pull/12438))
- Delete accounts in wallet ([#12444](https://github.com/status-im/status-mobile/pull/12444))
- Enable keeping database when migrating account to keycard ([#12306](https://github.com/status-im/status-mobile/pull/12306))
- Replies from group chat in activity centre ([#12266](https://github.com/status-im/status-mobile/pull/12266))
- EIP-1159 support ([#12369](https://github.com/status-im/status-react/pull/12369))
- Hide/show option for accounts in the wallet ([#12438](https://github.com/status-im/status-react/pull/12438))
- Delete accounts in wallet ([#12444](https://github.com/status-im/status-react/pull/12444))
- Enable keeping database when migrating account to keycard ([#12306](https://github.com/status-im/status-react/pull/12306))
- Replies from group chat in activity centre ([#12266](https://github.com/status-im/status-react/pull/12266))
### Improvements
- Remove clear history from non-public chats ([#12384](https://github.com/status-im/status-mobile/pull/12384))
- Clearing push notifications on read (Android) ([#12464](https://github.com/status-im/status-mobile/pull/12464))
- Enable migration to keycard from signed-in state ([#11778](https://github.com/status-im/status-mobile/issues/11778))
- Remove clear history from non-public chats ([#12384](https://github.com/status-im/status-react/pull/12384))
- Clearing push notifications on read (Android) ([#12464](https://github.com/status-im/status-react/pull/12464))
- Enable migration to keycard from signed-in state ([#11778](https://github.com/status-im/status-react/issues/11778))
### Bug Fixes
#### Chat
- Fix Error when opening 1-1 chat in Activity center for blocked user ([#12399](https://github.com/status-im/status-mobile/pull/12399))
- Long press is long and it makes the message disappear entirely ([#12445](https://github.com/status-im/status-mobile/pull/12445))
- Sort pinned messages by time of pinning ([#12402](https://github.com/status-im/status-mobile/pull/12402))
- Screens with overlapping long usernames ([#12471](https://github.com/status-im/status-mobile/pull/12471))
- Fix Error when opening 1-1 chat in Activity center for blocked user ([#12399](https://github.com/status-im/status-react/pull/12399))
- Long press is long and it makes the message disappear entirely ([#12445](https://github.com/status-im/status-react/pull/12445))
- Sort pinned messages by time of pinning ([#12402](https://github.com/status-im/status-react/pull/12402))
- Screens with overlapping long usernames ([#12471](https://github.com/status-im/status-react/pull/12471))
#### Browser (Dapp)
- Fix some token swap errors in Uniswap ([#12417](https://github.com/status-im/status-mobile/pull/12417))
- Update react-native-webview for better SSL handling ([#12409](https://github.com/status-im/status-mobile/pull/12409))
- Fix some token swap errors in Uniswap ([#12417](https://github.com/status-im/status-react/pull/12417))
- Update react-native-webview for better SSL handling ([#12409](https://github.com/status-im/status-react/pull/12409))
#### Keycard
- App freezes until reopening when signing tx with frozen Keycard ([#12473](https://github.com/status-im/status-mobile/pull/12473))
- App freezes until reopening when signing tx with frozen Keycard ([#12473](https://github.com/status-im/status-react/pull/12473))
#### Wallet
- Allow to add assets with same name ([#12466](https://github.com/status-im/status-mobile/pull/12466))
- Update DATAcoin name ([#12454](https://github.com/status-im/status-mobile/pull/12454))
- Allow to add assets with same name ([#12466](https://github.com/status-im/status-react/pull/12466))
- Update DATAcoin name ([#12454](https://github.com/status-im/status-react/pull/12454))
## 1.15
### For iOS and Android
### Features
- New improved native navigation, its very fast :dash: [[details](https://github.com/status-im/status-mobile/pull/12141)]
- Pinned messages in chats :pushpin: [[details](https://github.com/status-im/status-mobile/issues/11699)]
- Add support for ETH2x-FLI ERC20 token ⚫ [[details](https://github.com/status-im/status-mobile/issues/11885)]
- Add support for HEZ ERC20 token ⚫ [[details](https://github.com/status-im/status-mobile/issues/12233)]
- Show number of unread mentions in public and communities chats :bell: [[details](https://github.com/status-im/status-mobile/issues/12061)]
- QR code scanner for browser :ticket: [[details](https://github.com/status-im/status-mobile/issues/12195)]
- Edit messages after sending :pencil2: [[details](https://github.com/status-im/status-mobile/issues/12067)]
- Allow password reset :abcd: [[details](https://github.com/status-im/status-mobile/pull/12245)]
- New improved native navigation, its very fast :dash: [[details](https://github.com/status-im/status-react/pull/12141)]
- Pinned messages in chats :pushpin: [[details](https://github.com/status-im/status-react/issues/11699)]
- Add support for ETH2x-FLI ERC20 token ⚫ [[details](https://github.com/status-im/status-react/issues/11885)]
- Add support for HEZ ERC20 token ⚫ [[details](https://github.com/status-im/status-react/issues/12233)]
- Show number of unread mentions in public and communities chats :bell: [[details](https://github.com/status-im/status-react/issues/12061)]
- QR code scanner for browser :ticket: [[details](https://github.com/status-im/status-react/issues/12195)]
- Edit messages after sending :pencil2: [[details](https://github.com/status-im/status-react/issues/12067)]
- Allow password reset :abcd: [[details](https://github.com/status-im/status-react/pull/12245)]
### Improvements
- Native modals and tabs :house_with_garden:
- Improved time to show login screen :timer_clock:
- New, human friendly, terms of use :pencil: [[details](https://github.com/status-im/status-mobile/issues/12206)]
- New, human friendly, terms of use :pencil: [[details](https://github.com/status-im/status-react/issues/12206)]
### Bug Fixes
- No contact request in Activity Center after 1-1 chat deleted of non-contact user :no_good: [[details](https://github.com/status-im/status-mobile/issues/12218)]
- No contact request in Activity Center after 1-1 chat deleted of non-contact user :no_good: [[details](https://github.com/status-im/status-react/issues/12218)]
## 1.14
### For iOS and Android
### Features
- Highlight posts that mention you ([details](https://github.com/status-im/status-mobile/pull/12146))
- Highlight posts that mention you ([details](https://github.com/status-im/status-react/pull/12146))
- Remove PUK and Pairing Code screen from Keycard onboarding
[details](https://github.com/status-im/status-mobile/pull/12155))
- Added unread messages count for messages with mentions in public chats ([details](https://github.com/status-im/status-mobile/pull/12152))
- Sync history setting allowing to sync chat history up to 1 month ([details](https://github.com/status-im/status-mobile/pull/12166))
[details](https://github.com/status-im/status-react/pull/12155))
- Added unread messages count for messages with mentions in public chats ([details](https://github.com/status-im/status-react/pull/12152))
- Sync history setting allowing to sync chat history up to 1 month ([details](https://github.com/status-im/status-react/pull/12166))
### Improvements
- "My profile" button for simplification of finding own public key ([details](https://github.com/status-im/status-mobile/pull/12044))
- Factory reset option is available on account creation and recovery flows ([details](https://github.com/status-im/status-mobile/pull/12055))
- Allow the creation of recovery/backup Keycard from the login interface ([details](https://github.com/status-im/status-mobile/pull/12115))
- Reset blocked and/or frozen Keycards ([details](https://github.com/status-im/status-mobile/pull/12127))
- Show cached balance ([details](https://github.com/status-im/status-mobile/pull/12134))
- "My profile" button for simplification of finding own public key ([details](https://github.com/status-im/status-react/pull/12044))
- Factory reset option is available on account creation and recovery flows ([details](https://github.com/status-im/status-react/pull/12055))
- Allow the creation of recovery/backup Keycard from the login interface ([details](https://github.com/status-im/status-react/pull/12115))
- Reset blocked and/or frozen Keycards ([details](https://github.com/status-im/status-react/pull/12127))
- Show cached balance ([details](https://github.com/status-im/status-react/pull/12134))
### Bugfixes
- Pending transactions are stored in the database and shown on history screen after re-login ([details](https://github.com/status-im/status-mobile/pull/12032))
- Pending transactions are stored in the database and shown on history screen after re-login ([details](https://github.com/status-im/status-react/pull/12032))
- Multiple fixes for keycard
- Fixes for resolving ENS name from chat key ([details](https://github.com/status-im/status-mobile/pull/12100))
- Fixes for resolving ENS name from chat key ([details](https://github.com/status-im/status-react/pull/12100))
## 1.13
@@ -292,7 +135,7 @@
### For iOS and Android
### Features
- New activity manager https://github.com/status-im/status-mobile/issues/11958
- New activity manager https://github.com/status-im/status-react/issues/11958
New chats and group chat invitation will appear in a new section, the activity center, where a user will be able to accept or decline the request.
https://www.figma.com/file/r59kCQxl6tlC0dHkcAJOpP/Action-center-MVP---Mobile?node-id=2%3A8012 (not fully implemented)
@@ -366,7 +209,7 @@ V1.11 also makes some improvements to the overall Status experience. Improved co
Update in the App Store or Google Play if you do not have auto updates enabled.
For the full changelog, see Github https://github.com/status-im/status-mobile/milestone/49?closed=1
For the full changelog, see Github https://github.com/status-im/status-react/milestone/49?closed=1
#### Added
- Add Giphy url support in chat
@@ -387,7 +230,7 @@ V1.11 also makes some improvements to the overall Status experience. Improved co
Update in the App Store or Google Play if you do not have auto updates enabled.
For the full changelog, see Github https://github.com/status-im/status-mobile/milestone/49?closed=1
For the full changelog, see Github https://github.com/status-im/status-react/milestone/49?closed=1
#### Added
- Migrate existing account to Keycard
@@ -562,7 +405,7 @@ Update in the [App Store](https://apps.apple.com/us/app/status-private-communica
The APK available is [here](https://status-im-files.ams3.cdn.digitaloceanspaces.com/StatusIm-Mobile-v1.8.0.apk).
For the full changelog, see our [Github](https://github.com/status-im/status-mobile/commits/release/1.8.x).
For the full changelog, see our [Github](https://github.com/status-im/status-react/commits/release/1.8.x).
> [Verify APK link before publishing blog post]
>
@@ -572,7 +415,7 @@ This release fixes an issue with fetching ERC20 balance. It was due to a contrac
## 1.7.1
Full release commits: https://github.com/status-im/status-mobile/commits/release/1.7.1
Full release commits: https://github.com/status-im/status-react/commits/release/1.7.1
### Android + iOS
#### Excerpt
Several users have reported an issue in upgrading from release 1.6.1 to release 1.7. This update fixes the issue.
@@ -589,7 +432,7 @@ Retry failed migration
## 1.7
Full release commits: https://github.com/status-im/status-mobile/commits/release/1.7.x
Full release commits: https://github.com/status-im/status-react/commits/release/1.7.x
### Android
#### Excerpt (446 characters including spaces)
@@ -715,13 +558,13 @@ For the full changelog, see our Github
### Excerpt
This intermediate release, 1.4.1, includes bug fixes as well as UX and accessibility improvements. Most visibly, a gorgeous set of new icons, accessible input fields and toggling password entry visibility. Next to that the release includes updates to Notifications on Android, like being able to open Status, as well as close the notification service, directly from the notification banner.
For the full changelog, see our [Github](https://github.com/status-im/status-mobile/commits/release/1.4.x)
For the full changelog, see our [Github](https://github.com/status-im/status-react/commits/release/1.4.x)
### Full
While focused on building new features there are a few improvements we did not want to hold off on sharing. This intermediate release, 1.4.1, includes bug fixes as well as UX and accessibility improvements. Most visibly, a gorgeous set of new icons, accessible input fields and toggling password entry visibility. Next to that the release includes updates to Notifications on Android, like being able to open Status, as well as close the notification service, directly from the notification banner.
For the full changelog, see our [Github](https://github.com/status-im/status-mobile/commits/release/1.4.x).
For the full changelog, see our [Github](https://github.com/status-im/status-react/commits/release/1.4.x).
@@ -761,7 +604,7 @@ The final addition to v1.4 is the introduction of browser support for EIP 1139
Beyond that, version 1.4 includes some updates to the FAQ, extended translation support, and some fixes to ENS username displays, dark mode contrast, QR code scanner and more.
For the full changelog, see our [Github](https://github.com/status-im/status-mobile/commits/release/1.4.x).
For the full changelog, see our [Github](https://github.com/status-im/status-react/commits/release/1.4.x).
#### Added
- Keycard integration on Android
@@ -782,7 +625,7 @@ For the full changelog, see our [Github](https://github.com/status-im/status-mob
- Resolved error on scrolling account view
- Parse markdown in subheader chat list
- Banner to back up seed phrase tappable
- [Chat performance improvements](https://github.com/status-im/status-mobile/pull/10711)
- [Chat performance improvements](https://github.com/status-im/status-react/pull/10711)
- QR code scanning issue when scanning from join.status.im
@@ -798,7 +641,7 @@ In the future, we'd like to expand these to host more than 10 members. We'll emb
Lastly, we've changed our webview implementation over to the react-native-community package, to remain in sync with the React Native community and benefit from upstream improvements.
As always, we've also included a few nice fixes in this release. For the full changelog, [see our Github](https://github.com/status-im/status-mobile/commits/release/1.3.x).
As always, we've also included a few nice fixes in this release. For the full changelog, [see our Github](https://github.com/status-im/status-react/commits/release/1.3.x).
#### Added
@@ -813,8 +656,8 @@ As always, we've also included a few nice fixes in this release. For the full ch
- Persistant wallet value
- Update to all text input, increasing pressable areas
- Improved seed phrase text input on small screens
- Easier to find user's public key for sharing (https://github.com/status-im/status-mobile/pull/10207#event-3163431514)
- Shortened universal links (https://github.com/status-im/status-mobile/issues/10083)
- Easier to find user's public key for sharing (https://github.com/status-im/status-react/pull/10207#event-3163431514)
- Shortened universal links (https://github.com/status-im/status-react/issues/10083)
## 1.2
@@ -859,7 +702,7 @@ With further improvements to Waku in the pipeline, Status becomes accessible to
Biggest changes:
- Status now support importing private key and seed phrase inside multiaccount!
(https://github.com/status-im/status-mobile/pull/10100)
(https://github.com/status-im/status-react/pull/10100)
- all chat dialogs moved to bottom sheet
- added "Mark all as read" option
- unread badge is changed for public chat
@@ -868,41 +711,41 @@ More detailed:
ENS name improvements:
- https://github.com/status-im/status-mobile/pull/9952 - fixes ENS to new registry
- https://github.com/status-im/status-mobile/pull/9997 - Check for empty public key (for ENS names)
- https://github.com/status-im/status-mobile/pull/10007 - improve ENS display in Public chats
- https://github.com/status-im/status-mobile/pull/10022 - fix crash on long ENS names
- https://github.com/status-im/status-react/pull/9952 - fixes ENS to new registry
- https://github.com/status-im/status-react/pull/9997 - Check for empty public key (for ENS names)
- https://github.com/status-im/status-react/pull/10007 - improve ENS display in Public chats
- https://github.com/status-im/status-react/pull/10022 - fix crash on long ENS names
General improvements:
- https://github.com/status-im/status-mobile/pull/10027 - deep link handling (rename get.status.im to join.status.im)
- https://github.com/status-im/status-mobile/pull/9940 - changed navigation on logout
- https://github.com/status-im/status-mobile/pull/9917 - added search to currencies and assets
- https://github.com/status-im/status-mobile/pull/9941 - improvement on snackbar by considering login time (less "Offline", "Connected" after login)
- https://github.com/status-im/status-mobile/pull/9898 - added qr code reader for scanning QR when add watch-only address
- https://github.com/status-im/status-mobile/pull/9882 - Respond to FaceID failure callback
- https://github.com/status-im/status-mobile/pull/9915 - Make bottom sheet height dynamical
- https://github.com/status-im/status-mobile/pull/9931 - 2 lines for user name on intro screen
- https://github.com/status-im/status-react/pull/10027 - deep link handling (rename get.status.im to join.status.im)
- https://github.com/status-im/status-react/pull/9940 - changed navigation on logout
- https://github.com/status-im/status-react/pull/9917 - added search to currencies and assets
- https://github.com/status-im/status-react/pull/9941 - improvement on snackbar by considering login time (less "Offline", "Connected" after login)
- https://github.com/status-im/status-react/pull/9898 - added qr code reader for scanning QR when add watch-only address
- https://github.com/status-im/status-react/pull/9882 - Respond to FaceID failure callback
- https://github.com/status-im/status-react/pull/9915 - Make bottom sheet height dynamical
- https://github.com/status-im/status-react/pull/9931 - 2 lines for user name on intro screen
Chat improvements:
- https://github.com/status-im/status-mobile/pull/10056 - added "Mark all as read" feature
- https://github.com/status-im/status-mobile/pull/9993, https://github.com/status-im/status-mobile/pull/9999 - better handling of ENS names / chat keys when starting new chat
- https://github.com/status-im/status-mobile/pull/10117 - reworked unread message indicator in public chats
- https://github.com/status-im/status-mobile/pull/9868 - all chat dialogs are moved to bottom sheets
- https://github.com/status-im/status-react/pull/10056 - added "Mark all as read" feature
- https://github.com/status-im/status-react/pull/9993, https://github.com/status-im/status-react/pull/9999 - better handling of ENS names / chat keys when starting new chat
- https://github.com/status-im/status-react/pull/10117 - reworked unread message indicator in public chats
- https://github.com/status-im/status-react/pull/9868 - all chat dialogs are moved to bottom sheets
Performance improvements:
- https://github.com/status-im/status-mobile/pull/9995 - Offload chat messages
- https://github.com/status-im/status-mobile/pull/10120 - Android app UI is slow after background
- https://github.com/status-im/status-react/pull/9995 - Offload chat messages
- https://github.com/status-im/status-react/pull/10120 - Android app UI is slow after background
Issues fixed:
- https://github.com/status-im/status-mobile/issues/10002
- https://github.com/status-im/status-mobile/issues/8797
- https://github.com/status-im/status-mobile/issues/6839
- https://github.com/status-im/status-mobile/issues/9754
- https://github.com/status-im/status-mobile/issues/10044
- https://github.com/status-im/status-mobile/issues/10041
- https://github.com/status-im/status-mobile/issues/9886
- https://github.com/status-im/status-react/issues/10002
- https://github.com/status-im/status-react/issues/8797
- https://github.com/status-im/status-react/issues/6839
- https://github.com/status-im/status-react/issues/9754
- https://github.com/status-im/status-react/issues/10044
- https://github.com/status-im/status-react/issues/10041
- https://github.com/status-im/status-react/issues/9886
## 1.0
@@ -953,7 +796,7 @@ Acolytec3
• Improvements to wallet transaction flow UI
• Sticker market and two initial sticker packs
• Choice of wallet to use when interacting with Dapps
• [Proper markdown support](https://github.com/status-im/status-mobile/pull/9409#issue-338045622)
• [Proper markdown support](https://github.com/status-im/status-react/pull/9409#issue-338045622)
• ENS username setting option for use in chat
• Improved chat intro screen and public chat list
• Updated chat command flow, with additional privacy layer to be compatible with multiaccount
@@ -969,7 +812,7 @@ Acolytec3
• Algorithm for deriving public chat key changed, performance. (andrey review: pubkey or 3 word name?, not sure if Algorithm for deriving pubkey can be changed)
• Storage of app state moved to Status-go—performance improvements in chat load times
• Browser privacy mode enabled by default, option removed (EIP1102)
• Updates to EIP1102 for compatibility (https://github.com/status-im/status-mobile/pull/9629)
• Updates to EIP1102 for compatibility (https://github.com/status-im/status-react/pull/9629)
• Protocol breaking changes: removed transit encoding in favor of protobuf, for better performance and interoperability with other languages
• Roughly 45% improvement in how quickly chats load
• Profile screen cleaned up
@@ -1033,17 +876,17 @@ To get involved, you can find our current bounty issues on Gitcoin [LINK].
- Moved `Browser privacy Mode` toggle to the browser screen as new preference setting
- `Fetch more messages` button now retrieves up to 30 days of history in public chats
- Long press a chat for more options; no more swiping
- Fewer messages rendered before a chat is scrolled for better performance ([8191](https://github.com/status-im/status-mobile/pull/8191))
- Using checksummed addresses in wallet (EIP55) ([8121](https://github.com/status-im/status-mobile/issues/8121) and [4959](https://github.com/status-im/status-mobile/issues/4959))
- Fewer messages rendered before a chat is scrolled for better performance ([8191](https://github.com/status-im/status-react/pull/8191))
- Using checksummed addresses in wallet (EIP55) ([8121](https://github.com/status-im/status-react/issues/8121) and [4959](https://github.com/status-im/status-react/issues/4959))
- Scanning QR code from a DApp does not cause redirect
**Fixed**
- Browser crash when incorrect domain entered ([8239](https://github.com/status-im/status-mobile/issues/8239))
- ENS registration bug ([8249](https://github.com/status-im/status-mobile/issues/8249))
- Wallet balance updates correctly after Tx received ([8107](https://github.com/status-im/status-mobile/issues/8107))
- Browser crash when incorrect domain entered ([8239](https://github.com/status-im/status-react/issues/8239))
- ENS registration bug ([8249](https://github.com/status-im/status-react/issues/8249))
- Wallet balance updates correctly after Tx received ([8107](https://github.com/status-im/status-react/issues/8107))
- Support for EIP1577/`contenthash` field for ENS
- Numeric validation for `send`/`receive` chat commands ([1442](https://github.com/status-im/status-mobile/issues/1442))
- Allow to select chat item below plus button ([7859](https://github.com/status-im/status-mobile/issues/7859))
- Numeric validation for `send`/`receive` chat commands ([1442](https://github.com/status-im/status-react/issues/1442))
- Allow to select chat item below plus button ([7859](https://github.com/status-im/status-react/issues/7859))
## 0.12.0
@@ -1105,11 +948,11 @@ Reminder: On April 1st, we'll experiment with eliminating all centralized, third
- Improved UI performance (https://www.pivotaltracker.com/story/show/164245989)
**Fixed**
- Universal link to public chat bug (https://github.com/status-im/status-mobile/issues/7549)
- Beta warning popup (https://github.com/status-im/status-mobile/issues/7771)
- DApp offline error (https://github.com/status-im/status-mobile/issues/7188#issuecomment-474308724)
- Bug with QR code scanner for custom bootnodes (https://github.com/status-im/status-mobile/pull/7782)
- Error message when entering an incorrect custom mailserver (https://github.com/status-im/status-mobile/issues/7752)
- Universal link to public chat bug (https://github.com/status-im/status-react/issues/7549)
- Beta warning popup (https://github.com/status-im/status-react/issues/7771)
- DApp offline error (https://github.com/status-im/status-react/issues/7188#issuecomment-474308724)
- Bug with QR code scanner for custom bootnodes (https://github.com/status-im/status-react/pull/7782)
- Error message when entering an incorrect custom mailserver (https://github.com/status-im/status-react/issues/7752)
## 0.10.1 - Hot Fix
@@ -1156,9 +999,9 @@ And that concludes the most significant changes of this release! For more, check
- Minor tweaks to chat UI
**Fixed**
- Status now works on restricted [ports](https://github.com/status-im/status-mobile/pull/7382)
- Status now works on restricted [ports](https://github.com/status-im/status-react/pull/7382)
- Overlap on small screens during log-in
- False mailserver connection error [removed](https://github.com/status-im/status-mobile/issues/7531)
- False mailserver connection error [removed](https://github.com/status-im/status-react/issues/7531)
- Premature sending of contact requests on Profile > Send message
- DApps on same host (i.e. IPFS) no longer share user-granted permissions
@@ -1228,7 +1071,7 @@ For the full list of changes, see below.
_Notes to call out_
- Privacy mode by default instructions
- Breaking change: no PNs for old versions after next mobile release - https://github.com/status-im/status-mobile/pull/6893
- Breaking change: no PNs for old versions after next mobile release - https://github.com/status-im/status-react/pull/6893
- Setting up device pairing
@@ -1255,7 +1098,7 @@ Fixed
- Transaction history fixes
- Updating enabled tokens before navigating to wallet
[All changes](https://github.com/status-im/status-mobile/compare/release/0.9.31...release/0.9.32)
[All changes](https://github.com/status-im/status-react/compare/release/0.9.31...release/0.9.32)
## 0.9.31
@@ -1286,7 +1129,7 @@ Fixed
- Restored missing transaction error messages
- Granting profile access applies per DApp rather than per host
[All changes](https://github.com/status-im/status-mobile/compare/release/0.9.30...release/0.9.31)
[All changes](https://github.com/status-im/status-react/compare/release/0.9.30...release/0.9.31)
## 0.9.30
+1 -1
View File
@@ -1 +1 @@
1.25.0
1.17.0
+159 -89
View File
@@ -1,75 +1,115 @@
apply plugin: "com.android.application"
apply plugin: "org.jetbrains.kotlin.android"
apply plugin: "com.facebook.react"
apply from: project(':react-native-config').projectDir.getPath() + "/dotenv.gradle"
import com.android.build.OutputFile
import com.sun.org.apache.xalan.internal.xsltc.compiler.Copy
/*
* This is the configuration block to customize your React Native Android app.
* By default you don't need to apply any configuration, just uncomment the lines you need.
/**
* The react.gradle file registers a task for each build variant:
* - bundlePrJsAndAssets
* - bundleDebugJsAndAssets
* - bundleReleaseJsAndAssets
* These basically call `react-native bundle` with the correct arguments during the Android build
* cycle. By default, bundleDebugJsAndAssets is skipped, as in debug/dev mode we prefer to load the
* bundle directly from the development server. Below you can see all the possible configurations
* and their defaults. If you decide to add a configuration block, make sure to add it before the
* `apply from: "../../node_modules/react-native/react.gradle"` line.
*
* project.ext.react = [
* // the name of the generated asset file containing your JS bundle
* bundleAssetName: "index.android.bundle",
*
* // the entry file for bundle generation
* entryFile: "index.js",
*
* // whether to bundle JS and assets in debug mode
* bundleInDebug: false,
*
* // whether to bundle JS and assets in release mode
* bundleInRelease: true,
*
* // whether to bundle JS and assets in another build variant (if configured).
* // See http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Build-Variants
* // The configuration property can be in the following formats
* // 'bundleIn${productFlavor}${buildType}'
* // 'bundleIn${buildType}'
* // bundleInFreeDebug: true,
* // bundleInPaidRelease: true,
* // bundleInBeta: true,
*
* // whether to disable dev mode in custom build variants (by default only disabled in release)
* // for example: to disable dev mode in the staging build type (if configured)
* devDisabledInStaging: true,
* // The configuration property can be in the following formats
* // 'devDisabledIn${productFlavor}${buildType}'
* // 'devDisabledIn${buildType}'
*
* // the root of your project, i.e. where "package.json" lives
* root: "../../",
*
* // where to put the JS bundle asset in debug mode
* jsBundleDirDebug: "$buildDir/intermediates/assets/debug",
*
* // where to put the JS bundle asset in release mode
* jsBundleDirRelease: "$buildDir/intermediates/assets/release",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in debug mode
* resourcesDirDebug: "$buildDir/intermediates/res/merged/debug",
*
* // where to put drawable resources / React Native assets, e.g. the ones you use via
* // require('./image.png')), in release mode
* resourcesDirRelease: "$buildDir/intermediates/res/merged/release",
*
* // by default the gradle tasks are skipped if none of the JS files or assets change; this means
* // that we don't look at files in android/ or ios/ to determine whether the tasks are up to
* // date; if you have any other folders that you want to ignore for performance reasons (gradle
* // indexes the entire tree), add them here. Alternatively, if you have JS files in android/
* // for example, you might want to remove it from here.
* inputExcludes: ["android/**", "ios/**"],
*
* // override which node gets called and with what additional arguments
* nodeExecutableAndArgs: ["node", "--max-old-space-size=8192"],
*
* // supply additional arguments to the packager
* extraPackagerArgs: []
* ]
*/
react {
/* Folders */
// The root of your project, i.e. where "package.json" lives. Default is '..'
// root = file("../")
// The folder where the react-native NPM package is. Default is ../node_modules/react-native
// reactNativeDir = file("../node_modules/react-native")
// The folder where the react-native Codegen package is. Default is ../node_modules/@react-native/codegen
// codegenDir = file("../node_modules/@react-native/codegen")
// The cli.js file which is the React Native CLI entrypoint. Default is ../node_modules/react-native/cli.js
// cliFile = file("../node_modules/react-native/cli.js")
project.ext.react = [
nodeExecutableAndArgs: ["node", "--max-old-space-size=16384"],
entryFile: "index.js",
/* NOTE: Hermes engine is required for Android 64-bit builds running on 64 devices,
* to guard against a hang in the UI thread after invoking status-go.
* Also a clean and rebuild is required when changing this. */
enableHermes: true,
/* Disable 'The first definition was here.' warnings */
hermesFlagsRelease: ["-w"],
bundleInPr: true,
inputExcludes: ["android/**", "ios/**", "react-native/**", "src/**", "test/**"]
]
/* Variants */
// The list of variants to that are debuggable. For those we're going to
// skip the bundling of the JS bundle and the assets. By default is just 'debug'.
// If you add flavors like lite, prod, etc. you'll have to list your debuggableVariants.
// debuggableVariants = ["liteDebug", "prodDebug"]
// NOTE: Uncomment if building RN from a fork
// configurations.all {
// exclude group: 'com.facebook.react', module: 'react-native'
// }
/* Bundling */
// A list containing the node command and its flags. Default is just 'node'.
nodeExecutableAndArgs = ["node", "--max-old-space-size=16384" ]
//
// The command to run when bundling. By default is 'bundle'
// bundleCommand = "ram-bundle"
//
// The path to the CLI configuration file. Default is empty.
// bundleConfig = file(../rn-cli.config.js)
//
// The name of the generated asset file containing your JS bundle
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
// extraPackagerArgs = []
/* Hermes Commands */
// The hermes compiler command to run. By default it is 'hermesc'
// hermesCommand = "$rootDir/my-custom-hermesc/bin/hermesc"
//
// The list of flags to pass to the Hermes compiler. By default is "-O", "-output-source-map"
// hermesFlags = ["-O", "-output-source-map"]
}
apply from: "../../node_modules/react-native/react.gradle"
/**
* Set this to true to Run Proguard on Release builds to minify the Java bytecode.
* Run Proguard to shrink the Java bytecode in release builds.
*/
def enableProguardInReleaseBuilds = false
/**
* The preferred build flavor of JavaScriptCore (JSC)
* The preferred build flavor of JavaScriptCore.
*
* For example, to use the international variant, you can use:
* `def jscFlavor = 'org.webkit:android-jsc-intl:+'`
*
* The international variant includes ICU i18n library and necessary data
* allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that
* give correct results when using with locales other than en-US. Note that
* give correct results when using with locales other than en-US. Note that
* this variant is about 6MiB larger per architecture than default.
*/
def jscFlavor = 'org.webkit:android-jsc:+'
@@ -81,8 +121,12 @@ def jscFlavor = 'org.webkit:android-jsc:+'
* on project.ext.react, JavaScript will not be compiled to Hermes Bytecode
* and the benefits of using Hermes will therefore be sharply reduced.
*/
def enableHermes = hermesEnabled.toBoolean();
def enableHermes = project.ext.react.get("enableHermes", false);
/**
* Exclude google library so we can publish to external android stores
*/
def googleFree = project.env.get("GOOGLE_FREE", false)
def getCommitHash = { ->
if (project.hasProperty("commitHash")) {
@@ -108,14 +152,10 @@ def getVersionCode = { ->
def getVersionName = { ->
new ByteArrayOutputStream().withStream { stdOut ->
// TODO: probably not used, cleanup
if (project.hasProperty("releaseVersion")) {
return project.releaseVersion
}
/* Necessary because Android Studio uses wrong PWD.
* Is actually absolute directory path of this file. */
def configDir = project.projectDir.toString()
version = new File(configDir + '/../../VERSION').text
version = new File('../VERSION').text
return version.replaceAll("\\s","")
}
}
@@ -136,16 +176,13 @@ def getEnvOrConfig = { varName ->
}
android {
ndkVersion rootProject.ext.ndkVersion
compileSdkVersion rootProject.ext.compileSdkVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_11
targetCompatibility JavaVersion.VERSION_11
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
namespace "im.status.ethereum"
defaultConfig {
applicationId "im.status.ethereum"
minSdkVersion rootProject.ext.minSdkVersion
@@ -162,7 +199,6 @@ android {
}
}
}
/**
* Arbitrary project metadata
* https://docs.gradle.org/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.html
@@ -198,6 +234,23 @@ android {
jumboMode true
javaMaxHeapSize "8g"
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
/* Caution! In production, you need to generate your own keystore file.
* See: https://facebook.github.io/react-native/docs/signed-apk-android */
release {
/* environment variables take precedence over gradle.properties file */
storeFile file(getEnvOrConfig('KEYSTORE_PATH').replaceAll("~", System.properties['user.home']))
storePassword getEnvOrConfig('KEYSTORE_PASSWORD')
keyAlias getEnvOrConfig('KEYSTORE_ALIAS')
keyPassword getEnvOrConfig('KEYSTORE_KEY_PASSWORD')
}
}
splits {
abi {
reset()
@@ -206,26 +259,20 @@ android {
universalApk true
}
}
signingConfigs {
debug {
storeFile file('debug.keystore')
storePassword 'android'
keyAlias 'androiddebugkey'
keyPassword 'android'
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
debuggable true
versionNameSuffix "-SNAPSHOT"
resValue "string", "build_config_package", "im.status.ethereum"
signingConfig signingConfigs.debug
resValue "string", "build_config_package", "im.status.ethereum"
}
release {
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
signingConfig null
if (getEnvOrConfig('ANDROID_APK_SIGNED').toBoolean()) {
signingConfig signingConfigs.release
}
}
pr {
initWith release
@@ -233,11 +280,10 @@ android {
versionNameSuffix ".pr"
debuggable false
matchingFallbacks = ["release"]
// necessary to make react-native-config's code generation work
resValue "string", "build_config_package", "im.status.ethereum"
// necessary to make react-native-config's code generation work
resValue "string", "build_config_package", "im.status.ethereum"
}
}
// applicationVariants are e.g. debug, release
applicationVariants.all { variant ->
variant.outputs.each { output ->
@@ -253,7 +299,6 @@ android {
}
}
aaptOptions {
// disable PNG optimization as for some reason it cannot be trusted to provide deterministic output (see https://f-droid.org/en/docs/Reproducible_Builds/)
cruncherEnabled = false
@@ -265,31 +310,56 @@ android {
}
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation "androidx.core:core-splashscreen:1.0.0"
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.facebook.react:react-native:+" // From node_modules
if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
} else {
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.0.0"
debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
exclude group:'com.facebook.fbjni'
}
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
// debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
// exclude group:'com.facebook.flipper'
// }
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
exclude group:'com.facebook.flipper'
}
if (enableHermes) {
def hermesPath = "../../node_modules/hermes-engine/android/";
debugImplementation files(hermesPath + "hermes-debug.aar")
releaseImplementation files(hermesPath + "hermes-release.aar")
prImplementation files(hermesPath + "hermes-release.aar")
} else {
implementation jscFlavor
}
if (googleFree) {
implementation(project(':react-native-device-info')) {
exclude group: 'com.google.firebase'
exclude group: 'com.google.android.gms'
exclude group: 'com.android.installreferrer'
}
}
// react-native-screens
implementation 'androidx.appcompat:appcompat:1.1.0-rc01'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0-alpha02'
implementation 'androidx.multidex:multidex:2.0.1' // required by status-mobile/android/app/src/main/java/im/status/ethereum/MainApplication.java
implementation project(':react-native-blur')
implementation 'androidx.multidex:multidex:2.0.1' // only needed if minSdkVersion is less than 21 (https://developer.android.com/studio/build/multidex)
implementation project(':react-native-dialogs')
// Force using exact RN version instead of relying on gradle dependency resolution
// https://docs.gradle.org/current/userguide/introduction_dependency_management.html#sec:dependency_resolution
// NOTE: Uncomment if building RN from a fork
//compile ("com.facebook.react:react-native:0.55.4") { force = true } // From node_modules
implementation project(':react-native-status')
implementation project(':react-native-status-keycard')
implementation 'com.github.status-im:function:0.0.1'
implementation 'com.facebook.fresco:fresco:2.5.0'
implementation 'com.facebook.fresco:animated-gif:2.5.0'
implementation "com.squareup.okhttp3:okhttp-tls:4.9.2"
implementation("com.google.prefab:cli:2.0.0")
implementation 'com.facebook.fresco:fresco:2.2.0'
implementation 'com.facebook.fresco:animated-gif:2.2.0'
}
def getLocalNDKDir = { ->
def rootDir = project.rootDir
def localProperties = new File(rootDir, "local.properties")
-12
View File
@@ -64,15 +64,3 @@
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
# fast-image
-keep public class com.dylanvann.fastimage.* {*;}
-keep public class com.dylanvann.fastimage.** {*;}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class com.bumptech.glide.annotation.GlideModule
-keep public class * extends com.bumptech.glide.module.AppGlideModule
-keep public enum com.bumptech.glide.load.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
+2 -7
View File
@@ -2,12 +2,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" >
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" android:exported="false" />
</application>
<application tools:targetApi="28" tools:ignore="GoogleAppIndexingWarning" android:usesCleartextTraffic="true" />
</manifest>
@@ -0,0 +1,73 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* <p>This source code is licensed under the MIT license found in the LICENSE file in the root
* directory of this source tree.
*/
package im.status.ethereum;
import android.content.Context;
import com.facebook.flipper.android.AndroidFlipperClient;
import com.facebook.flipper.android.utils.FlipperUtils;
import com.facebook.flipper.core.FlipperClient;
import com.facebook.flipper.plugins.crashreporter.CrashReporterPlugin;
import com.facebook.flipper.plugins.databases.DatabasesFlipperPlugin;
import com.facebook.flipper.plugins.fresco.FrescoFlipperPlugin;
import com.facebook.flipper.plugins.inspector.DescriptorMapping;
import com.facebook.flipper.plugins.inspector.InspectorFlipperPlugin;
// import com.facebook.flipper.plugins.network.FlipperOkhttpInterceptor;
// import com.facebook.flipper.plugins.network.NetworkFlipperPlugin;
import com.facebook.flipper.plugins.react.ReactFlipperPlugin;
import com.facebook.flipper.plugins.sharedpreferences.SharedPreferencesFlipperPlugin;
import com.facebook.react.ReactInstanceManager;
import com.facebook.react.bridge.ReactContext;
import com.facebook.react.modules.network.NetworkingModule;
import okhttp3.OkHttpClient;
public class ReactNativeFlipper {
public static void initializeFlipper(Context context, ReactInstanceManager reactInstanceManager) {
if (FlipperUtils.shouldEnableFlipper(context)) {
final FlipperClient client = AndroidFlipperClient.getInstance(context);
client.addPlugin(new InspectorFlipperPlugin(context, DescriptorMapping.withDefaults()));
client.addPlugin(new ReactFlipperPlugin());
client.addPlugin(new DatabasesFlipperPlugin(context));
client.addPlugin(new SharedPreferencesFlipperPlugin(context));
client.addPlugin(CrashReporterPlugin.getInstance());
// TODO Uncomment once Flipper does not cause webview crashes in Debug mode
// NetworkFlipperPlugin networkFlipperPlugin = new NetworkFlipperPlugin();
// NetworkingModule.setCustomClientBuilder(
// new NetworkingModule.CustomClientBuilder() {
// @Override
// public void apply(OkHttpClient.Builder builder) {
// builder.addNetworkInterceptor(new FlipperOkhttpInterceptor(networkFlipperPlugin));
// }
// });
// client.addPlugin(networkFlipperPlugin);
client.start();
// Fresco Plugin needs to ensure that ImagePipelineFactory is initialized
// Hence we run if after all native modules have been initialized
ReactContext reactContext = reactInstanceManager.getCurrentReactContext();
if (reactContext == null) {
reactInstanceManager.addReactInstanceEventListener(
new ReactInstanceManager.ReactInstanceEventListener() {
@Override
public void onReactContextInitialized(ReactContext reactContext) {
reactInstanceManager.removeReactInstanceEventListener(this);
reactContext.runOnNativeModulesQueueThread(
new Runnable() {
@Override
public void run() {
client.addPlugin(new FrescoFlipperPlugin());
}
});
}
});
} else {
client.addPlugin(new FrescoFlipperPlugin());
}
}
}
}
+11 -16
View File
@@ -1,6 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:installLocation="auto">
android:installLocation="auto"
package="im.status.ethereum">
<!-- non-dangerous permissions -->
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
@@ -16,11 +17,11 @@
<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_IMAGES"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="28" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.USE_FINGERPRINT" />
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
<uses-permission android:name="android.permission.RECORD_AUDIO" />
<application
@@ -28,23 +29,17 @@
android:allowBackup="false"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:theme="@style/Theme.AppSplash"
android:theme="@style/AppTheme"
android:name=".MainApplication"
android:largeHeap="true"
android:usesCleartextTraffic="true"
android:extractNativeLibs="true"
android:requestLegacyExternalStorage="true">
<!-- After upgrading Android Gradle Plugin to 4.2.0 and above we must get rid of `extractNativeLibs="true"`
and use`useLegacyPackaging` flag in our app's `build.gradle`-->
android:usesCleartextTraffic="true">
<meta-data android:name="commitHash" android:value="${commitHash}"/>
<activity
android:name=".MainActivity"
android:exported="true"
android:label="@string/app_name"
android:theme="@style/Theme.AppSplash"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustResize"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize|uiMode"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:resizeableActivity="false"
android:launchMode="singleTask">
<intent-filter>
@@ -62,14 +57,14 @@
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="status.app" />
<data android:scheme="https" android:host="status.app" />
<data android:scheme="http" android:host="join.status.im" />
<data android:scheme="https" android:host="join.status.im" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="status-app" />
<data android:scheme="status-im" />
<data android:scheme="ethereum" />
</intent-filter>
</activity>
@@ -0,0 +1,262 @@
package im.status.ethereum;
import android.content.Context;
import android.annotation.TargetApi;
import androidx.annotation.Nullable;
import android.app.AlertDialog;
import android.app.ActivityManager;
import android.content.DialogInterface;
import android.content.DialogInterface.OnCancelListener;
import android.content.DialogInterface.OnClickListener;
import android.content.pm.PackageManager;
import android.net.Uri;
import android.os.Build;
import android.os.Looper;
import android.preference.PreferenceManager;
import androidx.core.app.ActivityCompat;
import android.util.Log;
import android.view.WindowManager;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.provider.Settings;
import android.os.Bundle;
import com.facebook.react.ReactActivityDelegate;
import com.facebook.react.ReactRootView;
import com.facebook.react.modules.core.DeviceEventManagerModule;
import com.facebook.react.bridge.Arguments;
import com.facebook.react.bridge.WritableMap;
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView;
import com.facebook.react.ReactFragmentActivity;
import com.reactnativenavigation.NavigationActivity;
import com.facebook.react.modules.core.PermissionListener;
import org.devio.rn.splashscreen.SplashScreen;
import java.util.Properties;
import im.status.ethereum.module.StatusThreadPoolExecutor;
import im.status.ethereum.MainApplication;
public class MainActivity extends NavigationActivity
implements ActivityCompat.OnRequestPermissionsResultCallback{
@Nullable private PermissionListener mPermissionListener;
private static void registerUncaughtExceptionHandler(final Context context) {
final Thread.UncaughtExceptionHandler defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Thread.setDefaultUncaughtExceptionHandler(new Thread.UncaughtExceptionHandler() {
@Override
public void uncaughtException(final Thread thread, final Throwable t) {
// High priority, so don't use StatusThreadPoolExecutor
new Thread() {
@Override
public void run() {
Looper.prepare();
new AlertDialog.Builder(context)
.setTitle("Error")
.setMessage(t.toString())
.setNegativeButton("Exit", new DialogInterface.OnClickListener() {
public void onClick(final DialogInterface dialog, final int id) {
dialog.dismiss();
defaultUncaughtExceptionHandler.uncaughtException(thread, t);
}
}).show();
Looper.loop();
}
}.start();
}
});
}
private ActivityManager getActivityManager() {
return (ActivityManager) this.getSystemService(ACTIVITY_SERVICE);
}
private ActivityManager.MemoryInfo getAvailableMemory(final ActivityManager activityManager) {
final ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
activityManager.getMemoryInfo(memoryInfo);
return memoryInfo;
}
protected void configureStatus() {
// Required because of crazy APN settings redirecting localhost (found in GB)
Properties properties = System.getProperties();
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1");
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1");
}
private Intent createNotificationSettingsIntent() {
final Intent intent = new Intent();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.setAction(Settings.ACTION_APP_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
} else {
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setData(Uri.parse("package:" + getPackageName()));
}
return intent;
}
private void tryToEmit(String eventName, WritableMap event) {
try {
((MainApplication) getApplication()).getReactNativeHost()
.getReactInstanceManager()
.getCurrentReactContext()
.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class)
.emit("url", event);
} catch(Exception e) {/* we expect NPE on first start, which is OK because we have a fallback */}
}
@Override
public void onNewIntent(final Intent intent) {
super.onNewIntent(intent);
if (intent.getDataString() != null && intent.getData().getScheme().startsWith("app-settings")) {
startActivity(createNotificationSettingsIntent());
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
case Configuration.UI_MODE_NIGHT_YES:
setTheme(R.style.DarkTheme);
break;
case Configuration.UI_MODE_NIGHT_NO:
setTheme(R.style.LightTheme);
break;
default:
setTheme(R.style.LightTheme);
}
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(MainActivity.this);
// Report memory details for this application
final ActivityManager activityManager = getActivityManager();
Log.v("RNBootstrap", "Available system memory "+getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.getLargeMemoryClass()+"M");
setSecureFlag();
SplashScreen.show(this, true);
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
super.onCreate(null);
if (!shouldShowRootedNotification()) {
configureStatus();
} else {
AlertDialog dialog = new AlertDialog.Builder(MainActivity.this)
.setMessage(getResources().getString(R.string.root_warning))
.setPositiveButton(getResources().getString(R.string.root_okay), new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
rejectRootedNotification();
dialog.dismiss();
configureStatus();
}
})
.setNegativeButton(getResources().getString(R.string.root_cancel), new OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
dialog.dismiss();
MainActivity.this.finishAffinity();
}
})
.setOnCancelListener(new OnCancelListener() {
@Override
public void onCancel(DialogInterface dialog) {
dialog.dismiss();
MainActivity.this.finishAffinity();
}
})
.create();
dialog.show();
}
Runnable r = new Runnable() {
@Override
public void run() {
System.loadLibrary("status-logs");
// when app is started but the Activity has been destroyed, the deep linking url event is
// not emitted when coming back to foreground. This is a workaround. If the problem is
// resolved in react-native this code should be removed
if (getIntent().getData() != null) {
WritableMap event = Arguments.createMap();
event.putString("url", getIntent().getDataString());
// on first start emit will (silently) fail, but the regular deep linking handler will work
tryToEmit("url", event);
}
}
};
StatusThreadPoolExecutor.getInstance().execute(r);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
super.onConfigurationChanged(newConfig);
Intent intent = new Intent("onConfigurationChanged");
intent.putExtra("newConfig", newConfig);
this.sendBroadcast(intent);
}
private static final String REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification";
private static final Integer FREQUENCY_OF_REMINDER_IN_PERCENT = 5;
private boolean shouldShowRootedNotification() {
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
if (userRejectedRootedNotification()) {
return ((Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT);
} else return true;
} else {
return false;
}
}
private boolean userRejectedRootedNotification() {
SharedPreferences preferences = getPreferences(0);
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false);
}
private void rejectRootedNotification() {
SharedPreferences preferences = getPreferences(0);
SharedPreferences.Editor editor = preferences.edit();
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true);
editor.commit();
}
private void setSecureFlag() {
final SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this);
final boolean setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);
} else {
getWindow().clearFlags(WindowManager.LayoutParams.FLAG_SECURE);
}
}
@TargetApi(Build.VERSION_CODES.M)
public void requestPermissions(String[] permissions, int requestCode, PermissionListener listener) {
mPermissionListener = listener;
requestPermissions(permissions, requestCode);
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (mPermissionListener != null && mPermissionListener.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
mPermissionListener = null;
}
}
}
@@ -1,236 +0,0 @@
package im.status.ethereum
import android.annotation.TargetApi
import android.app.ActivityManager
import android.app.AlertDialog
import android.content.Context
import android.content.DialogInterface
import android.content.Intent
import android.content.SharedPreferences
import android.content.pm.PackageManager
import android.content.res.Configuration
import android.net.Uri
import android.os.Build
import android.os.Bundle
import android.os.Handler
import android.os.Looper
import android.preference.PreferenceManager
import android.provider.Settings
import android.util.Log
import android.view.WindowManager
import androidx.annotation.Nullable
import androidx.core.app.ActivityCompat
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import com.facebook.react.ReactActivityDelegate
import com.facebook.react.bridge.Arguments
import com.facebook.react.bridge.WritableMap
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.defaults.DefaultReactActivityDelegate
import com.facebook.react.modules.core.DeviceEventManagerModule
import com.facebook.react.modules.core.PermissionListener
import com.reactnativenavigation.NavigationActivity
import com.swmansion.gesturehandler.react.RNGestureHandlerEnabledRootView
import im.status.ethereum.MainApplication
import im.status.ethereum.module.StatusThreadPoolExecutor
import java.util.Properties
class MainActivity : NavigationActivity(), ActivityCompat.OnRequestPermissionsResultCallback {
@Nullable
private var mPermissionListener: PermissionListener? = null
private var keepSplash = true
private val SPLASH_DELAY = 3200
/**
* Returns the name of the main component registered from JavaScript. This is used to schedule
* rendering of the component.
*/
protected fun getMainComponentName(): String {
return "StatusIm"
}
private fun registerUncaughtExceptionHandler(context: Context) {
val defaultUncaughtExceptionHandler = Thread.getDefaultUncaughtExceptionHandler()
// High priority, so don't use StatusThreadPoolExecutor
Thread.setDefaultUncaughtExceptionHandler { thread, t ->
Thread {
Looper.prepare()
AlertDialog.Builder(context)
.setTitle("Error")
.setMessage(t.toString())
.setNegativeButton("Exit") { dialog, id ->
dialog.dismiss()
defaultUncaughtExceptionHandler.uncaughtException(thread, t)
}.show()
Looper.loop()
}.start()
}
}
private fun getActivityManager(): ActivityManager {
return getSystemService(ACTIVITY_SERVICE) as ActivityManager
}
private fun getAvailableMemory(activityManager: ActivityManager): ActivityManager.MemoryInfo {
val memoryInfo = ActivityManager.MemoryInfo()
activityManager.getMemoryInfo(memoryInfo)
return memoryInfo
}
protected fun configureStatus() {
// Required because of crazy APN settings redirecting localhost (found in GB)
val properties = System.getProperties()
properties.setProperty("http.nonProxyHosts", "localhost|127.0.0.1")
properties.setProperty("https.nonProxyHosts", "localhost|127.0.0.1")
}
private fun createNotificationSettingsIntent(): Intent {
val intent = Intent()
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
intent.action = Settings.ACTION_APP_NOTIFICATION_SETTINGS
intent.putExtra(Settings.EXTRA_APP_PACKAGE, packageName)
} else {
intent.action = Settings.ACTION_APPLICATION_DETAILS_SETTINGS
intent.addCategory(Intent.CATEGORY_DEFAULT)
intent.data = Uri.parse("package:$packageName")
}
return intent
}
private fun tryToEmit(eventName: String, event: WritableMap) {
try {
(getApplication() as MainApplication).getReactNativeHost()
.getReactInstanceManager()
.getCurrentReactContext()
?.getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter::class.java)
?.emit("url", event)
} catch (e: Exception) { // we expect NPE on first start, which is OK because we have a fallback
}
}
override fun onNewIntent(intent: Intent) {
super.onNewIntent(intent)
if (intent.dataString != null && intent.data!!.scheme!!.startsWith("app-settings")) {
startActivity(createNotificationSettingsIntent())
}
}
override fun onCreate(savedInstanceState: Bundle?) {
val splashScreen = installSplashScreen();
setTheme(R.style.DarkTheme)
// Make sure we get an Alert for every uncaught exceptions
registerUncaughtExceptionHandler(this)
// Report memory details for this application
val activityManager = getActivityManager()
Log.v("RNBootstrap", "Available system memory " + getAvailableMemory(activityManager).availMem + ", maximum usable application memory " + activityManager.largeMemoryClass + "M")
setSecureFlag()
// NOTE: Try to not restore the state https://github.com/software-mansion/react-native-screens/issues/17
super.onCreate(null)
if (!shouldShowRootedNotification()) {
configureStatus()
} else {
val dialog = AlertDialog.Builder(this)
.setMessage(resources.getString(R.string.root_warning))
.setPositiveButton(resources.getString(R.string.root_okay)) { dialog, which ->
rejectRootedNotification()
dialog.dismiss()
configureStatus()
}
.setNegativeButton(resources.getString(R.string.root_cancel)) { dialog, which ->
dialog.dismiss()
finishAffinity()
}
.setOnCancelListener {
it.dismiss()
finishAffinity()
}
.create()
dialog.show()
}
val r = Runnable {
System.loadLibrary("status-logs")
// when app is started but the Activity has been destroyed, the deep linking url event is
// not emitted when coming back to foreground. This is a workaround. If the problem is
// resolved in react-native this code should be removed
if (intent.data != null) {
val event = Arguments.createMap()
event.putString("url", intent.dataString)
// on first start emit will (silently) fail, but the regular deep linking handler will work
tryToEmit("url", event)
}
}
splashScreen.setKeepOnScreenCondition { keepSplash }
val handler = Handler()
handler.postDelayed({ keepSplash = false }, SPLASH_DELAY.toLong())
StatusThreadPoolExecutor.getInstance().execute(r)
}
override fun onDestroy() {
super.onDestroy()
}
override fun onConfigurationChanged(newConfig: Configuration) {
super.onConfigurationChanged(newConfig)
val intent = Intent("onConfigurationChanged")
intent.putExtra("newConfig", newConfig)
sendBroadcast(intent)
}
private val REJECTED_ROOTED_NOTIFICATION = "rejectedRootedNotification"
private val FREQUENCY_OF_REMINDER_IN_PERCENT = 5
private fun shouldShowRootedNotification(): Boolean {
if (RootUtil.isDeviceRooted() && BuildConfig.ENABLE_ROOT_ALERT == "1") {
return if (userRejectedRootedNotification()) {
(Math.random() * 100) < FREQUENCY_OF_REMINDER_IN_PERCENT
} else true
} else {
return false
}
}
private fun userRejectedRootedNotification(): Boolean {
val preferences = getPreferences(0)
return preferences.getBoolean(REJECTED_ROOTED_NOTIFICATION, false)
}
private fun rejectRootedNotification() {
val preferences = getPreferences(0)
val editor = preferences.edit()
editor.putBoolean(REJECTED_ROOTED_NOTIFICATION, true)
editor.commit()
}
private fun setSecureFlag() {
val sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this)
val setSecure = sharedPrefs.getBoolean("BLANK_PREVIEW", false)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH && setSecure) {
window.addFlags(WindowManager.LayoutParams.FLAG_SECURE)
} else {
window.clearFlags(WindowManager.LayoutParams.FLAG_SECURE)
}
}
@TargetApi(Build.VERSION_CODES.M)
override fun requestPermissions(permissions: Array<String>, requestCode: Int, listener: PermissionListener) {
mPermissionListener = listener
super.requestPermissions(permissions, requestCode)
}
override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<String>, grantResults: IntArray) {
if (mPermissionListener != null && mPermissionListener!!.onRequestPermissionsResult(requestCode, permissions, grantResults)) {
mPermissionListener = null
}
}
}
@@ -0,0 +1,93 @@
package im.status.ethereum;
import androidx.multidex.MultiDexApplication;
import android.util.Log;
import android.content.Context;
import android.webkit.WebView;
import java.lang.reflect.InvocationTargetException;
import com.facebook.react.PackageList;
import com.aakashns.reactnativedialogs.ReactNativeDialogsPackage;
import com.facebook.react.ReactApplication;
import cl.json.RNSharePackage;
import com.facebook.react.ReactNativeHost;
import com.reactnativenavigation.NavigationApplication;
import com.reactnativenavigation.react.NavigationReactNativeHost;
import com.facebook.react.ReactPackage;
import com.facebook.react.ReactInstanceManager;
import java.util.List;
import im.status.ethereum.keycard.RNStatusKeycardPackage;
import im.status.ethereum.module.StatusPackage;
import im.status.ethereum.pushnotifications.PushNotificationPackage;
public class MainApplication extends NavigationApplication {
private final ReactNativeHost mReactNativeHost = new NavigationReactNativeHost(this) {
@Override
public boolean getUseDeveloperSupport() {
return BuildConfig.DEBUG;
}
@Override
protected List<ReactPackage> getPackages() {
StatusPackage statusPackage = new StatusPackage(RootUtil.isDeviceRooted());
List<ReactPackage> packages = new PackageList(this).getPackages();
packages.add(statusPackage);
packages.add(new ReactNativeDialogsPackage());
packages.add(new RNStatusKeycardPackage());
packages.add(new PushNotificationPackage());
return packages;
}
@Override
protected String getJSMainModuleName() {
return "index";
}
};
@Override
public ReactNativeHost getReactNativeHost() {
return mReactNativeHost;
}
@Override
public void onCreate() {
super.onCreate();
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1");
initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
}
/**
* Loads Flipper in React Native templates. Call this in the onCreate method with something like
* initializeFlipper(this, getReactNativeHost().getReactInstanceManager());
*
* @param context
* @param reactInstanceManager
*/
private static void initializeFlipper(
Context context, ReactInstanceManager reactInstanceManager) {
if (BuildConfig.DEBUG) {
try {
/*
We use reflection here to pick up the class that initializes Flipper,
since Flipper library is not available in release mode
*/
Class<?> aClass = Class.forName("im.status.ethereum.ReactNativeFlipper");
aClass
.getMethod("initializeFlipper", Context.class, ReactInstanceManager.class)
.invoke(null, context, reactInstanceManager);
} catch (ClassNotFoundException e) {
e.printStackTrace();
} catch (NoSuchMethodException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
}
@@ -1,61 +0,0 @@
package im.status.ethereum
import android.webkit.WebView
import androidx.multidex.MultiDexApplication
import com.facebook.react.PackageList
import com.facebook.react.ReactApplication
import com.facebook.react.ReactNativeHost
import com.facebook.react.ReactPackage
import com.facebook.react.bridge.JSIModulePackage
import com.facebook.react.defaults.DefaultNewArchitectureEntryPoint
import com.facebook.react.modules.network.OkHttpClientProvider
import com.reactnativenavigation.NavigationApplication
import com.reactnativenavigation.react.NavigationReactNativeHost
import cl.json.RNSharePackage
import com.reactnativecommunity.blurview.BlurViewPackage
import im.status.ethereum.keycard.RNStatusKeycardPackage
import im.status.ethereum.module.StatusPackage
import im.status.ethereum.pushnotifications.PushNotificationPackage
import im.status.ethereum.StatusOkHttpClientFactory
class MainApplication : NavigationApplication() {
private val mReactNativeHost = object : NavigationReactNativeHost(this) {
override fun getUseDeveloperSupport(): Boolean {
return BuildConfig.DEBUG
}
override fun getPackages(): List<ReactPackage> {
val statusPackage = StatusPackage(RootUtil.isDeviceRooted())
val packages = PackageList(this).getPackages()
packages.add(statusPackage)
packages.add(RNStatusKeycardPackage())
packages.add(PushNotificationPackage())
packages.add(BlurViewPackage())
return packages
}
override fun getJSMainModuleName(): String = "index"
override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED
override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED
}
override fun getReactNativeHost(): ReactNativeHost {
return mReactNativeHost
}
override fun onCreate() {
super.onCreate()
OkHttpClientProvider.setOkHttpClientFactory(StatusOkHttpClientFactory())
WebView.setWebContentsDebuggingEnabled(BuildConfig.DEBUG_WEBVIEW == "1")
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
// If you opted-in for the New Architecture, we load the native entry point for this app.
DefaultNewArchitectureEntryPoint.load()
}
}
}
@@ -1,88 +0,0 @@
package im.status.ethereum
import android.util.Log
import com.facebook.react.modules.network.OkHttpClientFactory
import com.facebook.react.modules.network.OkHttpClientProvider
import okhttp3.OkHttpClient
import okhttp3.tls.HandshakeCertificates
import java.io.ByteArrayInputStream
import java.lang.RuntimeException
import java.lang.reflect.Field
import java.lang.reflect.Method
import java.security.cert.CertificateFactory
import java.security.cert.X509Certificate
import im.status.ethereum.module.StatusPackage
class StatusOkHttpClientFactory : OkHttpClientFactory {
companion object {
private const val TAG = "StatusOkHttpClientFactory"
private const val SLEEP_DURATION = 500L // milliseconds
}
override fun createNewNetworkModuleClient(): OkHttpClient? {
val certPem = getCertificatePem().takeIf { it.isNotEmpty() }
?: return logAndReturnNull("Certificate is empty, cannot create OkHttpClient without a valid certificate")
val cert = try {
induceSleep()
// Convert PEM certificate string to X509Certificate object
CertificateFactory.getInstance("X.509")
.generateCertificate(ByteArrayInputStream(certPem.toByteArray())) as? X509Certificate
?: return logAndReturnNull("Certificate could not be parsed as non-null")
} catch (e: Exception) {
return logAndReturnNull("Could not parse certificate", e)
}
val clientCertificates = try {
induceSleep()
// Create HandshakeCertificates object with our certificate
HandshakeCertificates.Builder()
.addPlatformTrustedCertificates()
.addTrustedCertificate(cert)
.build()
} catch (e: Exception) {
return logAndReturnNull("Could not build HandshakeCertificates", e)
}
return try {
OkHttpClientProvider.createClientBuilder()
.sslSocketFactory(clientCertificates.sslSocketFactory(), clientCertificates.trustManager)
.build()
} catch (e: Exception) {
logAndReturnNull("Could not create OkHttpClient", e)
}
}
private fun getCertificatePem(): String {
return try {
// Create OkHttpClient with custom SSL socket factory and trust manager
StatusPackage.getImageTLSCert().takeIf { !it.isNullOrBlank() }
?: logAndReturnEmpty("Certificate PEM string is null or empty")
} catch (e: Exception) {
logAndReturnEmpty("Could not getImageTLSCert", e)
}
}
private fun induceSleep() {
try {
// induce half second sleep because sometimes a cert is not immediately available
// TODO : remove sleep if App no longer crashes on Android 10 devices with
// java.lang.RuntimeException: Could not invoke WebSocketModule.connect
Thread.sleep(SLEEP_DURATION)
} catch (e: InterruptedException) {
Log.e(TAG, "Sleep interrupted", e)
}
}
private fun logAndReturnNull(message: String, e: Exception? = null): Nothing? {
Log.e(TAG, message, e)
return null
}
private fun logAndReturnEmpty(message: String, e: Exception? = null): String {
Log.e(TAG, message, e)
return ""
}
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 482 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 826 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

@@ -1,21 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/backgroundColor">
<com.airbnb.lottie.LottieAnimationView
android:id="@+id/lottie"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:adjustViewBounds="true"
app:lottie_rawRes="@raw/launching_animation"
app:lottie_autoPlay="true"
app:lottie_loop="true"
/>
</FrameLayout>
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_gravity="center"
android:scaleType="fitCenter"
android:src="@drawable/launch_logo"/>
</FrameLayout>
File diff suppressed because one or more lines are too long
@@ -1,5 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="alert_background">#141414</color>
<color name="alert_text">#ffffff</color>
</resources>
@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="alert_background">#ffffff</color>
<color name="alert_text">#000000</color>
<color name="splash_background">#09101C</color>
<color name="splash_status_bar_color">#ffffff</color>
</resources>
@@ -1,13 +0,0 @@
<resources xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.AppSplash" parent="Theme.SplashScreen">
<item name="windowSplashScreenBackground">@color/splash_background</item>
<item name="windowSplashScreenAnimatedIcon">@drawable/splash_logo</item>
<item name="windowSplashScreenAnimationDuration">1000</item>
<!-- Status bar and Nav bar configs -->
<item name="android:statusBarColor" tools:targetApi="l">@color/splash_background</item>
<item name="android:windowLightStatusBar">false</item>
<item name="postSplashScreenTheme">@style/DarkTheme</item>
</style>
</resources>
@@ -8,7 +8,6 @@
<item name="android:forceDarkAllowed">true</item>
<item name="android:windowTranslucentStatus">false</item>
<item name="android:statusBarColor">?attr/backgroundColor</item>
<item name="android:alertDialogTheme">@style/AlertDialogTheme</item>
</style>
<style name="LightTheme" parent="AppTheme">
@@ -22,10 +21,4 @@
<item name="backgroundColor">#000000</item>
<item name="android:windowLightStatusBar">false</item>
</style>
<style name="AlertDialogTheme" parent="Theme.AppCompat.DayNight.Dialog.Alert">
<item name="android:textColor">@color/alert_text</item>
<item name="android:textColorPrimary">@color/alert_text</item>
<item name="android:background">@color/alert_background</item>
</style>
</resources>
-2
View File
@@ -3,7 +3,5 @@
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
</manifest>
+1 -3
View File
@@ -3,7 +3,5 @@
<!-- These are added by React Native for debug mode, but actually aren't needed in release mode -->
<uses-permission tools:node="remove" android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<!-- Remove licensing permission since we don't license our app and it blocks F-Droid submissions. -->
<uses-permission tools:node="remove" android:name="com.android.vending.CHECK_LICENSE"/>
</manifest>
</manifest>
+24 -19
View File
@@ -4,30 +4,26 @@
* Project-wide gradle configuration properties for use by all modules
*/
ext {
// kotlin_version is needed for react-native-camera-kit library
kotlin_version = project.kotlinPluginVersion
RNNKotlinVersion = project.kotlinPluginVersion
RNGH_kotlinVersion = project.kotlinPluginVersion
RNNKotlinVersion = "1.4.31"
buildToolsVersion = project.buildToolsVersion
minSdkVersion = Integer.valueOf(project.minSdkVersion)
compileSdkVersion = Integer.valueOf(project.compileSdkVersion)
targetSdkVersion = Integer.valueOf(project.targetSdkVersion)
supportLibVersion = project.supportLibVersion
gradlePluginVersion = project.gradlePluginVersion
kotlinVersion = project.kotlinPluginVersion
ndkVersion = "25.2.9519653"
}
buildscript {
repositories {
flatDir { dirs "libs", "${rootDir}/app/libs" }
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${project.ext.kotlinPluginVersion}"
classpath("com.android.tools.build:gradle")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.31"
classpath "com.android.tools.build:gradle:${project.ext.gradlePluginVersion}"
// WARNING: Do not place your application dependencies here!
// They belong in the individual module build.gradle files.
}
}
@@ -48,18 +44,27 @@ subprojects {
allprojects {
beforeEvaluate {
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
}
if (System.env.STATUS_GO_ANDROID_LIBDIR == null || System.env.STATUS_GO_ANDROID_LIBDIR == "") {
throw new GradleException('STATUS_GO_ANDROID_LIBDIR environment variable is not valid!')
}
}
repositories {
mavenLocal()
// Android JSC is installed from npm
maven { url("$rootDir/../node_modules/jsc-android/dist") }
// For geth, function, and status-go
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
mavenCentral()
maven { url 'https://mvnrepository.com/artifact/com.github.gundy/semver4j'}
jcenter()
// for geth, function, and status-go
flatDir { dirs "libs", System.env.STATUS_GO_ANDROID_LIBDIR }
maven { url "https://www.jitpack.io" }
}
}
+12 -18
View File
@@ -21,14 +21,14 @@
# $keytool -genkey -v -keystore ./status-keystore.jks -keyalg RSA -keysize 2048 -validity 10000 -alias status
# Version requirements used throughout the Gradle scripts
minSdkVersion=24
compileSdkVersion=33
targetSdkVersion=33
buildToolsVersion=33.0.0
kotlinVersion=1.3.50
minSdkVersion=23
compileSdkVersion=30
targetSdkVersion=30
buildToolsVersion=31.0.0
supportLibVersion=28.0.0
# This should match version from nix/pkgs/aapt2/default.nix
gradlePluginVersion=7.4.2
kotlinPluginVersion=1.9.0
# This should match version from nix/mobile/android/maven-and-npm-deps/maven/default.nix
gradlePluginVersion=3.5.4
android.useAndroidX=true
android.enableJetifier=true
@@ -41,20 +41,14 @@ KEYSTORE_KEY_PASSWORD=password
# By default we build a mostly universal APK
ANDROID_ABI_SPLIT=false
# Some platforms are excluded though
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86;x86_64
ANDROID_ABI_INCLUDE=armeabi-v7a;arm64-v8a;x86
# F-Droid builds need to be unsigned
ANDROID_APK_SIGNED=true
org.gradle.jvmargs=-Xmx8704M
versionCode=9999
commitHash=unknown
# Use this property to enable support to the new architecture.
# This will allow you to use TurboModules and the Fabric render in
# your application. You should enable this flag either if you want
# to write custom TurboModules/Fabric components OR use libraries that
# are providing them.
newArchEnabled=false
# Use this property to enable or disable the Hermes JS engine.
# If set to false, you will be using JSC instead.
hermesEnabled=true
# Flipper
FLIPPER_VERSION=0.54.0
+2 -3
View File
@@ -12,10 +12,9 @@ apply from: file("../node_modules/@react-native-community/cli-platform-android/n
include ':react-native-nfc-manager'
project(':react-native-nfc-manager').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-nfc-manager/android')
include ':app'
include ':react-native-dialogs'
project(':react-native-dialogs').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-dialogs/android')
include ':react-native-status'
project(':react-native-status').projectDir = new File(rootProject.projectDir, '../modules/react-native-status/android')
include ':react-native-status-keycard'
project(':react-native-status-keycard').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-status-keycard/android')
include ':react-native-blur'
project(':react-native-blur').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-community/blur/android')
includeBuild('../node_modules/@react-native/gradle-plugin')
+1 -1
View File
@@ -1,4 +1,4 @@
{
"name": "StatusIm",
"displayName": "StatusIm"
}
}
-19
View File
@@ -1,19 +0,0 @@
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin', '@babel/plugin-transform-named-capturing-groups-regex'],
env: {
test: {
presets: [
'@babel/preset-react',
[
'@babel/preset-env',
{
targets: {
node: 'current',
},
},
],
],
},
},
};
-38
View File
@@ -1,38 +0,0 @@
{
"variables": {
"module_name%": "status_nodejs_addon",
"module_path%": "./lib/binding/"
},
"targets": [{
"target_name": "<(module_name)",
"sources": [
"./modules/react-native-status/nodejs/status.cpp"
],
"xcode_settings": {
"MACOSX_DEPLOYMENT_TARGET": "10.7"
},
"libraries": [
"<!(pwd)/result/libstatus.a"
],
"conditions": [
["OS=='mac'", {
"libraries": [
"-framework IOKit",
"-framework CoreFoundation",
"-framework CoreServices",
"-framework Security"
]
}]
]
}, {
"target_name": "action_after_build",
"type": "none",
"dependencies": ["<(module_name)"],
"copies": [
{
"files": [ "<(PRODUCT_DIR)/<(module_name).node" ],
"destination": "<(module_path)"
}
]
}]
}
+68 -31
View File
@@ -1,11 +1,7 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label 'linux && x86_64 && nix-2.14' }
agent { label 'linux' }
options {
timestamps()
@@ -18,11 +14,7 @@ pipeline {
artifactNumToKeepStr: '10',
))
/* Allows combined build to copy */
copyArtifactPermission('/status-mobile/*')
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
copyArtifactPermission('/status-react/*')
}
parameters {
@@ -37,29 +29,59 @@ pipeline {
LANG = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
LANGUAGE = "en_US.UTF-8"
TARGET = "android${utils.isE2EBuild() ? "-e2e" : ""}"
TARGET = 'android'
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
FASTLANE_DISABLE_COLORS = 1
/* coverage report identification */
COVERALLS_SERVICE_NAME = "jenkins"
COVERALLS_SERVICE_JOB_ID = "${JOB_NAME}#${BUILD_NUMBER}"
}
stages {
stage('Prep') {
steps {
script {
utils.symlinkEnv()
println("Build Number: ${utils.genBuildNumber()}")
btype = utils.getBuildType()
print "Running ${btype} build!"
jenkins.abortPreviousRunningBuilds()
/* Cleanup and Prep */
commonPrep(btype)
}
}
}
stage('Bundle') {
steps {
script { apks = android.bundle() }
}
}
stage('Sign') {
steps {
script { apks = android.sign(apks) }
stage('Parallel Assemble') {
parallel {
stage('Checks') { stages {
stage('Lint') {
steps {
script {
/* We want the build result to be uploaded */
catchError(
message: 'Linting check failed!',
buildResult: 'FAILURE',
stageResult: 'FAILURE'
) {
sh 'make lint'
}
}
}
}
stage('Tests') {
steps {
script {
sh 'make test'
}
}
}
} }
stage('Build') { stages {
stage('Bundle') {
steps {
script { apks = android.bundle() }
}
}
} }
}
}
stage('Parallel Upload') {
@@ -70,22 +92,37 @@ pipeline {
} }
}
stage('Upload') {
steps { script {
def urls = apks.collect { s3.uploadArtifact(it) }
if (urls.size() > 1) { /* Return only the universal APK. */
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* If no universal is available pick first. */
env.PKG_URL = urls.first()
steps {
script {
def urls = apks.collect { s3.uploadArtifact(it) }
/* return only the universal APK */
if (urls.size() > 1) {
env.PKG_URL = urls.find { it.contains('universal') }
} else { /* if no universal is available pick first */
env.PKG_URL = urls.first()
}
jenkins.setBuildDesc(APK: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = android.uploadToSauceLabs()
}
if (utils.isNightlyBuild()) {
env.DIAWI_URL = android.uploadToDiawi()
}
}
jenkins.setBuildDesc(APK: env.PKG_URL)
} }
}
}
}
}
stage('Cleanup') {
steps {
sh 'make purge'
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make purge' }
always { sh 'make _fix-node-perms' }
}
}
+25 -13
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.4'
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label 'linux' }
@@ -18,7 +17,7 @@ pipeline {
}
/* WARNING: Defining parameters here with the ?: trick causes them to remember last value. */
parameters {
parameters {
choice(
name: 'BUILD_TYPE',
description: 'Makefile target to build. Optional Parameter.',
@@ -34,7 +33,7 @@ pipeline {
stages {
stage('Prep') {
steps { script {
println("Current JOB: ${env.JOB_NAME}")
println "Current JOB: ${env.JOB_NAME}"
/* just for a shorter access */
btype = utils.getBuildType()
} }
@@ -42,13 +41,13 @@ pipeline {
stage('Build') {
parallel {
stage('iOS') { steps { script {
ios = jenkins.Build('status-mobile/platforms/ios')
ios = jenkins.Build('status-react/platforms/ios')
} } }
stage('Android') { steps { script {
apk = jenkins.Build('status-mobile/platforms/android')
apk = jenkins.Build('status-react/platforms/android')
} } }
stage('Tests') { steps { script {
jenkins.Build('status-mobile/platforms/tests')
stage('Android e2e') { steps { script {
apke2e = jenkins.Build('status-react/platforms/android-e2e')
} } }
}
}
@@ -56,7 +55,9 @@ pipeline {
steps { script {
sh('rm -f pkg/*')
jenkins.copyArts(ios)
//jenkins.copyArts(iose2e)
jenkins.copyArts(apk)
jenkins.copyArts(apke2e)
sha = "pkg/${utils.pkgFilename(ext: 'sha256')}"
dir('pkg') {
/* generate sha256 checksums for upload */
@@ -70,9 +71,9 @@ pipeline {
/* object for easier URLs handling */
urls = [
/* mobile */
Apk: utils.pkgUrl(apk),
iOS: utils.pkgUrl(ios),
Diawi: utils.getEnv(ios, 'DIAWI_URL'),
Apk: utils.pkgUrl(apk), Apke2e: utils.pkgUrl(apke2e),
iOS: utils.pkgUrl(ios), /*iOSe2e: utils.pkgUrl(iose2e),*/
Diawi: utils.utils.getEnv(ios, 'DIAWI_URL'),
/* upload the sha256 checksums file too */
SHA: s3.uploadArtifact(sha),
]
@@ -90,11 +91,22 @@ pipeline {
build(job: 'website/status.im', wait: false);
break;
case 'release':
github.publishReleaseFiles(repo: 'status-mobile');
github.publishReleaseFiles(repo: 'status-react');
break;
}
} }
}
stage('Run e2e') {
when { expression { btype == 'nightly' && params.PUBLISH } }
steps { script {
e2eApk = utils.getEnv(apke2e, 'SAUCE_URL')
build(
job: 'end-to-end-tests/status-app-nightly',
parameters: [string(name: 'APK_NAME', value: e2eApk)],
wait: false
)
} }
}
}
}
@@ -114,7 +126,7 @@ def List genChoices(String previousChoice, List defaultChoices) {
* - A user explicitly specified a value
* Since release builds create and re-create GitHub drafts every time. */
def Boolean getPublishDefault(Boolean previousValue) {
if (env.JOB_NAME.startsWith('status-mobile/release')) { return true }
if (env.JOB_NAME.startsWith('status-react/release')) { return true }
if (previousValue != null) { return previousValue }
return false
}
-51
View File
@@ -1,51 +0,0 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.4'
pipeline {
agent { label 'linux' }
triggers {
// Nightly at 2am
cron 'H 2 * * *'
}
parameters {
string(
name: 'BRANCH',
description: 'Name of the branch to checkout and build.',
defaultValue: 'develop',
)
}
options {
timestamps()
disableConcurrentBuilds()
buildDiscarder(logRotator(
numToKeepStr: '10',
daysToKeepStr: '30',
))
}
stages {
stage('Build') {
steps {
script {
apk_build = jenkins.Build('status-mobile/platforms/android-e2e')
apk_build_number = apk_build.getNumber().toString()
}
}
}
stage('Run e2e') {
steps {
build(
job: 'status-mobile/e2e/status-app-nightly',
parameters: [
string(name: 'APK_BUILD_NUMBER', value: apk_build_number),
string(name: 'BRANCH', value: env.BRANCH),
]
)
}
}
}
}
+64 -32
View File
@@ -1,11 +1,7 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label 'macos && arm64 && nix-2.14 && xcode-15.1' }
agent { label 'macos-xcode-12.5' }
parameters {
string(
@@ -26,11 +22,7 @@ pipeline {
artifactNumToKeepStr: '10',
))
/* Allows combined build to copy */
copyArtifactPermission('/status-mobile/*')
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
copyArtifactPermission('/status-react/*')
}
environment {
@@ -49,24 +41,51 @@ pipeline {
stage('Prep') {
steps {
script {
utils.symlinkEnv()
println("Build Number: ${utils.genBuildNumber()}")
btype = utils.getBuildType()
print "Running ${btype} build!"
jenkins.abortPreviousRunningBuilds()
/* Cleanup and Prep */
commonPrep(btype)
}
}
}
stage('JSBundle') {
steps {
script { ios.jsbundle() }
}
}
stage('Bundle') {
steps {
script { api = ios.bundle() }
}
post {
failure {
archiveArtifacts 'ios/logs/*'
}
stage('Parallel Assemble') {
parallel {
stage('Checks') { stages {
stage('Lint') {
steps {
script {
/* We want the build result to be uploaded */
catchError(
message: 'Linting check failed!',
buildResult: 'FAILURE',
stageResult: 'FAILURE'
) {
sh 'make lint'
}
}
}
}
stage('Tests') {
steps {
script {
sh 'make test'
}
}
}
} }
stage('Build') { stages {
stage('JSBundle') {
steps {
script { ios.jsbundle() }
}
}
stage('Bundle') {
steps {
script { api = ios.bundle() }
}
}
} }
}
}
stage('Parallel Upload') {
@@ -77,18 +96,31 @@ pipeline {
}
}
stage('Upload') {
steps { script {
env.DIAWI_URL = ios.uploadToDiawi()
env.PKG_URL = env.DIAWI_URL
jenkins.setBuildDesc(IPA: env.PKG_URL)
} }
steps {
script {
env.PKG_URL = s3.uploadArtifact(api)
jenkins.setBuildDesc(IPA: env.PKG_URL)
/* e2e builds get tested in SauceLabs */
if (utils.isE2EBuild()) {
env.SAUCE_URL = ios.uploadToSauceLabs()
} else {
env.DIAWI_URL = ios.uploadToDiawi()
}
}
}
}
}
}
stage('Cleanup') {
steps {
sh 'make watchman-clean'
sh 'make purge'
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make purge' }
always { sh 'make _fix-node-perms' }
}
}
+116
View File
@@ -0,0 +1,116 @@
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label params.AGENT_LABEL }
parameters {
string(
name: 'NIX_CACHE_HOST',
description: 'FQDN of Nix binary cache host.',
defaultValue: params.NIX_CACHE_HOST ?: 'cache-01.do-ams3.nix.ci.statusim.net'
)
string(
name: 'NIX_CACHE_USER',
description: 'Username for Nix binary cache host.',
defaultValue: params.NIX_CACHE_USER ?: 'nix-cache'
)
}
environment {
/* See nix/README.md */
NIX_IGNORE_SYMLINK_STORE = 1
/* we source .bash_profile to be able to use nix-store */
NIX_SSHOPTS = "-o StrictHostKeyChecking=no source .profile;"
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
}
options {
timestamps()
disableConcurrentBuilds()
/* Prevent Jenkins jobs from running forever */
timeout(time: 300, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
stages {
stage('Setup') {
steps { script {
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
/* some build targets don't build on MacOS */
uname = sh(script: 'uname', returnStdout: true)
} }
}
stage('Build status-go') {
steps { script {
def platforms = ['mobile.android', 'mobile.ios']
if (uname != "Darwin") {
platforms.removeAll { it == "ios" }
}
platforms.each { os ->
nix.build(
attr: "targets.status-go.${os}.buildInputs",
sandbox: false,
link: false
)
}
} }
}
stage('Build android jsbundle') {
steps { script {
/* build/fetch things required to produce a js-bundle for android
* (e.g. maven and node repos) */
nix.build(
attr: 'targets.mobile.android.jsbundle',
sandbox: false,
pure: false,
link: false
)
} }
}
stage('Build android deps') {
steps { script {
/* build/fetch things required to build jsbundle and android */
nix.build(
attr: 'targets.mobile.android.release.buildInputs',
sandbox: false,
pure: false,
link: false
)
} }
}
stage('Build nix shell deps') {
steps { script {
/* build/fetch things required to instantiate shell.nix for TARGET=all */
nix.build(
attr: 'shells.default.buildInputs',
sandbox: false,
link: false
)
} }
}
stage('Upload') {
steps { script {
sshagent(credentials: ['nix-cache-ssh']) {
nix.shell("""
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
-not -name '*.links' -and -not -name '*-status-react-*' \
| xargs nix-copy-closure -v \
--to ${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}
""",
pure: false
)
}
} }
}
}
post {
always { script {
nix.shell('nix-store --optimize', pure: false)
nix.shell('nix/scripts/clean.sh', pure: false)
} }
}
}
-94
View File
@@ -1,94 +0,0 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.8.4'
/* Options section can't access functions in objects. */
def isPRBuild = utils.isPRBuild()
pipeline {
agent { label 'linux && x86_64 && nix-2.14' }
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 15, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '10',
daysToKeepStr: '20',
artifactNumToKeepStr: '10',
))
/* Abort old PR builds. */
disableConcurrentBuilds(
abortPrevious: isPRBuild
)
}
parameters {
string(
name: 'BUILD_TYPE',
description: 'Specify build type. Values: pr / e2e / nightly / release',
defaultValue: 'pr',
)
}
environment {
LANG = "en_US.UTF-8"
LC_ALL = "en_US.UTF-8"
LANGUAGE = "en_US.UTF-8"
TARGET = 'tests'
BUILD_ENV = 'prod'
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
LOG_FILE = utils.pkgFilename(ext: 'log', arch: 'tests')
}
stages {
stage('Checks') {
parallel {
stage('Lint') {
steps {
sh """#!/bin/bash
set -eo pipefail
make lint CLJ_LINTER_PRINT_WARNINGS=true 2>&1 | tee ${LOG_FILE}
"""
}
}
stage('Unit Tests') {
steps {
sh """#!/bin/bash
set -eo pipefail
make test-unit 2>&1 | tee -a ${LOG_FILE}
"""
}
}
}
}
stage('Integration Tests') {
steps {
sh """#!/bin/bash
set -eo pipefail
make test-integration 2>&1 | tee -a ${LOG_FILE}
"""
}
}
stage('Component Tests') {
steps {
sh """#!/bin/bash
set -eo pipefail
make component-test 2>&1 | tee -a ${LOG_FILE}
"""
}
}
stage('Upload') {
steps {
script {
env.PKG_URL = s3.uploadArtifact(LOG_FILE)
}
}
}
}
post {
success { script { github.notifyPR(true) } }
failure { script { github.notifyPR(false) } }
always { sh 'make purge' }
}
}
+10 -44
View File
@@ -1,29 +1,16 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
pipeline {
agent { label 'linux' }
parameters {
string(
name: 'APK_BUILD_NUMBER',
description: 'platform/e2e build number for apk artifact',
name: 'NETWORK',
description: 'Name of test network to use.',
defaultValue: 'ropsten',
)
string(
name: 'KEYWORD_EXPRESSION',
description: 'This will run tests which contain names that match the given string expression (Optional)',
defaultValue: '',
)
string(
name: 'BRANCH',
description: 'Name of the branch to checkout and build.',
defaultValue: 'develop',
)
string(
name: 'TR_CASE_IDS',
description: 'IDs of the TestRail case, separated by a comma (Optional)',
defaultValue: '',
name: 'APK_NAME',
description: 'Filename of APK uploaded to SauceLabs.',
)
}
@@ -31,19 +18,8 @@ pipeline {
disableConcurrentBuilds()
}
stages {
stage('Fetch') {
steps { script {
copyArtifacts(
projectName: "status-mobile/platforms/android-e2e",
filter: 'result/*-x86_64.apk',
selector: specific(env.APK_BUILD_NUMBER),
)
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*-x86_64.apk')}"
} }
}
stage('Setup') {
steps { script {
dir('test/appium') {
@@ -51,7 +27,6 @@ pipeline {
}
} }
}
stage('Test') {
steps {
withCredentials([
@@ -73,23 +48,17 @@ pipeline {
credentialsId: 'infura-e2e-token',
variable: 'WEB3_INFURA_PROJECT_ID'
),
file(
credentialsId: "mobile-tests-eth-accounts",
variable: 'TEST_ETH_ACCOUNTS_FILE'
),
]) {
dir('test/appium/tests') {
/* Provide Eth test accounts secrets. */
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 8 \
--numprocesses 15 \
--rerun_count=2 \
--testrail_report=True \
-m testrail_id \
-m \"new_ui_critical or new_ui_medium\" \
-k \"${params.KEYWORD_EXPRESSION}\" \
--apk=${params.APK_URL ?: apk_path}
-m "not upgrade" \
--network=${params.NETWORK} \
--apk=${params.APK_NAME}
"""
}
}
@@ -113,8 +82,5 @@ pipeline {
)
}
}
cleanup {
sh 'make purge'
}
}
}
+24 -63
View File
@@ -1,6 +1,3 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
pipeline {
agent { label 'linux' }
@@ -11,66 +8,42 @@ pipeline {
description: 'Name of the branch to checkout and build.',
defaultValue: 'develop',
)
string(
name: 'NETWORK',
description: 'Name of test network to use.',
defaultValue: 'ropsten',
)
string(
name: 'TEST_MARKERS',
description: 'Marker expression for matching tests to run.',
defaultValue: 'critical or high',
)
string(
name: 'APK_NAME',
description: 'Filename of APK uploaded to SauceLabs, path, or URL.',
)
string(
name: 'PR_ID',
description: 'ID of the Pull Request triggering this build.',
)
string(
name: 'APK_URL',
description: 'Optional, set if job require APK to be downloaded from URL.',
)
string(
name: 'KEYWORD_EXPRESSION',
description: 'This will run tests which contain names that match the given string expression (Optional)',
defaultValue: '',
)
string(
name: 'TR_CASE_IDS',
description: 'IDs of the TestRail case, separated by a comma (Optional)',
description: 'IDs of the TestRail case, separated by a comma. (Optional)',
defaultValue: '',
)
/* FIXME: Remove this no longer relevant argument */
string(
name: 'APK_NAME',
description: 'OBSOLETE ARGUMENT TO BE REMOVED',
defaultValue: 'DUMMY',
)
/* Commented to use TEST_MARKERS values from job params
string(
name: 'TEST_MARKERS',
description: 'Marker expression for matching tests to run.',
defaultValue: 'new_ui_critical',
)
*/
}
options {
disableConcurrentBuilds()
timeout(time: 90, unit: 'MINUTES')
}
stages {
stage('Prep') {
stage('Checks') {
steps { script {
currentBuild.displayName = "PR-${params.PR_ID}"
if (params.PR_ID == null) {
error("PR_ID parameter not set!")
}
if (params.APK_NAME == null) { error("APK_NAME parameter not set!") }
if (params.PR_ID == null) { error("PR_ID parameter not set!") }
} }
}
stage('Fetch') {
when { expression { !params.APK_URL } }
steps { script {
copyArtifacts(
projectName: "status-mobile/prs/android-e2e/PR-${params.PR_ID}",
/* WARNING: This copies the latest available artifact. */
selector: lastWithArtifacts(),
)
apk_path = "${env.WORKSPACE}/${utils.findFile('result/*.apk')}"
} }
}
stage('Setup') {
steps { script {
dir('test/appium') {
@@ -78,15 +51,13 @@ pipeline {
}
} }
}
stage('Test') {
steps { script {
currentBuild.displayName = "PR-${params.PR_ID}"
/* for managing optional arguments */
def extraPytestOpts = ''
if (params.TR_CASE_IDS != '') {
extraPytestOpts = "--run_testrail_ids='${params.TR_CASE_IDS}'"
} else {
extraPytestOpts = "-m \"${params.TEST_MARKERS}\""
}
withCredentials([
@@ -113,22 +84,17 @@ pipeline {
credentialsId: 'infura-e2e-token',
variable: 'WEB3_INFURA_PROJECT_ID'
),
file(
credentialsId: "mobile-tests-eth-accounts",
variable: 'TEST_ETH_ACCOUNTS_FILE'
),
]) {
dir('test/appium/tests') {
/* Provide Eth test account secrets. */
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
--numprocesses 8 \
--numprocesses 15 \
--rerun_count=2 \
--testrail_report=True \
-k \"${params.KEYWORD_EXPRESSION}\" \
--apk=${params.APK_URL ?: apk_path} \
--build=PR-${params.PR_ID}-${utils.timestamp()} \
-m "${params.TEST_MARKERS}" \
--network=${params.NETWORK} \
--apk=${params.APK_NAME} \
--build=PR-${params.PR_ID} \
--pr_number=${params.PR_ID} \
${extraPytestOpts}
"""
@@ -137,9 +103,4 @@ pipeline {
} }
}
}
post {
cleanup {
sh 'make purge'
}
}
}
+16 -51
View File
@@ -1,28 +1,20 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
pipeline {
agent { label 'linux' }
parameters {
string(
name: 'APK_URL',
description: 'URL of APK to be tested(base for upgrade, usually release build)',
name: 'NETWORK',
description: 'Name of test network to use',
defaultValue: 'ropsten',
)
string(
name: 'APK_NAME',
description: 'Filename of APK uploaded to SauceLabs (base for upgrade, usually release build)',
)
string(
name: 'APK_URL_UPGRADE',
description: 'URL of APK of upgraded application (installed on top of base)',
)
string(
name: 'KEYWORD_EXPRESSION',
description: 'This will run tests which contain names that match the given string expression (Optional)',
defaultValue: '',
)
string(
name: 'TR_CASE_IDS',
description: 'IDs of the TestRail case, separated by a comma (Optional)',
defaultValue: '',
name: 'APK_NAME_UPGRADE',
description: 'Filename of APK of upgraded application (installed on top of base)',
)
}
@@ -32,17 +24,6 @@ pipeline {
stages {
stage('Prep') {
steps { script {
if (params.APK_URL == null) {
error("APK_URL parameter not set!")
}
if (params.APK_URL_UPGRADE == null) {
error("APK_URL_UPGRADE parameter not set!")
}
} }
}
stage('Setup') {
steps { script {
dir('test/appium') {
@@ -50,14 +31,8 @@ pipeline {
}
} }
}
stage('Test') {
steps { script {
/* for managing optional arguments */
def extraPytestOpts = ''
if (params.TR_CASE_IDS != '') {
extraPytestOpts = "--run_testrail_ids='${params.TR_CASE_IDS}'"
}
steps {
withCredentials([
usernamePassword(
credentialsId: 'test-rail-api',
@@ -77,29 +52,22 @@ pipeline {
credentialsId: 'infura-e2e-token',
variable: 'WEB3_INFURA_PROJECT_ID'
),
file(
credentialsId: "mobile-tests-eth-accounts",
variable: 'TEST_ETH_ACCOUNTS_FILE'
),
]) {
dir('test/appium/tests') {
/* Provide Eth test accounts secrets. */
sh 'cp -f $TEST_ETH_ACCOUNTS_FILE users.py'
sh """
python3 -m pytest \
-m "upgrade" \
-k \"${params.KEYWORD_EXPRESSION}\" \
--numprocesses 4 \
-m upgrade \
--numprocesses 15 \
--rerun_count=2 \
--testrail_report=True \
--apk=${params.APK_URL} \
--apk_upgrade=${params.APK_URL_UPGRADE} \
${extraPytestOpts}
--network=${params.NETWORK} \
--apk=${params.APK_NAME} \
--apk_upgrade=${params.APK_NAME_UPGRADE}
"""
}
}
}
} }
}
}
post {
@@ -118,8 +86,5 @@ pipeline {
)
}
}
cleanup {
sh 'make purge'
}
}
}
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label 'macos' }
-138
View File
@@ -1,138 +0,0 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
pipeline {
agent { label params.AGENT_LABEL }
parameters {
string(
name: 'NIX_CACHE_HOST',
description: 'FQDN of Nix binary cache host.',
defaultValue: params.NIX_CACHE_HOST ?: 'cache-01.do-ams3.nix.ci.statusim.net'
)
string(
name: 'NIX_CACHE_USER',
description: 'Username for Nix binary cache host.',
defaultValue: params.NIX_CACHE_USER ?: 'nix-cache'
)
}
environment {
/* See nix/README.md */
NIX_IGNORE_SYMLINK_STORE = 1
/* we source .bash_profile to be able to use nix-store */
NIX_SSHOPTS = "-oStrictHostKeyChecking=no"
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
NIX_STORE_CMD = '/nix/var/nix/profiles/default/bin/nix-store'
NIX_SSH_REMOTE = "ssh://${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST}?remote-program=${env.NIX_STORE_CMD}"
}
options {
timestamps()
disableConcurrentBuilds()
/* Prevent Jenkins jobs from running forever */
timeout(time: 120, unit: 'MINUTES')
/* Limit builds retained */
buildDiscarder(logRotator(
numToKeepStr: '20',
daysToKeepStr: '30',
))
}
stages {
stage('Setup') {
steps { script {
nix.shell('nix-env -i openssh', sandbox: false, pure: false)
/* some build targets don't build on MacOS */
os = sh(script: 'uname', returnStdout: true).trim()
arch = sh(script: 'arch', returnStdout: true).trim()
} }
}
stage('Build status-go') {
steps { script {
def platforms = ['mobile.android', 'mobile.ios', 'library']
if (os != 'Darwin') { platforms.removeAll { it == 'mobile.ios' } }
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
if (arch == 'arm64') { platforms.removeAll { it == 'mobile.android' } }
platforms.each { platform ->
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, platform)
nix.build(
attr: "targets.status-go.${platform}",
sandbox: false,
link: false
)
}
} }
}
stage('Build android jsbundle') {
steps { script {
/* Build/fetch deps required for jsbundle build. */
nix.build(
attr: 'targets.mobile.jsbundle',
sandbox: false,
pure: false,
link: false
)
} }
}
stage('Build android deps') {
steps { script {
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, 'android')
/* Build/fetch deps required to build android release. */
nix.build(
attr: 'targets.mobile.android.release.buildInputs',
sandbox: false,
pure: false,
link: false
)
} }
}
stage('Build nix shell deps') {
steps { script {
def shells = ['android', 'ios', 'fastlane', 'keytool', 'clojure', 'gradle']
if (os != 'Darwin') { shells.removeAll { it == 'ios' } }
/* FIXME: "'x86_64-darwin' with features {} is required to build" */
if (arch == 'arm64') { shells.removeAll { it == 'android' } }
/* Build/fetch deps required to start default Nix shell. */
shells.each { shell ->
/* Allow for Android builds on Apple ARM. */
env.NIXPKGS_SYSTEM_OVERRIDE = nixSysOverride(os, arch, shell)
nix.build(
attr: "shells.${shell}.buildInputs",
sandbox: false,
link: false
)
}
} }
}
stage('Upload') {
steps { script {
sshagent(credentials: ['nix-cache-ssh']) {
nix.shell("""
find /nix/store/ -mindepth 1 -maxdepth 1 -type d \
-not -name '*.links' -and -not -name '*-status-mobile-*' \
| xargs nix copy --to ${NIX_SSH_REMOTE}
""",
pure: false
)
}
} }
}
}
post {
always { script {
nix.shell('nix-store --optimize', pure: false)
nix.shell('nix/scripts/clean.sh', pure: false)
} }
}
}
def nixSysOverride(os, arch, target='android') {
return (
os == 'Darwin' &&
arch == 'arm64' &&
target =~ /.*android$/
) ? 'x86_64-darwin' : ''
}
+1 -2
View File
@@ -1,5 +1,4 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
library 'status-jenkins-lib@v1.3.3'
pipeline {
agent { label 'linux' }
+1 -2
View File
@@ -1,4 +1,3 @@
#!/usr/bin/env groovy
/**
* This job runs daily and executes `pod repo update` on MacOS
* This is done to avoid issues with out of date repo causing errors like:
@@ -30,7 +29,7 @@ pipeline {
name: 'HOST_LABEL',
description: 'Label of host to run on',
/* Using startTimeInMillis to randomize which host gets the update. */
defaultValue: "maci7-0${(currentBuild.startTimeInMillis % 3) + 1}",
defaultValue: "macos-0${(currentBuild.startTimeInMillis % 3) + 1}",
)
}
-48
View File
@@ -1,48 +0,0 @@
#!/usr/bin/env groovy
library 'status-jenkins-lib@v1.7.15'
pipeline {
agent {
label 'linux'
}
triggers {
cron('H 5 * * *')
}
options {
timestamps()
/* Prevent Jenkins jobs from running forever */
timeout(time: 15, unit: 'MINUTES')
/* Disable concurrent jobs */
disableConcurrentBuilds()
/* Don't keep more than 50 builds */
buildDiscarder(logRotator(numToKeepStr: '10'))
}
stages {
stage('Get Nodes') {
steps { script {
stagePerNode = nodesByLabel('macos').collectEntries {
["${it}" : generateNodeCleanupStage(it)]
}
} }
}
stage('Clean Xcode') {
steps { script {
parallel stagePerNode
} }
}
}
}
def generateNodeCleanupStage(nodeLabel) {
return { stage(nodeLabel) {
node(nodeLabel) {
dir('/Users/jenkins/Library/Developer/Xcode') {
sh 'rm -fr Archives DerivedData'
}
}
} }
}
+166
View File
@@ -0,0 +1,166 @@
## "@react-native-community/netinfo": "^3.2.1"
no known issue while updating version
used to monitor network information (connected, expensive, connection type)
## "bignumber.js": "git+https://github.com/status-im/bignumber.js.git#v4.0.2-status"
used to work with big numbers in JS
BN.js (used in web3-utils) doesn't support decimals, though we could work without decimals
should be replaced by JSBI https://github.com/GoogleChromeLabs/jsbi/blob/master/README.md
see web-utils issue: https://github.com/ethereum/web3.js/issues/2171
## "buffer": "^5.4.2"
required by bignumber.js otherwise there is a compilation error
## "chance": "^1.1.0"
used to generate guids and random values in `status-im.utils.random`
## "create-react-class": "15.6.2"
fixed version because even bugfix update causes compilation error with current version of react-native (0.59)
internal react library, used by figwheel for instance but also probably react
## "emojilib": "^2.4.0"
used for emojis
## "eth-phishing-detect": "^1.1.13"
used to check if URL is known for phishing
## "hi-base32": "^0.5.0"
used only in `status-im.browser.core` to convert base58 hash into base32 hash
TODO: could be replaced by a simple implementation of ascii to base32
## "i18n-js": "^3.3.0"
used to manage translations
## "identicon.js": "git+https://github.com/status-im/identicon.js.git#v1.2.1-status"
TODO: switch to latest upstream version, fork is seriously outdated and changes have been merged to master long time ago
used to generate identicons
## "qrcode": "^1.4.1"
used to generate QR code
## "react": "16.8.3"
react library, update based on react-native recommendation
## "react-dom": "16.4.2"
react library, update based on react-native recommendation
## "react-native": "git+https://github.com/status-im/react-native.git#v0.59.10"
react-native
TODO: forked because of specific markdown handling, should be bountied to be turned into a library so we can go back to upstream version
## "react-native-background-timer": "^2.1.1"
used to have setTimeout and setInterval that don't trigger yellow warning about long timeouts
## "react-native-camera": "git+https://github.com/status-im/react-native-camera.git#v1.1.5-1-status"
used to read QR code and take profile picture
TODO: update version, this one doesn't work with Android (done in react-native upgrade branch)
## "react-native-config": "git+https://github.com/status-im/react-native-config.git#0.11.2-1"
used to fetch config values from env
TODO: not sure fork usage is justified
## "react-native-dialogs": "^1.0.5"
used to show dialogs but only in android in list selection `status-im.ui.components.list-selection`, iOS uses action-sheet
TODO: see if we should actually remove it
## "react-native-fetch-polyfill": "^1.1.3"
used to be able to put a timeout on fetch request
TODO: check if the fetch timeout is actually aborting the request or only ignoring the callback on the response, if it
doesn't then this is useless and we are better of using a simple seTimeout
## "react-native-fs": "^2.14.1"
used for some filesystem related functions, for instance to get no-backup directory in `status-im.utils.platform`
## "react-native-gesture-handler": "1.3.0"
library used by react-navigation
use version recommended by react-navigation
## "react-native-image-crop-picker": "^0.18.2"
used for profile picture
## "react-native-image-resizer": "git+https://github.com/status-im/react-native-image-resizer.git#1.0.##-status"
used for profile picture
## "react-native-keychain": "git+https://github.com/status-im/react-native-keychain.git#v.3.0.0-status"
used for storing password when user saves password
TODO: check if fork is necessary, merge with upstream?
## "react-native-languages": "^3.0.2"
TODO DEPRECATED, should be replaced with https://github.com/react-native-community/react-native-localize
used to get user language and interact with i18n.js
## "react-native-mail": "git+https://github.com/status-im/react-native-mail.git#v3.0.8_status"
used to send email to support when phone is shaked
## "react-native-screens": "1.0.0-alpha.22"
used by react-navigation
TODO: update once bug is fixed for Android that causes crash when app is back from background after being put in background with hardware backbutton press
## "react-native-shake": "^3.3.1"
used to send email to support when phone is shaked
## "react-native-splash-screen": "^3.2.0"
used to make splash screen during initial loading
## "react-native-status-keycard": "^2.5.7"
used for keycard
## "react-native-svg": "9.7.1"
used for svg icons, mostly collectibles are using svg
TODO: updating requires a pod update on iOS
## "react-native-touch-id": "^4.4.1"
used for touch-id identification
## "react-native-webview": "git+https://github.com/status-im/react-native-webview.git#v8.0.7_3"
used for browser
## "react-navigation": "3.11.0"
used for native navigation
fixed because even bugfix version upgrade causes runtime errors with current version of react-native
## "web3-utils": "^1.2.1"
used for some abi encoding primitives
## "rn-emoji-keyboard": "https://github.com/status-im/rn-emoji-keyboard"
Used for taking emoji input, for custom emoji thumbnails for community channels
+148
View File
@@ -0,0 +1,148 @@
# Description
This document describes how to update Status APK builds for the [F-Droid](https://f-droid.org/) Android application catalogue.
# Intro
In simplest terms F-Droid requires a YAML file that defines the steps necessary to create a universal unsigned APK build. This is achieved by submitting a new app versions into the `metadata/im.status.ethereum.yml` file in the [fdroiddata](https://gitlab.com/fdroid/fdroiddata) repository.
The app builds defined this way run on servers that generate the unsigned APKs using the [fdroidserver](https://gitlab.com/fdroid/fdroidserver) software. The [server setup](https://f-droid.org/en/docs/Build_Server_Setup/) is quite involved but is not necessary unless you want to run your own instance. Normally the applications defines in `fdroiddata` are built by servers maintained by [the F-Droid volunteers](https://f-droid.org/en/contribute/).
First release of Status app was merged in [fdroid/fdroiddata#7179](https://gitlab.com/fdroid/fdroiddata/-/merge_requests/7179).
:warning: __WARNING__: Once changes are commited into `fdroiddata` repo they __cannot be changed__.
# Adding New Versions
There are two ways - automated and manual - described below.
## Automated
The script will analyze a provided APK, update the metadata file based on that information, and commit the change to [`fdroiddata`](https://gitlab.com/fdroid/fdroiddata) repo. The creation of merge request is manual.
#### Requirements:
- GitLab account
- Forked copy of the [`fdroiddata`](https://gitlab.com/fdroid/fdroiddata) repo
- Link to the release published
#### Steps
1. Use the F-Droid PR update script via `make`:
```sh
make fdroid-pr APK=StatusIm-Mobile-v1.16.0-ef34af.apk
```
The script also accepts a URL.
2. Add a fork repo:
```sh
git remote add john https://gitlab.com/john/fdroiddata.git
```
3. Push:
```sh
git push john status-im/v1.16.0
```
4. [Create a PR via the GitLab interface.](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
## Manual
You can find our configuration file at [`metadata/im.status.ethereum.yml`](https://gitlab.com/fdroid/fdroiddata/-/blob/master/metadata/im.status.ethereum.yml)
The file defines all the necessary metadata like `SourceCode`, `Website`, or `License`, but the most important key is `Builds`, which looks like this:
```yml
Builds:
- versionName: 1.12.0
versionCode: 2021022512
commit: cfb825a11b61d312af8cb5d36686af540c31f481
sudo:
- cd build/im.status.ethereum
- make fdroid-build-env
init: nix/scripts/setup.sh
output: result/app-release-unsigned.apk
scanignore:
- android/build.gradle
scandelete:
- ios
build: make release-fdroid BUILD_NUMBER=$$VERCODE$$
```
It contains a list of objects defining each release of the application. In order to add a new release simply copy a previous release object and adjust the following values:
* `versionName` - String version like `1.12.0`.
* `versionCode` - Android `versionCode`. Normally it is generated from timestamp at build time.
* `commit` - Specific commit SHA1 from which the given release was built.
The `versionCode` should be the same as the one in build that was uploaded to Play Store.
It can be found in the build logs or by using:
```
> make shell TARGET=android
> apkanalyzer manifest version-code StatusIm-Mobile-v1.12.0.apk
2021022512
```
At the bottom of the file you should also update the following keys:
* `CurrentVersion` - Same as the new `versionName` added
* `CurrentVersionCode` - Same as the `versionCode` added
Then submit a merge request to the [fdroid/fdroiddata](https://gitlab.com/fdroid/fdroiddata) repository.
:warning: __WARNING__: Currently GitLab PR builds will fail due to running as `root` instead of `vagrant` and failing to install Nix.
# Checking Builds
The simplest way to test if the app builds via F-Droid is to use the Docker image:
https://gitlab.com/fdroid/docker-executable-fdroidserver
Which is available under `registry.gitlab.com/fdroid/docker-executable-fdroidserver:latest`.
Because we use Nix to build the mobile app we need to slightly modify the image with this `Dockerfile`:
```Dockerfile
FROM registry.gitlab.com/fdroid/docker-executable-fdroidserver:latest
ARG BUILDER_UID=1000
ENV BUILDER_USER=vagrant
RUN useradd -u $BUILDER_UID $BUILDER_USER
RUN mkdir -m 0755 /nix /home/$BUILDER_USER \
&& chown -R $BUILDER_USER /nix /home/$BUILDER_USER
```
Build it using:
```
docker build --build-arg=BUILDER_UID=$UID -t statusteam/docker-executable-fdroidserver:latest .
```
Then clone the [fdroiddata](https://gitlab.com/fdroid/fdroiddata) and [fdroidserver](https://gitlab.com/fdroid/fdroidserver) repos and use it to test the build of a specific Status Android app version: `1.12.0`
```
git clone https://gitlab.com/fdroid/fdroidserver
git clone https://gitlab.com/fdroid/fdroiddata
docker run --rm \
-u $UID:$GID -e USER=vagrant \
-v $PWD/fdroiddata:/repo \
-v $PWD/fdroidserver:/fdroidserver \
statusteam/docker-executable-fdroidserver:latest \
build im.status.ethereum
```
We have to create a user and specify the UID because Nix cannot run as `root` and that is the default user for the F-Droid Docker image. By adding our own user and setting the UID we also make it possible to mount folders like `fdroiddata` and `fdroidserver`.
You can specify a `--verbose` flag for `build` command for additional information.
You can provide `--storage-opt size=30G` flag if Docker complains about running out of space.
You should also run `lint` and `rewritemeta` for the App ID to verify and fix the YAML metadata formatting.
# Details
The original research was done in [#8512](https://github.com/status-im/status-react/issues/8512).
Normally F-Droid server wants to run Gradle itself, but we do not specify the `gradle` key in order to run `make release-fdroid` ourselves in `build` step. We also add `android/build.gradle` to `scanignore` to avoid F-Droid trying to use Gradle directly.
The Android metadata like description or screenshots is [loaded from our repository](https://f-droid.org/en/docs/All_About_Descriptions_Graphics_and_Screenshots/#fastlane-structure) based on the Fastlane [`supply`](https://docs.fastlane.tools/actions/supply/) tool folder structure for updating Google Play store metadata.
Once the PR is merged it may take a few days for the F-Droid server farm to build and deploy the new version to their site and app. You can look up the current state of builds [here](https://f-droid.org/wiki/index.php?title=Special:RecentChanges&days=7&from=&hidebots=0&hideanons=1&hideliu=1&limit=500) and look for your App ID and a `deploy` change after it.
# F-Droid Build
F-Droid requires submitted applications to be free of non Open Source software. For this reason we need to exclude certain Google libraries at build time.
This is achieved by setting `GOOGLE_FREE=1` in the `.env.release` file. This affects two things:
1. [Clojure code conditional](../src/status_im/acquisition/core.cljs) which stops use of `get-referrer`.
2. [Gradle build configuration](../android/app/build.gradle) by excluding Google libraries.
Both are affected by the `.env` file and both are required.
+15
View File
@@ -0,0 +1,15 @@
# new icons
## Export icons
![](./export-icons.gif)
1. Export from figma 2 pngs 2x and 3x put them in `./resources/images/icons`
2. if necessary, rename file so that filename contains only lower case chars, e.g. `"Icon-Name@2x.png"` should be renamed to `"icon_name@2x.png"`.
3. In the app `icon_name.png` still can be accessed as `icon-name`, so in order to use can add the next code:
```clojure
;; icon_name.png
[vector-icons/icon :icon-name {:color ...}]
```
2x@2x
4. If you want paltform specific icon use `.android` or `.ios` suffixes. Example `icon_name@2x.android.png`.:w
+147
View File
@@ -0,0 +1,147 @@
# Using IntelliJ IDEA and Cursive
## Table of Contents
- [Install Cursive](#install-cursive)
- [Getting Cursive to understand `status-react`](#getting-cursive-to-understand-status-react)
- [I get a lot of `cannot be resolved`](#i-get-a-lot-of-cannot-be-resolved)
- [REPL!](#repl)
- [Connecting to REPL to IntelliJ](#connecting-to-repl-to-intellij)
- [Connecting REPL and IntelliJ to `status-react`](#connecting-repl-and-intellij-to-status-react)
## Install Cursive
See https://cursive-ide.com/userguide/index.html
## Getting Cursive to understand `status-react`
- Add this file to the root of the `status-react` project dir
- https://gist.github.com/Samyoul/f71a0593ba7a12d24dd0d5ef986ebbec
- Right click and "add as leiningen project"
<img src="images/IDE_SETUP/1_fake_project_file.png" width=75% />
## I get a lot of `cannot be resolved`
Are you getting problems where you get a lot of `cannot be resolved` on everything?
<img src="images/IDE_SETUP/2_resolve.jpeg" width=75% />
See https://cursive-ide.com/userguide/macros.html
- opt+enter (on macOS)
- resolve defview as fn and letsubs as let
- move selection on resolve and hit enter
- and select defn for defview and let for letsubs
## REPL!
### Connecting to REPL to IntelliJ
I had a number of problems connecting to REPL, the solution is as follows:
At the top of IntelliJ IDEA click on the `Add Configuration...` option:
<img src="images/IDE_SETUP/3_REPL_1.png" width=75% />
This will load the following menu:
<img src="images/IDE_SETUP/4_REPL_2.png" width=75% />
Click on the `+` icon in the top left corner of the menu.
Select `Clojure REPL > Remote`
<img src="images/IDE_SETUP/5_REPL_3.png" width=75% />
Which will load the following menu
<img src="images/IDE_SETUP/6_REPL_4.png" width=75% />
Enter the below options:
- Name = status-react
- Display Name = status-react
- Connection type = nREPL
- Connection details
- Host = 127.0.0.1
- Port = 7888
<img src="images/IDE_SETUP/7_REPL_5.png" width=75% />
Press `OK`
Now the below option will be visible.
Press the green run button
<img src="images/IDE_SETUP/8_REPL_6.png" width=75% />
You should now see an dialog with the following message:
```shell
Connecting to remote nREPL server...
Clojure 1.10.1
```
To confirm you have a working connection with REPL enter the following command in the input box below the output:
```shell
(prn 1)
```
Which should output
```shell
(prn 1)
1
=> nil
```
See below:
<img src="images/IDE_SETUP/9_REPL_7.png" width=75% />
### Connecting REPL and IntelliJ to `status-react`
**The important next step is telling REPL the context in which to interact with the code.**
Do the following:
Ensure you have 3 terminals running the following
- `make run-clojure`
- `make run-metro`
- `make run-ios` / `make run-android`
[See the STARTING GUIDE for details](STARTING_GUIDE.md#development)
Next go back to the REPL input and enter the following commands:
```clojure
(shadow/watch :mobile)
(shadow/repl :mobile)
```
See Below
<img src="images/IDE_SETUP/10_REPL_8.png" width="75%" />
Which should switch the clj file type target to cljs as shown above
Finally you are ready to test REPL.
Create a sample function to evaluate something simple like `(prn "I'm working")`, move your cursor to one of the outer parentheses. Right or `control` click and select the `REPL` option. From there select `Sync files in REPL` and then `Send '...' to REPL'`.
<img src="images/IDE_SETUP/11_REPL_9.png" width="75%" />
Alternatively you can use the shortcut commands `⇧⌘M` to sync your files and `⇧⌘P` to send the statement to REPL. You may also need to switch the REPL namespace to match the current file, which can be done manually from the dialogue box or using the `⇧⌘N` shortcut key.
Following the above should give you the below result:
<img src="images/IDE_SETUP/12_REPL_10.png" width="75%" />
🎉 Tada! Working! 🎉
---
For additional details on issues you may face when setting up REPL with Cursive [see this document](https://notes.status.im/9Gr7kqF8SzC_SmYK0eB7uQ?view#Connecting-Cursive--IntelliJ-IDEA-to-REPL-Problems)
-63
View File
@@ -1,63 +0,0 @@
## Getting Started
[Starting Guide](starting-guide.md)
[IDE Setup](ide-setup.md)
## Development Process
[Coding guidelines](new-guidelines.md)
[Release Checklist](release-checklist.md)
[Release Guide](release-guide.md)
[Merging PR process](merging-pr-process.md)
[PR Review Policy](pr-review-policy.md)
[Working on PR together with QA team](pipeline_process.md)
[Debugging](debugging.md)
[Patching](patching.md)
[Creating a pixel perfect UI](pixel-perfection.md)
[Contributing to status-go](status-go-changes.md)
## Testing
[How to run local tests](testing.md)
[End-to-end tests (e2e) overview](how-to-launch-e2e.md)
[Component tests (jest) overview](component-tests-overview.md)
## Project details
[status-go introduction (recorded meeting)](https://drive.google.com/file/d/1B7TljmTZ8fHkqJH8ChU1Cp4FGDFM03gq/view)
[re-frame usage (recorded meeting)](https://drive.google.com/file/d/1qv_E0CEGzQpu_zGXD0gCTU5EvhC2k8Jy/view)
[status app functionality demo](https://drive.google.com/file/u/0/d/1PmwsMLTLDNNIdv5_6wvMOwoj2PfT50c6/view)
## Misc
[Importing icons from Figma into project](export-icons.md)
[Updating Status APK builds for the F-Droid Android application catalogue](fdroid.md)
[Troubleshooting for known errors](troubleshooting.md)
## Outdated:
[Old guidelines](codebase-structure-and-guidelines.md)
[Post mortem analysis](post-mortem.md)
+21
View File
@@ -0,0 +1,21 @@
#### Before submission
- [ ] Feature or improvements release? (Feature release needs more lead time and assets for comms)
- [ ] Sign off by QA
- [ ] App store listing content reviewed and updated ([copy](https://docs.google.com/spreadsheets/d/1fLDr3BD1dcg0dolvLiozXoZU27IQirjBzn0h4_QS2u0/edit#gid=0), [images](https://www.dropbox.com/sh/6baklctvxy3nuoo/AACG9kYIVdt2qREW76rP8SP-a?dl=0) )
- [ ] Play store content reviewed and updated
- [ ] Release notes written and added (500 character limit for updates (Android), no Android references for App store)
- [ ] Comms timeframe agreed on (Mon/Tue ping when both submissions are in)
- [ ] Privacy policy reviewed and updated
- [ ] App translations for key features merged and tested
- [ ] Countries to be excluded
- [ ] Changes to our FAQ made
#### Before publishing
- [ ] Translations for comms available
- [ ] Promotional content ready
- [ ] Update Draft with release on https://github.com/status-im/status-react/releases
- [ ] Add release to DO store and [update site](https://notes.status.im/s/status-release-upload#) (Jakub - requires credentials to upload)
#### At time of publishing
- [ ] validate draft release on github release page https://github.com/status-im/status-react/releases
- [ ] update https://github.com/status-im/status-react/blob/develop/RELEASES.md with release notes

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