Compare commits
13
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
89d7f4a950 | ||
|
|
c96d3f427a | ||
|
|
1d3e0be2e2 | ||
|
|
52cbdf2aaa | ||
|
|
32fe1a04e1 | ||
|
|
0dab5b47ad | ||
|
|
ec58e7e3c4 | ||
|
|
7d60849b13 | ||
|
|
cb1f807841 | ||
|
|
3c3ef20769 | ||
|
|
2150f6db48 | ||
|
|
10101a23e6 | ||
|
|
f75fff9dd8 |
@@ -36,3 +36,4 @@ SHOW_NOT_IMPLEMENTED_FEATURES=0
|
||||
ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -40,3 +40,4 @@ ENABLE_ALERT_BANNER=0
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
MOBILE_DATA_SYNCING_TOGGLE_ENABLE=0
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -37,3 +37,4 @@ TEST_NETWORKS_ENABLED=1
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=1
|
||||
SENTRY_ENVIRONMENT=ci-main
|
||||
|
||||
@@ -24,3 +24,4 @@ TEST_NETWORKS_ENABLED=0
|
||||
ENABLE_ALERT_BANNER=1
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=0
|
||||
SENTRY_ENVIRONMENT=ci-nightly
|
||||
|
||||
@@ -21,3 +21,4 @@ TEST_NETWORKS_ENABLED=0
|
||||
STATUS_PROXY_STAGE_NAME=prod
|
||||
FLAG_WALLET_CONNECT_ENABLED=1
|
||||
API_LOGGING_ENABLED=0
|
||||
SENTRY_ENVIRONMENT=production
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.15'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -41,6 +41,7 @@ pipeline {
|
||||
BUILD_ENV = 'prod'
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.15'
|
||||
|
||||
import groovy.json.JsonBuilder
|
||||
|
||||
|
||||
+2
-1
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env groovy
|
||||
library 'status-jenkins-lib@v1.9.13'
|
||||
library 'status-jenkins-lib@v1.9.15'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
@@ -41,6 +41,7 @@ pipeline {
|
||||
NIX_CONF_DIR = "${env.WORKSPACE}/nix"
|
||||
FASTLANE_DISABLE_COLORS = 1
|
||||
BUNDLE_PATH = "${HOME}/.bundle"
|
||||
SENTRY_PRODUCTION = "${utils.isReleaseBuild() ? 'true' : 'false'}"
|
||||
}
|
||||
|
||||
stages {
|
||||
|
||||
+9
@@ -108,6 +108,15 @@ class StatusModule(private val reactContext: ReactApplicationContext, private va
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun intendedPanic(message: String) {
|
||||
StatusBackendClient.executeStatusGoRequest(
|
||||
endpoint = "IntendedPanic",
|
||||
requestBody = "",
|
||||
statusgoFunction = { Statusgo.intendedPanic(message) },
|
||||
)
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
fun addCentralizedMetric(request: String, callback: Callback) {
|
||||
StatusBackendClient.executeStatusGoRequestWithCallback(
|
||||
|
||||
@@ -109,6 +109,13 @@ RCT_EXPORT_METHOD(getNodeConfig:(RCTResponseSenderBlock)callback) {
|
||||
callback:callback];
|
||||
}
|
||||
|
||||
RCT_EXPORT_METHOD(intendedPanic:(NSString *)message) {
|
||||
#if DEBUG
|
||||
NSLog(@"IntendedPanic() method called");
|
||||
#endif
|
||||
StatusgoIntendedPanic(message);
|
||||
}
|
||||
|
||||
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(fleets) {
|
||||
return [StatusBackendClient executeStatusGoRequestWithResult:@"Fleets"
|
||||
body:@""
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
, outputFileName ? "status-go-${source.shortRev}-${platform}.aar" }:
|
||||
|
||||
let
|
||||
inherit (lib) concatStringsSep optionalString optional splitString;
|
||||
inherit (lib) concatStringsSep optionalString optional splitString fileContents;
|
||||
isIOS = platform == "ios";
|
||||
isAndroid = platform == "android";
|
||||
enforceXCodeAvailable = callPackage ./enforceXCodeAvailable.nix { };
|
||||
@@ -46,6 +46,10 @@ in buildGoPackage rec {
|
||||
# TODO: try removing when go is upgraded to 1.22
|
||||
GODEBUG = "netdns=cgo+2";
|
||||
|
||||
# Sentry for status-go
|
||||
SENTRY_CONTEXT_NAME = "status-mobile";
|
||||
SENTRY_CONTEXT_VERSION = fileContents ../../../VERSION;
|
||||
|
||||
preBuild = ''
|
||||
echo 'Generate static files'
|
||||
pushd go/src/$goPackagePath
|
||||
|
||||
@@ -45,6 +45,7 @@ SECRETS_ENV_VARS=(
|
||||
'MIXPANEL_APP_ID'
|
||||
'MIXPANEL_TOKEN'
|
||||
'POKT_TOKEN'
|
||||
'SENTRY_DSN_STATUS_GO'
|
||||
)
|
||||
|
||||
# Secrets like this can't be passed via args or they end up in derivation.
|
||||
|
||||
+2
-1
@@ -123,7 +123,8 @@
|
||||
status-im.config/ALCHEMY_ARBITRUM_MAINNET_TOKEN #shadow/env "ALCHEMY_ARBITRUM_MAINNET_TOKEN"
|
||||
status-im.config/ALCHEMY_ARBITRUM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_ARBITRUM_SEPOLIA_TOKEN"
|
||||
status-im.config/ALCHEMY_OPTIMISM_MAINNET_TOKEN #shadow/env "ALCHEMY_OPTIMISM_MAINNET_TOKEN"
|
||||
status-im.config/ALCHEMY_OPTIMISM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_OPTIMISM_SEPOLIA_TOKEN"}
|
||||
status-im.config/ALCHEMY_OPTIMISM_SEPOLIA_TOKEN #shadow/env "ALCHEMY_OPTIMISM_SEPOLIA_TOKEN"
|
||||
status-im.config/SENTRY_DSN_STATUS_GO #shadow/env "SENTRY_DSN_STATUS_GO"}
|
||||
:compiler-options {:output-feature-set :es6
|
||||
;;disable for android build as there
|
||||
;;is an intermittent warning with deftype
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
(ns legacy.status-im.ui.screens.advanced-settings.views
|
||||
(:require
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.ui.components.core :as components]
|
||||
[legacy.status-im.ui.components.list.item :as list.item]
|
||||
[legacy.status-im.ui.components.list.views :as list]
|
||||
[quo.core :as quo]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.config :as config]
|
||||
[status-im.feature-flags :as ff]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf])
|
||||
(:require-macros [legacy.status-im.utils.views :as views]))
|
||||
@@ -22,7 +25,23 @@
|
||||
peer-syncing-enabled?]}]
|
||||
(keep
|
||||
identity
|
||||
[{:size :small
|
||||
[;; TODO(ilmotta): REMOVE BEFORE MERGE
|
||||
{:size :small
|
||||
:title (str "Is MixPanel token set?"
|
||||
(if (string/blank? config/mixpanel-token)
|
||||
"No"
|
||||
"Yes"))
|
||||
:on-press identity}
|
||||
(when (ff/enabled? ::ff/app-monitoring.intentional-crash)
|
||||
{:size :small
|
||||
:title (str "Force crash immediately"
|
||||
(when (string/blank? config/sentry-dsn-status-go)
|
||||
" (Sentry DSN is not set)"))
|
||||
:accessibility-label :intended-panic
|
||||
:on-press (fn []
|
||||
(re-frame/dispatch [:app-monitoring/intended-panic
|
||||
"status-mobile intentional panic"]))})
|
||||
{:size :small
|
||||
:title (i18n/label :t/log-level)
|
||||
:accessibility-label :log-level-settings-button
|
||||
:on-press
|
||||
|
||||
@@ -581,3 +581,7 @@
|
||||
(.createAccountFromPrivateKey ^js (account-manager)
|
||||
(types/clj->json {:privateKey private-key})
|
||||
callback)))
|
||||
|
||||
(defn intended-panic
|
||||
[message]
|
||||
(.intendedPanic ^js (status) message))
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
(ns status-im.common.app-monitoring.effects
|
||||
(:require
|
||||
[native-module.core :as native-module]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/reg-fx :effects.app-monitoring/intended-panic
|
||||
(fn [message]
|
||||
(native-module/intended-panic message)))
|
||||
@@ -0,0 +1,8 @@
|
||||
(ns status-im.common.app-monitoring.events
|
||||
(:require
|
||||
status-im.common.app-monitoring.effects
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/reg-event-fx :app-monitoring/intended-panic
|
||||
(fn [_ [message]]
|
||||
{:fx [[:effects.app-monitoring/intended-panic message]]}))
|
||||
@@ -150,3 +150,8 @@
|
||||
(goog-define STATUS_BACKEND_SERVER_ROOT_DATA_DIR "")
|
||||
;; if you're using android simulator, I suggest set the env variable to "http://10.0.2.2:"
|
||||
(goog-define STATUS_BACKEND_SERVER_IMAGE_SERVER_URI_PREFIX "https://localhost:")
|
||||
|
||||
;;;; Sentry
|
||||
;; Documentation: status-go/internal/sentry/README.md
|
||||
(goog-define SENTRY_DSN_STATUS_GO "")
|
||||
(def sentry-dsn-status-go SENTRY_DSN_STATUS_GO)
|
||||
|
||||
@@ -130,4 +130,12 @@
|
||||
:role-permissions? true}
|
||||
:profile/test-networks-enabled? false})
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/unmute-community))))
|
||||
(h/is-truthy (h/get-by-translation-text :t/unmute-community)))
|
||||
|
||||
(h/test "opened community"
|
||||
(h/setup-subs {:communities/my-pending-request-to-join nil
|
||||
:communities/community {:joined false
|
||||
:spectated true}
|
||||
:profile/test-networks-enabled? false})
|
||||
(h/render [options/community-options-bottom-sheet {:id "test"}])
|
||||
(h/is-truthy (h/get-by-translation-text :t/close-community))))
|
||||
|
||||
@@ -124,6 +124,14 @@
|
||||
:on-press #(rf/dispatch [:show-bottom-sheet
|
||||
{:content (fn [] [leave-menu/leave-sheet id color])}])})
|
||||
|
||||
(defn close-community
|
||||
[id]
|
||||
{:icon :i/close-circle
|
||||
:label (i18n/label :t/close-community)
|
||||
:accessibility-label :close-community
|
||||
:danger? true
|
||||
:on-press #(rf/dispatch [:communities/leave id])})
|
||||
|
||||
(defn cancel-request-to-join
|
||||
[id request-id]
|
||||
{:icon :i/block
|
||||
@@ -135,7 +143,7 @@
|
||||
request-id])}])})
|
||||
|
||||
(defn not-joined-options
|
||||
[id token-gated? intro-message test-networks-enabled?]
|
||||
[{:keys [id join-pending? spectated? token-gated? intro-message test-networks-enabled?]}]
|
||||
(let [common [(show-qr id) (share-community id)]
|
||||
specific (cond
|
||||
(and token-gated? (not test-networks-enabled?))
|
||||
@@ -146,19 +154,22 @@
|
||||
|
||||
(not token-gated?)
|
||||
[(view-members id) (view-rules id intro-message) (invite-contacts id)])]
|
||||
[(concat specific common)]))
|
||||
[(concat specific
|
||||
common
|
||||
(when (and spectated? (not join-pending?))
|
||||
[(assoc (close-community id) :add-divider? true)]))]))
|
||||
|
||||
(defn join-request-sent-options
|
||||
[id token-gated? request-id intro-message test-networks-enabled?]
|
||||
[(conj (first (not-joined-options id token-gated? intro-message test-networks-enabled?))
|
||||
[{:keys [id request-id] :as config}]
|
||||
[(conj (first (not-joined-options config))
|
||||
(assoc (cancel-request-to-join id request-id) :add-divider? true))])
|
||||
|
||||
(defn banned-options
|
||||
[id token-gated? intro-message test-networks-enabled?]
|
||||
(not-joined-options id token-gated? intro-message test-networks-enabled?))
|
||||
[config]
|
||||
(not-joined-options config))
|
||||
|
||||
(defn joined-options
|
||||
[id token-gated? muted? muted-till color intro-message]
|
||||
[{:keys [id token-gated? muted? muted-till color intro-message]}]
|
||||
[[(view-members id)
|
||||
(view-rules id intro-message)
|
||||
(when token-gated? (view-token-gating id))
|
||||
@@ -173,7 +184,7 @@
|
||||
[(assoc (leave-community id color) :add-divider? true)]])
|
||||
|
||||
(defn owner-options
|
||||
[id token-gated? muted? muted-till intro-message]
|
||||
[{:keys [id token-gated? muted? muted-till intro-message]}]
|
||||
[[(view-members id)
|
||||
(view-rules id intro-message)
|
||||
(when token-gated? (view-token-gating id))
|
||||
@@ -186,22 +197,29 @@
|
||||
|
||||
(defn get-context-drawers
|
||||
[{:keys [id]}]
|
||||
(let [{:keys [role-permissions? admin joined
|
||||
muted banList muted-till color
|
||||
intro-message]} (rf/sub [:communities/community id])
|
||||
request-id (rf/sub [:communities/my-pending-request-to-join id])
|
||||
test-networks? (rf/sub [:profile/test-networks-enabled?])]
|
||||
(let [{:keys
|
||||
[id admin joined
|
||||
banList color muted muted-till
|
||||
spectated role-permissions?
|
||||
intro-message]} (rf/sub [:communities/community id])
|
||||
request-id (rf/sub [:communities/my-pending-request-to-join id])
|
||||
test-networks? (rf/sub [:profile/test-networks-enabled?])
|
||||
config {:id id
|
||||
:color color
|
||||
:muted-till muted-till
|
||||
:muted? muted
|
||||
:spectated? spectated
|
||||
:token-gated? role-permissions?
|
||||
:intro-message intro-message
|
||||
:test-networks? test-networks?
|
||||
:join-pending? (boolean request-id)
|
||||
:request-id request-id}]
|
||||
(cond
|
||||
admin
|
||||
(owner-options id role-permissions? muted muted-till intro-message)
|
||||
joined
|
||||
(joined-options id role-permissions? muted muted-till color intro-message)
|
||||
request-id
|
||||
(join-request-sent-options id role-permissions? request-id intro-message test-networks?)
|
||||
banList
|
||||
(banned-options id role-permissions? intro-message test-networks?)
|
||||
:else
|
||||
(not-joined-options id role-permissions? intro-message test-networks?))))
|
||||
admin (owner-options config)
|
||||
joined (joined-options config)
|
||||
request-id (join-request-sent-options config)
|
||||
banList (banned-options config)
|
||||
:else (not-joined-options config))))
|
||||
|
||||
(defn community-options-bottom-sheet
|
||||
[id]
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
{:dataDir (native-module/backup-disabled-data-dir)
|
||||
:mixpanelAppId config/mixpanel-app-id
|
||||
:mixpanelToken config/mixpanel-token
|
||||
:sentryDSN config/sentry-dsn-status-go
|
||||
:mediaServerEnableTLS (config/enabled? config/STATUS_BACKEND_SERVER_MEDIA_SERVER_ENABLE_TLS)
|
||||
:logEnabled (not (string/blank? config/log-level))
|
||||
:logLevel config/log-level
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
{:db (assoc-in db [:wallet :ui :tokens-loading address] true)
|
||||
:fx [[:json-rpc/call
|
||||
[{:method "wallet_fetchOrGetCachedWalletBalances"
|
||||
:params [[address]]
|
||||
:params [[address] true]
|
||||
:on-success [:wallet/store-wallet-token address]
|
||||
:on-error [:wallet/get-wallet-token-for-account-failed address]}]]]}))
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
(let [expected-effects {:db {:wallet {:ui {:tokens-loading {address true}}}}
|
||||
:fx [[:json-rpc/call
|
||||
[{:method "wallet_fetchOrGetCachedWalletBalances"
|
||||
:params [[address]]
|
||||
:params [[address] true]
|
||||
:on-success [:wallet/store-wallet-token address]
|
||||
:on-error [:wallet/get-wallet-token-for-account-failed
|
||||
address]}]]]}]
|
||||
|
||||
@@ -619,7 +619,7 @@
|
||||
|
||||
(rf/reg-event-fx :wallet/clean-up-transaction-flow
|
||||
(fn [_]
|
||||
{:fx [[:dispatch [:wallet/clean-send-data]]
|
||||
{:fx [[:dispatch [:dismiss-modal :screen/wallet.transaction-confirmation]]
|
||||
[:dispatch [:wallet/clean-scanned-address]]
|
||||
[:dispatch [:wallet/clean-local-suggestions]]
|
||||
[:dispatch [:wallet/clean-send-address]]
|
||||
@@ -629,9 +629,11 @@
|
||||
(rf/reg-event-fx :wallet/end-transaction-flow
|
||||
(fn [{:keys [db]}]
|
||||
(let [address (get-in db [:wallet :current-viewing-account-address])]
|
||||
{:fx [[:dispatch [:dismiss-modal :screen/wallet.transaction-confirmation]]
|
||||
[:dispatch [:wallet/navigate-to-account-within-stack address]]
|
||||
[:dispatch [:wallet/select-account-tab :activity]]]})))
|
||||
{:fx [[:dispatch [:wallet/navigate-to-account-within-stack address]]
|
||||
[:dispatch [:wallet/select-account-tab :activity]]
|
||||
[:dispatch-later
|
||||
[{:ms 20
|
||||
:dispatch [:wallet/clean-up-transaction-flow]}]]]})))
|
||||
|
||||
(rf/reg-event-fx
|
||||
:wallet/build-transactions-from-route
|
||||
|
||||
@@ -258,8 +258,6 @@
|
||||
(set-input-state
|
||||
#(controlled-input/->crypto % conversion-rate)))
|
||||
(set-crypto-currency (not crypto-currency?)))]
|
||||
(rn/use-unmount
|
||||
#(rf/dispatch [:wallet/clean-up-transaction-flow]))
|
||||
(rn/use-effect
|
||||
(fn []
|
||||
(when active-screen?
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
(:require
|
||||
status-im.common.alert-banner.events
|
||||
status-im.common.alert.effects
|
||||
status-im.common.app-monitoring.events
|
||||
status-im.common.async-storage.effects
|
||||
status-im.common.emoji-picker.events
|
||||
status-im.common.font.events
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
(def ^:private initial-flags
|
||||
{::community.edit-account-selection (enabled-in-env? :FLAG_EDIT_ACCOUNT_SELECTION_ENABLED)
|
||||
::app-monitoring.intentional-crash true ; (enabled-in-env? :FLAG_INTENTIONAL_CRASH_ENABLED)
|
||||
|
||||
;; Feature toggled (off by default) because the desktop app disabled this
|
||||
;; feature and we want both clients in sync. We keep the code because it
|
||||
|
||||
@@ -126,12 +126,9 @@
|
||||
|
||||
(def status
|
||||
(clj->js
|
||||
{:getNodeConfig
|
||||
(fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
:addCentralizedMetric
|
||||
(fn [_ callback]
|
||||
(callback))
|
||||
:fleets
|
||||
(fn [] (.fleets native-status))
|
||||
:startLocalNotifications
|
||||
identity}))
|
||||
{:intendedPanic identity
|
||||
:getNodeConfig (fn [] (types/clj->json {:WakuV2Config ""}))
|
||||
:addCentralizedMetric (fn [_ callback]
|
||||
(callback))
|
||||
:fleets (fn [] (.fleets native-status))
|
||||
:startLocalNotifications identity}))
|
||||
|
||||
@@ -285,10 +285,14 @@
|
||||
[bn1 bn2]
|
||||
(.round (.mul ^js bn1 bn2) 0))
|
||||
|
||||
(defn div
|
||||
(defn- div*
|
||||
[bn1 bn2]
|
||||
(.dividedBy ^js bn1 bn2))
|
||||
|
||||
(def div
|
||||
"Divides with defaults, this version is able to receive `nil` and takes them as 0."
|
||||
(fnil div* (bignumber 0) (bignumber 1)))
|
||||
|
||||
(defn div-and-round
|
||||
[bn1 bn2]
|
||||
(.round (.dividedBy ^js bn1 bn2) 0))
|
||||
|
||||
@@ -395,6 +395,7 @@
|
||||
"close-app-title": "Warning!",
|
||||
"close-chat": "Close chat",
|
||||
"close-chat-confirmation": "This conversation will disappear from the list.\nIt will appear again if the contact sends a new message.",
|
||||
"close-community": "Close community",
|
||||
"close-contact-search": "Close contact search",
|
||||
"code-snippet": "Code snippet",
|
||||
"collectibles": "Collectibles",
|
||||
|
||||
Reference in New Issue
Block a user