Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b27df1c441 | ||
|
|
03f813c957 | ||
|
|
6d6766dce1 | ||
|
|
ce3d32dc0a | ||
|
|
56ff84f475 | ||
|
|
cdb39452d7 |
+2
-2
@@ -47,7 +47,8 @@ class AccountManager(private val reactContext: ReactApplicationContext) : ReactC
|
||||
|
||||
private fun updateConfig(jsonConfigString: String, absRootDirPath: String, keystoreDirPath: String): String {
|
||||
val jsonConfig = JSONObject(jsonConfigString)
|
||||
val dataDirPath = jsonConfig.getString("DataDir")
|
||||
// when doing local pair syncing, backend will provide default data dir
|
||||
val dataDirPath = jsonConfig.optString("DataDir","")
|
||||
val logEnabled = jsonConfig.getBoolean("LogEnabled")
|
||||
val gethLogFile = if (logEnabled) logManager.prepareLogsFile(reactContext) else null
|
||||
val gethLogDirPath = gethLogFile?.parent
|
||||
@@ -140,7 +141,6 @@ class AccountManager(private val reactContext: ReactApplicationContext) : ReactC
|
||||
updatedJsonConfigString
|
||||
} catch (e: JSONException) {
|
||||
Log.e(TAG, "updateConfig failed: ${e.message}")
|
||||
System.exit(1)
|
||||
""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ RCT_EXPORT_METHOD(restoreAccountAndLogin:(NSString *)request) {
|
||||
NSData *configData = [config dataUsingEncoding:NSUTF8StringEncoding];
|
||||
NSDictionary *configJSON = [NSJSONSerialization JSONObjectWithData:configData options:NSJSONReadingMutableContainers error:nil];
|
||||
NSString *relativeDataDir = [configJSON objectForKey:@"DataDir"];
|
||||
if (relativeDataDir == nil) {
|
||||
relativeDataDir = @"";
|
||||
}
|
||||
NSString *absDataDir = [rootUrl.path stringByAppendingString:relativeDataDir];
|
||||
NSURL *absDataDirUrl = [NSURL fileURLWithPath:absDataDir];
|
||||
NSString *keystoreDir = [@"/keystore/" stringByAppendingString:keyUID];
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
[clojure.string :as string]
|
||||
[legacy.status-im.utils.deprecated-types :as types]
|
||||
[react-native.platform :as platform]
|
||||
[status-im.config :as config]
|
||||
[utils.ethereum.chain :as chain]))
|
||||
[status-im.config :as config]))
|
||||
|
||||
(defn- add-log-level
|
||||
[config log-level]
|
||||
@@ -117,10 +116,7 @@
|
||||
{:keys [installation-id log-level
|
||||
waku-bloom-filter-mode]}
|
||||
profile]
|
||||
(cond-> {:NetworkId (chain/chain-keyword->chain-id :mainnet)
|
||||
:DataDir "/ethereum/mainnet_rpc"
|
||||
:UpstreamConfig {:Enabled true
|
||||
:URL config/mainnet-rpc-url}}
|
||||
(cond-> {}
|
||||
:always
|
||||
(get-base-node-config)
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
[react-native.linear-gradient :as linear-gradient]))
|
||||
|
||||
(defn view
|
||||
[{:keys [customization-color opacity container-style height]
|
||||
[{:keys [customization-color opacity container-style height bottom-color-override]
|
||||
:or {customization-color :blue}}]
|
||||
;; `when` added for safety, `linear-gradient` will break if `nil` is passed, the `:or`
|
||||
;; destructuring won't work because it's only applied when the `:customization-color` key is
|
||||
;; non-existent. While deleting an account the key exists and has a `nil` value.
|
||||
(let [color-top (colors/resolve-color customization-color 50 20)
|
||||
color-bottom (colors/resolve-color customization-color 50 0)]
|
||||
color-bottom (or bottom-color-override (colors/resolve-color customization-color 50 0))]
|
||||
(when (and color-top color-bottom)
|
||||
[linear-gradient/linear-gradient
|
||||
{:accessibility-label :gradient-cover
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
;; https://github.com/status-im/status-desktop/blob/2ba96803168461088346bf5030df750cb226df4c/ui/imports/utils/Constants.qml#L468
|
||||
(def min-length 5)
|
||||
|
||||
;; Combine ASCII and Emoji into one regex
|
||||
(def bio-chars-regex
|
||||
#"^[\u00a9\u00ae\u2000-\u3300\ud83c\ud000-\udfff\ud83d\ud000-\udfff\ud83e\ud000-\udfff\u0000-\u007F]+$")
|
||||
|
||||
(def common-names ["Ethereum" "Bitcoin"])
|
||||
|
||||
(defn has-common-names? [s] (pos? (count (filter #(string/includes? s %) common-names))))
|
||||
@@ -19,6 +23,10 @@
|
||||
|
||||
(defn bio-too-long? [s] (> (count (string/trim (str s))) constants/profile-bio-max-length))
|
||||
|
||||
(defn bio-invalid-characters?
|
||||
[s]
|
||||
(not (re-find bio-chars-regex s)))
|
||||
|
||||
(defn validation-name
|
||||
[s]
|
||||
(cond
|
||||
@@ -40,12 +48,9 @@
|
||||
(defn validation-bio
|
||||
[s]
|
||||
(cond
|
||||
(string/blank? s) nil
|
||||
(validators/has-emojis? s) (i18n/label :t/are-not-allowed
|
||||
{:check (i18n/label :t/emojis)})
|
||||
(validators/has-special-characters? s) (i18n/label :t/are-not-allowed
|
||||
{:check (i18n/label :t/special-characters)})
|
||||
(bio-too-long? s) (i18n/label :t/bio-is-too-long)))
|
||||
(string/blank? s) nil
|
||||
(bio-invalid-characters? s) (i18n/label :t/invalid-characters-bio)
|
||||
(bio-too-long? s) (i18n/label :t/bio-is-too-long)))
|
||||
|
||||
(defn validation-nickname
|
||||
[s]
|
||||
|
||||
@@ -99,10 +99,13 @@
|
||||
|
||||
(defn show-qr
|
||||
[id]
|
||||
{:icon :i/qr-code
|
||||
:accessibility-label :show-qr
|
||||
:on-press #(js/alert (str "implement action" id))
|
||||
:label (i18n/label :t/show-qr)})
|
||||
(let [on-success #(rf/dispatch [:open-modal :screen/share-community
|
||||
{:community-id id
|
||||
:url %}])]
|
||||
{:icon :i/qr-code
|
||||
:accessibility-label :show-qr
|
||||
:on-press #(rf/dispatch [:communities/get-community-share-data id on-success])
|
||||
:label (i18n/label :t/show-qr)}))
|
||||
|
||||
(defn share-community
|
||||
[id]
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
(ns status-im.contexts.communities.actions.share-community.style
|
||||
(:require [quo.foundations.colors :as colors]))
|
||||
|
||||
(def horizontal-padding 20)
|
||||
(def vertical-padding 12)
|
||||
(def gradient-cover-padding 20)
|
||||
(def qr-code-padding 12)
|
||||
|
||||
(def header-container
|
||||
{:padding-horizontal horizontal-padding
|
||||
:padding-vertical vertical-padding})
|
||||
|
||||
(def scan-notice
|
||||
{:color colors/white-70-blur
|
||||
:margin-top 16
|
||||
:margin-left :auto
|
||||
:margin-right :auto})
|
||||
|
||||
(defn community-name
|
||||
[thumbnail]
|
||||
{:margin-left (when thumbnail 8)})
|
||||
|
||||
(def qr-code-wrapper
|
||||
{:padding-horizontal horizontal-padding
|
||||
:margin-top 8})
|
||||
|
||||
(defn qr-code-size
|
||||
[total-width]
|
||||
(- total-width (* gradient-cover-padding 2) (* qr-code-padding 2)))
|
||||
|
||||
(defn gradient-cover-size
|
||||
[total-width]
|
||||
(- total-width (* gradient-cover-padding 2)))
|
||||
|
||||
(defn gradient-cover-wrapper
|
||||
[width]
|
||||
{:width (gradient-cover-size width)
|
||||
:border-radius 16
|
||||
:margin-left 20
|
||||
:height "100%"})
|
||||
|
||||
(def share-button-container {:justify-self :flex-end})
|
||||
|
||||
(def qr-top-wrapper
|
||||
{:margin 12
|
||||
:margin-bottom 0
|
||||
:flex-direction :row
|
||||
:align-items :center
|
||||
:justify-content :space-between})
|
||||
|
||||
(def community-avatar-dimension 32)
|
||||
|
||||
(def community-avatar
|
||||
{:border-radius community-avatar-dimension
|
||||
:width community-avatar-dimension
|
||||
:height community-avatar-dimension})
|
||||
|
||||
(def qr-code-view
|
||||
{:padding-vertical vertical-padding
|
||||
:align-items :center})
|
||||
|
||||
(def text-wrapper
|
||||
{:flex-direction :row
|
||||
:align-items :center})
|
||||
@@ -0,0 +1,90 @@
|
||||
(ns status-im.contexts.communities.actions.share-community.view
|
||||
(:require
|
||||
[quo.core :as quo]
|
||||
[quo.foundations.colors :as colors]
|
||||
[react-native.core :as rn]
|
||||
[react-native.fast-image :as fast-image]
|
||||
[react-native.platform :as platform]
|
||||
[react-native.safe-area :as safe-area]
|
||||
[status-im.common.qr-codes.view :as qr-codes]
|
||||
[status-im.common.resources :as resources]
|
||||
[status-im.contexts.communities.actions.share-community.style :as style]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(defn view
|
||||
[]
|
||||
(let [{:keys [url community-id]} (rf/sub [:get-screen-params])
|
||||
window-width (rf/sub [:dimensions/window-width])
|
||||
{thumbnail-uri :logo
|
||||
color :color
|
||||
community-name :name} (rf/sub [:communities/for-context-tag community-id])
|
||||
navigate-back (rn/use-callback #(rf/dispatch [:navigate-back]))
|
||||
on-press-share (rn/use-callback
|
||||
(fn []
|
||||
(rf/dispatch
|
||||
[:open-share
|
||||
{:options (if platform/ios?
|
||||
{:activityItemSources
|
||||
[{:placeholderItem {:type :text
|
||||
:content url}
|
||||
:item {:default {:type :text
|
||||
:content url}}
|
||||
:linkMetadata {:title (i18n/label
|
||||
:t/share-community)}}]}
|
||||
{:title (i18n/label :t/share-community)
|
||||
:subject (i18n/label :t/share-community)
|
||||
:message url
|
||||
:isNewTask true})}]))
|
||||
[url])]
|
||||
[quo/overlay {:type :shell}
|
||||
[rn/view
|
||||
{:style {:padding-top (safe-area/get-top)}
|
||||
:key :share-community}
|
||||
[quo/page-nav
|
||||
{:icon-name :i/close
|
||||
:on-press navigate-back
|
||||
:background :blur
|
||||
:accessibility-label :top-bar}]
|
||||
[quo/text-combinations
|
||||
{:container-style style/header-container
|
||||
:title (i18n/label :t/share-community)}]
|
||||
[rn/view {:style style/qr-code-wrapper}
|
||||
[quo/gradient-cover
|
||||
{:container-style (style/gradient-cover-wrapper window-width)
|
||||
:customization-color color
|
||||
:bottom-color-override colors/white-opa-5}]
|
||||
[rn/view
|
||||
{:style style/qr-top-wrapper}
|
||||
[rn/view {:style style/text-wrapper}
|
||||
(when thumbnail-uri
|
||||
[fast-image/fast-image
|
||||
{:source {:uri thumbnail-uri}
|
||||
:style style/community-avatar}])
|
||||
[quo/text
|
||||
{:size :heading-2
|
||||
:weight :semi-bold
|
||||
:style (style/community-name thumbnail-uri)}
|
||||
community-name]]
|
||||
[rn/view {:style style/share-button-container}
|
||||
[quo/button
|
||||
{:icon-only? true
|
||||
:type :grey
|
||||
:background :blur
|
||||
:size 32
|
||||
:accessibility-label :link-to-community
|
||||
:on-press on-press-share}
|
||||
:i/share]]]
|
||||
[rn/view
|
||||
{:style style/qr-code-view}
|
||||
[qr-codes/qr-code
|
||||
{:size (style/qr-code-size window-width)
|
||||
:url url
|
||||
:avatar :community
|
||||
:customization-color color
|
||||
:picture (or thumbnail-uri (resources/get-mock-image :status-logo))}]]]
|
||||
[quo/text
|
||||
{:size :paragraph-2
|
||||
:weight :regular
|
||||
:style style/scan-notice}
|
||||
(i18n/label :t/scan-with-status-app)]]]))
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns status-im.contexts.profile.edit.bio.events
|
||||
(:require [clojure.string :as string]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
@@ -27,6 +28,7 @@
|
||||
:params [new-bio]
|
||||
:on-success [:profile/edit-profile-bio-success
|
||||
{:bio new-bio
|
||||
:added? (string/blank? bio)}]}]]]}))
|
||||
:added? (string/blank? bio)}]
|
||||
:on-error #(log/error "failed to set bio " %)}]]]}))
|
||||
|
||||
(rf/reg-event-fx :profile/edit-bio edit-profile-bio)
|
||||
|
||||
@@ -12,12 +12,15 @@
|
||||
|
||||
(rf/reg-event-fx :profile/edit-profile-picture-success
|
||||
(fn [_ [images]]
|
||||
{:fx [[:dispatch [:profile/update-local-picture (reverse images)]]
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :positive
|
||||
:theme :dark
|
||||
:text (i18n/label :t/profile-picture-added)}]]]}))
|
||||
(let [has-picture? (rf/sub [:profile/has-picture])]
|
||||
{:fx [[:dispatch [:profile/update-local-picture (reverse images)]]
|
||||
[:dispatch
|
||||
[:toasts/upsert
|
||||
{:type :positive
|
||||
:theme :dark
|
||||
:text (i18n/label (if has-picture?
|
||||
:t/profile-picture-updated
|
||||
:t/profile-picture-added))}]]]})))
|
||||
|
||||
(defn edit-profile-picture
|
||||
[{:keys [db]} [picture crop-width crop-height]]
|
||||
|
||||
@@ -15,11 +15,10 @@
|
||||
:margin-bottom 12})
|
||||
|
||||
(def camera-button
|
||||
{:position :absolute
|
||||
:border-radius 16
|
||||
:overflow :hidden
|
||||
:right 0
|
||||
:bottom 0})
|
||||
{:position :absolute
|
||||
:overflow :hidden
|
||||
:right 0
|
||||
:bottom 0})
|
||||
|
||||
(def item-container
|
||||
{:padding-top 14})
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
[status-im.contexts.communities.actions.invite-contacts.view :as communities.invite]
|
||||
[status-im.contexts.communities.actions.request-to-join.view :as join-menu]
|
||||
[status-im.contexts.communities.actions.share-community-channel.view :as share-community-channel]
|
||||
[status-im.contexts.communities.actions.share-community.view :as share-community]
|
||||
[status-im.contexts.communities.discover.view :as communities.discover]
|
||||
[status-im.contexts.communities.overview.view :as communities.overview]
|
||||
[status-im.contexts.onboarding.create-password.view :as create-password]
|
||||
@@ -147,6 +148,10 @@
|
||||
:options options/transparent-screen-options
|
||||
:component share-community-channel/view}
|
||||
|
||||
{:name :screen/share-community
|
||||
:options options/transparent-screen-options
|
||||
:component share-community/view}
|
||||
|
||||
;; Note: the sheet screen is used when selecting addresses to share when
|
||||
;; joining a community. The non-sheet screen is used when editing shared
|
||||
;; addresses after the join request was sent.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.179.7",
|
||||
"commit-sha1": "cdac86f73ac3bf7f4f4cf09b5bc27fb1602c1820",
|
||||
"src-sha256": "0svj36zq1v7p1d6dwa29s8m82gfy4ffdcajqcn2wyxxr7i1nwnwa"
|
||||
"version": "fix_/store-nodes-not-available-ios",
|
||||
"commit-sha1": "e6e109d64829a66e781d8a2a4aa466f55fed0f93",
|
||||
"src-sha256": "1526mb6nm076pi7l9xi9h0ggi6prz10xp1djyxbk13w2z94r4h38"
|
||||
}
|
||||
|
||||
@@ -84,12 +84,16 @@ class WalletView(BaseView):
|
||||
self.slide_and_confirm_with_password()
|
||||
self.done_button.click()
|
||||
|
||||
def set_amount(self, amount: float):
|
||||
for i in '{:f}'.format(amount).rstrip('0'):
|
||||
Button(self.driver, accessibility_id='keyboard-key-%s' % i).click()
|
||||
|
||||
def send_asset(self, address: str, asset_name: str, amount: float):
|
||||
self.send_button.click()
|
||||
self.address_text_input.send_keys(address)
|
||||
self.continue_button.click_until_presence_of_element(self.collectibles_tab)
|
||||
self.select_asset(asset_name).click()
|
||||
self.amount_input.send_keys('{:f}'.format(amount).rstrip('0'))
|
||||
self.set_amount(amount)
|
||||
self.confirm_transaction()
|
||||
|
||||
def send_asset_from_drawer(self, address: str, asset_name: str, amount: float):
|
||||
@@ -99,7 +103,7 @@ class WalletView(BaseView):
|
||||
self.send_button.find_elements()[0].click()
|
||||
self.address_text_input.send_keys(address)
|
||||
self.continue_button.click_until_presence_of_element(self.confirm_button)
|
||||
self.amount_input.send_keys('{:f}'.format(amount).rstrip('0'))
|
||||
self.set_amount(amount)
|
||||
self.confirm_transaction()
|
||||
|
||||
def add_regular_account(self, account_name: str):
|
||||
|
||||
@@ -754,6 +754,7 @@
|
||||
"invalid-range": "Invalid format, must be between {{min}} and {{max}}",
|
||||
"invalid-username-or-key": "Invalid username or chat key",
|
||||
"invalid-ens-or-key": "Invalid ENS or Chat key",
|
||||
"invalid-characters-bio": "Invalid characters. Standard keyboard characters and emojis only.",
|
||||
"join-me": "Hey join me on Status: {{url}}",
|
||||
"join-a-community": "or join a community",
|
||||
"join-open-community": "Join Community",
|
||||
|
||||
Reference in New Issue
Block a user