Compare commits
12
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
464ad4d64c | ||
|
|
e6da69be7f | ||
|
|
93f17d0deb | ||
|
|
b76fa535d9 | ||
|
|
2a755e07dd | ||
|
|
975b749348 | ||
|
|
85f65a60d3 | ||
|
|
3337d9f77a | ||
|
|
cfe748cdeb | ||
|
|
68e453b549 | ||
|
|
5f9accaa24 | ||
|
|
3ece671048 |
@@ -75,7 +75,7 @@ pipeline {
|
||||
steps { script {
|
||||
switch (btype) {
|
||||
case 'nightly': build(job: 'misc/status.im', wait: false); break
|
||||
case 'release': gh.publishReleaseMobile(); break
|
||||
case 'release': github.publishReleaseMobile(); break
|
||||
}
|
||||
} }
|
||||
}
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
"react-native-mail"
|
||||
"react-native-shake"
|
||||
"@react-native-community/netinfo"
|
||||
"react-native-gesture-handler"
|
||||
"react-native-safe-area-context"]
|
||||
;; Desktop modules
|
||||
:desktop-modules ["buffer"
|
||||
|
||||
@@ -274,3 +274,6 @@
|
||||
(def safe-area-consumer (adapt-class (object/get js-dependencies/safe-area-context "SafeAreaConsumer")))
|
||||
|
||||
(def safe-area-view (adapt-class (object/get js-dependencies/safe-area-context "SafeAreaView")))
|
||||
|
||||
|
||||
(def touchable-without-feedback-gesture (adapt-class (object/get js-dependencies/react-native-gesture-handler "TouchableWithoutFeedback")))
|
||||
|
||||
@@ -78,9 +78,7 @@
|
||||
</dict>
|
||||
</dict>
|
||||
<key>NSCameraUsageDescription</key>
|
||||
<string>Please allow Status to use your phone camera</string>
|
||||
<key>NSContactsUsageDescription</key>
|
||||
<string>We need to access your contacts</string>
|
||||
<string>The app uses your camera to scan QR codes.</string>
|
||||
<key>NSLocationAlwaysUsageDescription</key>
|
||||
<string>Location access is required for some DApps to function properly.</string>
|
||||
<key>NSLocationWhenInUseUsageDescription</key>
|
||||
|
||||
@@ -43,3 +43,5 @@
|
||||
(def react-navigation-native (js/require "@react-navigation/native"))
|
||||
(def react-navigation-stack (js/require "@react-navigation/stack"))
|
||||
(def react-navigation-bottom-tabs (js/require "@react-navigation/bottom-tabs"))
|
||||
|
||||
(def react-native-gesture-handler (js/require "react-native-gesture-handler"))
|
||||
@@ -104,6 +104,7 @@
|
||||
{:preview-privacy? config/blank-preview?
|
||||
:wallet/visible-tokens {:mainnet #{:SNT}}
|
||||
:currency :usd
|
||||
:waku-enabled true
|
||||
:log-level config/log-level-status-go})
|
||||
|
||||
(defn default-visible-tokens [chain]
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
(:refer-clojure :exclude [name])
|
||||
(:require [clojure.string :as string]
|
||||
[status-im.ethereum.core :as ethereum]
|
||||
[status-im.ethereum.json-rpc :as json-rpc]))
|
||||
[status-im.ethereum.json-rpc :as json-rpc]
|
||||
[status-im.ethereum.abi-spec :as abi-spec]))
|
||||
|
||||
;; this is the addresses of ens registries for the different networks
|
||||
(def ens-registries
|
||||
@@ -96,6 +97,24 @@
|
||||
(fn [[name]]
|
||||
(cb name))}))
|
||||
|
||||
(defn cleanup-hash [raw-hash]
|
||||
;; NOTE: it would be better if our abi-spec/decode was able to do that
|
||||
(let [;; ignore hex prefix
|
||||
[_ raw-hash-rest] (split-at 2 raw-hash)
|
||||
;; the first field gives us the length of the next one in hex and has
|
||||
;; a length of 32 bytes
|
||||
;; 1 byte is 2 chars here
|
||||
[next-field-length-hex raw-hash-rest] (split-at 64 raw-hash-rest)
|
||||
next-field-length (* ^number (abi-spec/hex-to-number (string/join next-field-length-hex)) 2)
|
||||
;; we get the next field which is the length of the hash and is
|
||||
;; expected to be 32 bytes as well
|
||||
[hash-field-length-hex raw-hash-rest] (split-at next-field-length
|
||||
raw-hash-rest)
|
||||
hash-field-length (* ^number (abi-spec/hex-to-number (string/join hash-field-length-hex)) 2)
|
||||
;; we get the hash
|
||||
[hash _] (split-at hash-field-length raw-hash-rest)]
|
||||
(str "0x" (string/join hash))))
|
||||
|
||||
(defn contenthash
|
||||
[resolver ens-name cb]
|
||||
(json-rpc/eth-call
|
||||
@@ -105,10 +124,7 @@
|
||||
:on-success
|
||||
(fn [raw-hash]
|
||||
;; NOTE: it would be better if our abi-spec/decode was able to do that
|
||||
(let [hash (subs raw-hash 130)
|
||||
[cid & hash-and-zeros] (string/split hash "1b20")
|
||||
hash (str "0x" cid "1b20" (subs (apply str hash-and-zeros) 0 64))]
|
||||
(cb hash)))}))
|
||||
(cb (cleanup-hash raw-hash)))}))
|
||||
|
||||
(defn content
|
||||
[resolver ens-name cb]
|
||||
|
||||
@@ -7,7 +7,8 @@
|
||||
[status-im.native-module.core :as status]
|
||||
[status-im.utils.money :as money]
|
||||
[status-im.utils.types :as types]
|
||||
[taoensso.timbre :as log]))
|
||||
[taoensso.timbre :as log]
|
||||
[status-im.utils.utils :as utils]))
|
||||
|
||||
(def json-rpc-api
|
||||
{"eth_call" {}
|
||||
@@ -171,11 +172,20 @@
|
||||
"mailservers_getChatRequestRanges" {}
|
||||
"mailservers_deleteChatRequestRange" {}})
|
||||
|
||||
(defn on-error-retry [call-method {:keys [method number-of-retries on-error] :as arg}]
|
||||
(defn on-error-retry
|
||||
[call-method {:keys [method number-of-retries delay on-error] :as arg}]
|
||||
(if (pos? number-of-retries)
|
||||
(fn []
|
||||
(log/debug "[on-error-retry]" method "number-of-retries" number-of-retries)
|
||||
(call-method (update arg :number-of-retries dec)))
|
||||
(let [updated-delay (if delay
|
||||
(min 2000 (* 2 delay))
|
||||
50)]
|
||||
(log/debug "[on-error-retry]" method
|
||||
"number-of-retries" number-of-retries
|
||||
"delay" delay)
|
||||
(utils/set-timeout #(call-method (-> arg
|
||||
(update :number-of-retries dec)
|
||||
(assoc :delay updated-delay)))
|
||||
updated-delay)))
|
||||
on-error))
|
||||
|
||||
(defn call-ext-method [waku-enabled? method]
|
||||
|
||||
@@ -11,19 +11,17 @@
|
||||
[status-im.i18n :as i18n]
|
||||
[re-frame.core :as re-frame]))
|
||||
|
||||
(defonce visible? (animation/create-value 0))
|
||||
|
||||
(defonce minimized-state (reagent/atom nil))
|
||||
(defonce visible-native (animation/create-value 0))
|
||||
(defonce last-to-value (atom 1))
|
||||
|
||||
(defn animate
|
||||
([visible duration to]
|
||||
(animate visible duration to nil))
|
||||
([visible duration to callback]
|
||||
([visible-native duration to]
|
||||
(animate visible-native duration to nil))
|
||||
([visible-native duration to callback]
|
||||
(when (not= to @last-to-value)
|
||||
(reset! last-to-value to)
|
||||
(animation/start
|
||||
(animation/timing visible
|
||||
(animation/timing visible-native
|
||||
{:toValue to
|
||||
:duration duration
|
||||
:easing (animation/cubic)
|
||||
@@ -37,12 +35,8 @@
|
||||
|
||||
(defn minimize-bar [route-name]
|
||||
(if (main-tab? route-name)
|
||||
(do
|
||||
(reset! minimized-state false)
|
||||
(animate visible? 150 0))
|
||||
(do
|
||||
(reset! minimized-state true)
|
||||
(animate visible? 150 1))))
|
||||
(animate visible-native 150 0)
|
||||
(animate visible-native 150 1)))
|
||||
|
||||
(def tabs-list-data
|
||||
(->>
|
||||
@@ -73,31 +67,35 @@
|
||||
(fn [{:keys [icon label active? nav-stack on-press
|
||||
accessibility-label count-subscription]}]
|
||||
(let [count (when count-subscription @(re-frame/subscribe [count-subscription]))]
|
||||
[react/touchable-highlight {:style tabs.styles/touchable-container
|
||||
:on-press on-press
|
||||
:accessibility-label accessibility-label}
|
||||
[react/view {:style tabs.styles/tab-container}
|
||||
[react/view {:style tabs.styles/icon-container}
|
||||
[vector-icons/icon icon (tabs.styles/icon active?)]
|
||||
(when count
|
||||
(cond
|
||||
(or (pos? count) (pos? (:other count)))
|
||||
[react/view {:style (if (= nav-stack :chat-stack)
|
||||
tabs.styles/message-counter
|
||||
tabs.styles/counter)}
|
||||
[badge/message-counter (or (:other count) count) true]]
|
||||
(pos? (:public count))
|
||||
[react/view {:style tabs.styles/counter-public-container}
|
||||
[react/view {:style tabs.styles/counter-public
|
||||
:accessibility-label :public-unread-badge}]]))]
|
||||
(when-not platform/desktop?
|
||||
[react/view {:style tabs.styles/tab-title-container}
|
||||
[react/text {:style (tabs.styles/tab-title active?)}
|
||||
label]])]])))
|
||||
[react/view {:style tabs.styles/touchable-container}
|
||||
[react/touchable-without-feedback-gesture
|
||||
{:style {:height "100%"
|
||||
:width "100%"}
|
||||
:on-press on-press
|
||||
:accessibility-label accessibility-label}
|
||||
[react/view {:style tabs.styles/tab-container}
|
||||
[react/view {:style tabs.styles/icon-container}
|
||||
[vector-icons/icon icon (tabs.styles/icon active?)]
|
||||
(when count
|
||||
(cond
|
||||
(or (pos? count) (pos? (:other count)))
|
||||
[react/view {:style (if (= nav-stack :chat-stack)
|
||||
tabs.styles/message-counter
|
||||
tabs.styles/counter)}
|
||||
[badge/message-counter (or (:other count) count) true]]
|
||||
(pos? (:public count))
|
||||
[react/view {:style tabs.styles/counter-public-container}
|
||||
[react/view {:style tabs.styles/counter-public
|
||||
:accessibility-label :public-unread-badge}]]))]
|
||||
(when-not platform/desktop?
|
||||
[react/view {:style tabs.styles/tab-title-container}
|
||||
[react/text {:style (tabs.styles/tab-title active?)}
|
||||
label]])]]])))
|
||||
|
||||
(defn tabs []
|
||||
(let [listeners (atom [])
|
||||
keyboard-shown? (reagent/atom false)]
|
||||
(let [listeners (atom [])
|
||||
keyboard-shown? (reagent/atom false)
|
||||
keyboard-visible (animation/create-value 0)]
|
||||
(reagent/create-class
|
||||
{:component-did-mount
|
||||
(fn []
|
||||
@@ -106,10 +104,20 @@
|
||||
listeners
|
||||
[(.addListener react/keyboard "keyboardDidShow"
|
||||
(fn []
|
||||
(reset! keyboard-shown? true)))
|
||||
(reset! keyboard-shown? true)
|
||||
(reagent/flush)
|
||||
(animation/start
|
||||
(animation/timing keyboard-visible
|
||||
{:toValue 1
|
||||
:duration 200}))))
|
||||
(.addListener react/keyboard "keyboardDidHide"
|
||||
(fn []
|
||||
(reset! keyboard-shown? false)))])))
|
||||
(animation/start
|
||||
(animation/timing keyboard-visible
|
||||
{:toValue 0
|
||||
:duration 200})
|
||||
#(do (reset! keyboard-shown? false)
|
||||
(reagent/flush)))))])))
|
||||
:component-will-unmount
|
||||
(fn []
|
||||
(when (not-empty @listeners)
|
||||
@@ -118,25 +126,24 @@
|
||||
(.remove listener)))))
|
||||
:reagent-render
|
||||
(fn [{:keys [navigate index inset]}]
|
||||
[react/animated-view {:style (tabs.styles/tabs-wrapper @keyboard-shown? @minimized-state inset)}
|
||||
[react/animated-view {:style (tabs.styles/animated-container visible?)}
|
||||
[react/view
|
||||
{:style tabs.styles/tabs-container}
|
||||
[react/view {:style tabs.styles/tabs}
|
||||
(for [[route-index
|
||||
{:keys [nav-stack accessibility-label count-subscription content]}]
|
||||
tabs-list-data
|
||||
|
||||
:let [{:keys [icon title]} content]]
|
||||
^{:key nav-stack}
|
||||
[tab
|
||||
{:icon icon
|
||||
:label title
|
||||
:on-press #(navigate (name nav-stack))
|
||||
:accessibility-label accessibility-label
|
||||
:count-subscription count-subscription
|
||||
:active? (= (str index) (str route-index))
|
||||
:nav-stack nav-stack}])]]]
|
||||
[react/animated-view {:style (tabs.styles/tabs-wrapper @keyboard-shown? keyboard-visible)
|
||||
:pointer-events (if @keyboard-shown? "none" "auto")}
|
||||
[react/animated-view {:style (tabs.styles/space-handler inset)
|
||||
:pointer-events "none"}]
|
||||
[react/animated-view {:style (tabs.styles/animated-container visible-native inset)}
|
||||
(for [[route-index
|
||||
{:keys [nav-stack accessibility-label count-subscription content]}]
|
||||
tabs-list-data
|
||||
:let [{:keys [icon title]} content]]
|
||||
^{:key nav-stack}
|
||||
[tab
|
||||
{:icon icon
|
||||
:label title
|
||||
:on-press #(navigate (name nav-stack))
|
||||
:accessibility-label accessibility-label
|
||||
:count-subscription count-subscription
|
||||
:active? (= (str index) (str route-index))
|
||||
:nav-stack nav-stack}])]
|
||||
[react/view
|
||||
{:style (tabs.styles/ios-titles-cover inset)}]])})))
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
(def tabs-diff (- tabs-height minimized-tabs-height))
|
||||
|
||||
(def minimized-tab-ratio
|
||||
(/ minimized-tabs-height tabs-height))
|
||||
(/ tabs-height minimized-tabs-height))
|
||||
|
||||
(def counter
|
||||
{:right 0
|
||||
@@ -81,30 +81,23 @@
|
||||
{:color (if active? colors/blue colors/gray)
|
||||
:font-size 11})
|
||||
|
||||
(styles/def tabs-container
|
||||
{:height minimized-tabs-height
|
||||
:align-self :stretch
|
||||
(defn animated-container [visible? inset]
|
||||
{:flex-direction :row
|
||||
:shadow-radius 4
|
||||
:shadow-offset {:width 0 :height -5}
|
||||
:shadow-opacity 0.3
|
||||
:shadow-color "rgba(0, 9, 26, 0.12)"
|
||||
:elevation 8
|
||||
:background-color :white
|
||||
:ios {:shadow-radius 4
|
||||
:shadow-offset {:width 0 :height -5}
|
||||
:shadow-opacity 0.3
|
||||
:shadow-color "rgba(0, 9, 26, 0.12)"}
|
||||
:desktop {:background-color :white
|
||||
:shadow-radius 4
|
||||
:shadow-offset {:width 0 :height -5}
|
||||
:shadow-opacity 0.3
|
||||
:shadow-color "rgba(0, 9, 26, 0.12)"}})
|
||||
|
||||
(def tabs
|
||||
{:align-self :stretch
|
||||
:padding-horizontal 8
|
||||
:flex-direction :row})
|
||||
|
||||
(defn animated-container [visible?]
|
||||
{:transform [{:translateY
|
||||
(animation/interpolate visible?
|
||||
{:inputRange [0 1]
|
||||
:outputRange [(- tabs-diff) 0]})}]})
|
||||
:position :absolute
|
||||
:left 0
|
||||
:right 0
|
||||
:height tabs-height
|
||||
:bottom inset
|
||||
:transform [{:translateY
|
||||
(animation/interpolate visible?
|
||||
{:inputRange [0 1]
|
||||
:outputRange [0 tabs-diff]})}]})
|
||||
|
||||
(defn ios-titles-cover [inset]
|
||||
{:background-color :white
|
||||
@@ -115,11 +108,18 @@
|
||||
:right 0
|
||||
:left 0})
|
||||
|
||||
(defn tabs-wrapper [keyboard minimized inset]
|
||||
(merge {:padding-bottom inset
|
||||
:elevation 8
|
||||
:padding-top (if minimized 0 tabs-diff)
|
||||
:background-color :white}
|
||||
(defn tabs-wrapper [keyboard visible]
|
||||
(merge {:padding-horizontal 8
|
||||
:elevation 8
|
||||
:left 0
|
||||
:right 0
|
||||
:bottom 0
|
||||
:transform [{:translateY
|
||||
(animation/interpolate visible
|
||||
{:inputRange [0 1]
|
||||
:outputRange [0 tabs-height]})}]}
|
||||
(when keyboard
|
||||
{:position :absolute
|
||||
:bottom (- tabs-height)})))
|
||||
{:position :absolute})))
|
||||
|
||||
(defn space-handler [inset]
|
||||
{:height (+ inset minimized-tabs-height)})
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
[clojure.string :as string]
|
||||
[re-frame.core :as re-frame]
|
||||
[status-im.i18n :as i18n]
|
||||
[status-im.ui.components.tabbar.styles :as main-tabs.styles]
|
||||
[status-im.ui.components.styles :as components.styles]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.utils.platform :as utils.platform]
|
||||
@@ -112,7 +111,12 @@
|
||||
:label :t/invite-friends}])])
|
||||
|
||||
(views/defview bottom-container [{:keys [on-press disabled label accessibility-label]}]
|
||||
[react/view {:style main-tabs.styles/tabs-container}
|
||||
[react/view {:style {:height 52
|
||||
:elevation 8
|
||||
:shadow-radius 4
|
||||
:shadow-offset {:width 0 :height -5}
|
||||
:shadow-opacity 0.3
|
||||
:shadow-color "rgba(0, 9, 26, 0.12)"}}
|
||||
[react/view {:style components.styles/flex}]
|
||||
[react/view {:style styles/bottom-container}
|
||||
[components.common/bottom-button
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
[status-im.i18n :as i18n]
|
||||
[reagent.core :as reagent]
|
||||
[clojure.string :as string]
|
||||
[status-im.ui.components.tabbar.styles :as main-tabs.styles]
|
||||
[status-im.ui.components.colors :as colors]
|
||||
[status-im.ui.components.icons.vector-icons :as icons]
|
||||
[status-im.utils.platform :as utils.platform]
|
||||
@@ -52,8 +51,12 @@
|
||||
(defn footer [syncing]
|
||||
[react/touchable-highlight {:on-press (when-not @syncing
|
||||
synchronize-installations!)
|
||||
;; TODO: Inspect the need of coupling with tabbar here
|
||||
:style main-tabs.styles/tabs-container}
|
||||
:style {:height 52
|
||||
:elevation 8
|
||||
:shadow-radius 4
|
||||
:shadow-offset {:width 0 :height -5}
|
||||
:shadow-opacity 0.3
|
||||
:shadow-color "rgba(0, 9, 26, 0.12)"}}
|
||||
[react/view
|
||||
{:style styles/footer-content}
|
||||
[react/text
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
(ns status-im.ui.screens.routing.browser-stack
|
||||
(:require [status-im.ui.screens.routing.core :as navigation]
|
||||
[status-im.ui.screens.browser.open-dapp.views :as open-dapp]
|
||||
[status-im.ui.screens.browser.views :as browser]))
|
||||
[status-im.ui.screens.browser.views :as browser]
|
||||
[status-im.ui.components.tabbar.styles :as tabbar.styles]))
|
||||
|
||||
(defonce stack (navigation/create-stack))
|
||||
|
||||
@@ -9,6 +10,7 @@
|
||||
[stack {:initial-route-name :open-dapp
|
||||
:header-mode :none}
|
||||
[{:name :open-dapp
|
||||
:style {:padding-bottom tabbar.styles/tabs-diff}
|
||||
:component open-dapp/open-dapp}
|
||||
{:name :browser
|
||||
:back-handler :noop
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
[status-im.ui.screens.profile.group-chat.views :as profile.group-chat]
|
||||
[status-im.chat.models.loading :as chat.loading]
|
||||
[status-im.ui.screens.group.events :as group.events]
|
||||
[status-im.ui.components.tabbar.styles :as tabbar.styles]
|
||||
[status-im.ui.screens.stickers.views :as stickers]))
|
||||
|
||||
(defonce stack (navigation/create-stack))
|
||||
@@ -16,6 +17,7 @@
|
||||
:header-mode :none}
|
||||
[{:name :home
|
||||
:on-focus [::chat.loading/offload-all-messages]
|
||||
:style {:padding-bottom tabbar.styles/tabs-diff}
|
||||
:component home/home}
|
||||
{:name :chat
|
||||
:on-focus [::chat.loading/load-messages]
|
||||
|
||||
@@ -45,14 +45,19 @@
|
||||
(remove-back-handler-listener "hardwareBackPress" on-back-press))))
|
||||
#js [])))
|
||||
|
||||
(defn wrapped-screen-style [{:keys [insets]} insets-obj]
|
||||
(defn wrapped-screen-style [{:keys [insets style]} insets-obj]
|
||||
(merge
|
||||
{:background-color :white
|
||||
:flex 1}
|
||||
style
|
||||
(when (get insets :bottom)
|
||||
{:padding-bottom (oget insets-obj "bottom")})
|
||||
{:padding-bottom (+ (oget insets-obj "bottom")
|
||||
(get style :padding-bottom)
|
||||
(get style :padding-vertical))})
|
||||
(when (get insets :top true)
|
||||
{:padding-top (oget insets-obj "top")})))
|
||||
{:padding-top (+ (oget insets-obj "top")
|
||||
(get style :padding-top)
|
||||
(get style :padding-vertical))})))
|
||||
|
||||
(defn presentation-type [{:keys [transition] :as opts}]
|
||||
(if (and platform/ios? (= transition :presentation-ios))
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
[status-im.ui.screens.profile.tribute-to-talk.views :as tr-to-talk]
|
||||
[status-im.ui.screens.hardwallet.pin.views :as hardwallet.pin]
|
||||
[status-im.ui.screens.hardwallet.settings.views :as hardwallet.settings]
|
||||
[status-im.ui.components.tabbar.styles :as tabbar.styles]
|
||||
[status-im.ui.screens.routing.core :as navigation]))
|
||||
|
||||
(defonce stack (navigation/create-stack))
|
||||
@@ -43,6 +44,7 @@
|
||||
[stack {:initial-route-name :my-profile
|
||||
:header-mode :none}
|
||||
[{:name :my-profile
|
||||
:style {:padding-bottom tabbar.styles/tabs-diff}
|
||||
:component profile.user/my-profile}
|
||||
{:name :contacts-list
|
||||
:component contacts-list/contacts-list}
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
[status-im.ui.screens.wallet.add-new.views :as add-account]
|
||||
[status-im.ui.screens.wallet.account-settings.views :as account-settings]
|
||||
[status-im.ui.screens.wallet.events :as wallet.events]
|
||||
[status-im.ui.components.tabbar.styles :as tabbar.styles]
|
||||
[status-im.ui.screens.routing.core :as navigation]))
|
||||
|
||||
(defonce stack (navigation/create-stack))
|
||||
@@ -18,6 +19,7 @@
|
||||
[stack {:initial-route-name :wallet
|
||||
:header-mode :none}
|
||||
[{:name :wallet
|
||||
:style {:padding-bottom tabbar.styles/tabs-diff}
|
||||
:component wallet.accounts/accounts-overview}
|
||||
{:name :wallet-account
|
||||
:component wallet.account/account}
|
||||
|
||||
@@ -32,10 +32,9 @@
|
||||
(cond
|
||||
(and (string/starts-with? hex "0xe40101"))
|
||||
;; content type can be 2 or 4 bytes
|
||||
;; we expect 1b20 (hash algorithm and hash length 64)
|
||||
;; we expect 1b20 (hash algorithm keccak256 and hash length 64)
|
||||
;; before the hash so we split the contenthash there
|
||||
(when-let [hash (second (string/split hex "1b20"))]
|
||||
(when (= 0x20 (count hash)))
|
||||
{:namespace :swarm
|
||||
:hash hash})
|
||||
(and (= 78 (count hex))
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
{:method "eth_getBalance"
|
||||
:params [address "latest"]
|
||||
:on-success on-success
|
||||
:number-of-retries 4
|
||||
:number-of-retries 50
|
||||
:on-error on-error}))
|
||||
|
||||
(re-frame/reg-fx
|
||||
@@ -180,7 +180,7 @@
|
||||
(json-rpc/call
|
||||
{:method "wallet_getTokensBalances"
|
||||
:params [addresses (keys tokens)]
|
||||
:number-of-retries 4
|
||||
:number-of-retries 50
|
||||
:on-success
|
||||
(fn [results]
|
||||
(when-let [balances (clean-up-results results tokens (if init? nil assets))]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"_comment": "DO NOT EDIT THIS FILE BY HAND. USE 'scripts/update-status-go.sh <tag>' instead",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v0.49.0",
|
||||
"commit-sha1": "d7bb02540a4356fb507a08ed73491c659b076fb1",
|
||||
"src-sha256": "0i6s085qq67aiyzjs2lrjfnaqvbh1v1jxdsi84c176y150lwb8lw"
|
||||
"version": "v0.50.2",
|
||||
"commit-sha1": "44272944abeb3c32cc0ca6b089e783cb530037d4",
|
||||
"src-sha256": "1n6fsqnxpbn5srdxg37iqpw57xipfxan3sh35aa3vg8y9dhns1cn"
|
||||
}
|
||||
|
||||
@@ -67,3 +67,5 @@
|
||||
(def react-navigation-stack #js {:createStackNavigator identity
|
||||
:TransitionPresets #js {:ModalPresentationIOS #js {}}})
|
||||
(def react-navigation-bottom-tabs #js {:createBottomTabNavigator identity})
|
||||
|
||||
(def react-native-gesture-handler #js {})
|
||||
|
||||
@@ -9,3 +9,11 @@
|
||||
(ens/namehash "eth")))
|
||||
(is (= "0xde9b09fd7c5f901e23a3f19fecc54828e9c848539801e86591bd9801b019f84f"
|
||||
(ens/namehash "foo.eth"))))
|
||||
|
||||
(deftest cleanup-hash
|
||||
;; simpledapp.eth
|
||||
(is (= "0xe30101701220795c1ea0ceaf4ceedc9896f14b73bb30e978e4855ee221b9a57f5a934268280e"
|
||||
(ens/cleanup-hash "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026e30101701220795c1ea0ceaf4ceedc9896f14b73bb30e978e4855ee221b9a57f5a934268280e0000000000000000000000000000000000000000000000000000")))
|
||||
;; ethereum.eth
|
||||
(is (= "0xe301017012206e70f0f72e2bcd0ad69bb2b15ee9e0f4f88693f6b2f485e48699e7d6f8dbd62a"
|
||||
(ens/cleanup-hash "0x00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000026e301017012206e70f0f72e2bcd0ad69bb2b15ee9e0f4f88693f6b2f485e48699e7d6f8dbd62a0000000000000000000000000000000000000000000000000000"))))
|
||||
|
||||
Reference in New Issue
Block a user