Compare commits

...
4 changed files with 48 additions and 16 deletions
+22
View File
@@ -90,6 +90,28 @@ their styles in the top-level of the properties map, prefer to add them inside t
]
```
### Always apply animated styles in the style file
When implementing styles for reanimated views, we should always define
them in the style file and apply animations with reanimated/apply-animations-to-style
in the style definition.
```clojure
;; bad
(defn circle
[]
(let [opacity (reanimated/use-shared-value 1)]
[reanimated/view {:style (reanimated/apply-animations-to-style
{:opacity opacity}
style/circle-container)}]))
;; good
(defn circle
[]
(let [opacity (reanimated/use-shared-value 1)]
[reanimated/view {:style (style/circle-container opacity)}]))
```
### Don't use percents to define width/height
In ReactNative, all layouts use the [flexbox
@@ -883,11 +883,7 @@ RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(backupDisabledDataDir) {
}
RCT_EXPORT_BLOCKING_SYNCHRONOUS_METHOD(logFilePath) {
NSFileManager *fileManager = [NSFileManager defaultManager];
NSURL *rootUrl =[[fileManager
URLsForDirectory:NSLibraryDirectory inDomains:NSUserDomainMask]
lastObject];
return rootUrl.path;
return @"geth.log";
}
RCT_EXPORT_METHOD(generateAliasAsync:(NSString *)publicKey
+22 -8
View File
@@ -5,11 +5,12 @@
[status-im.utils.types :as types]
[status-im2.config :as config]
[clojure.string :as string]
[utils.i18n :as i18n]
[utils.security.core :as security]
[status-im.native-module.core :as status]
[status-im.ethereum.core :as ethereum]
[status-im2.constants :as constants]
[utils.i18n :as i18n]))
[status-im2.contexts.onboarding.profiles.view :as profiles.view]))
(re-frame/reg-fx
:multiaccount/create-account-and-login
@@ -22,10 +23,10 @@
(status/validate-mnemonic
(security/safe-unmask-data mnemonic)
(fn [result]
(let [{:keys [error]} (types/json->clj result)]
(let [{:keys [error keyUID]} (types/json->clj result)]
(if (seq error)
(when on-error (on-error error))
(on-success mnemonic)))))))
(on-success mnemonic keyUID)))))))
(re-frame/reg-fx
:multiaccount/restore-account-and-login
@@ -121,15 +122,28 @@
{:events [:onboarding-2/seed-phrase-entered]}
[_ seed-phrase on-error]
{:multiaccount/validate-mnemonic [seed-phrase
#(re-frame/dispatch [:onboarding-2/seed-phrase-validated
seed-phrase])
(fn [mnemonic key-uid]
(re-frame/dispatch [:onboarding-2/seed-phrase-validated
mnemonic key-uid]))
on-error]})
(rf/defn seed-phrase-validated
{:events [:onboarding-2/seed-phrase-validated]}
[{:keys [db]} seed-phrase]
{:db (assoc-in db [:onboarding-2/profile :seed-phrase] seed-phrase)
:dispatch [:navigate-to :create-profile]})
[{:keys [db]} seed-phrase key-uid]
(if (contains? (:multiaccounts/multiaccounts db) key-uid)
{:utils/show-confirmation
{:title (i18n/label :t/multiaccount-exists-title)
:content (i18n/label :t/multiaccount-exists-content)
:confirm-button-text (i18n/label :t/unlock)
:on-accept #(do
(re-frame/dispatch [:pop-to-root :profiles])
;; FIXME(rasom): obviously not cool
(reset! profiles.view/show-profiles? false)
(re-frame/dispatch
[:multiaccounts.login.ui/multiaccount-selected key-uid]))
:on-cancel #(re-frame/dispatch [:pop-to-root :multiaccounts])}}
{:db (assoc-in db [:onboarding-2/profile :seed-phrase] seed-phrase)
:dispatch [:navigate-to :create-profile]}))
(rf/defn navigate-to-create-profile
{:events [:onboarding-2/navigate-to-create-profile]}
+3 -3
View File
@@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im",
"repo": "status-go",
"version": "v0.141.1",
"commit-sha1": "458f28178ca15732df8e6c806ef5326fad44427c",
"src-sha256": "1hhfswn17dja62rxkb572afd6fsx86wfxs4j666lhscdz7zzs4gx"
"version": "v0.141.2",
"commit-sha1": "91c6949cd25449d5459581a21f2c8b929290ced0",
"src-sha256": "0d4x1y9jhdxy5jn9kqp5avx157iqz4ma7903c3ys0njmnxhmjyf8"
}