Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
83112265cf | ||
|
|
767be39673 | ||
|
|
714d966d48 | ||
|
|
11d66e5bc2 | ||
|
|
9d5f6d0b06 | ||
|
|
48c83ef759 | ||
|
|
c84fc71bf1 |
+1
-1
@@ -2,7 +2,7 @@ DEBUG_WEBVIEW=0
|
||||
ETHEREUM_DEV_CLUSTER=0
|
||||
EXTENSIONS=0
|
||||
GROUP_CHATS_ENABLED=1
|
||||
LOG_LEVEL=
|
||||
LOG_LEVEL=error
|
||||
MAILSERVER_CONFIRMATIONS_ENABLED=1
|
||||
MAINNET_WARNING_ENABLED=1
|
||||
PFS_ENCRYPTION_ENABLED=1
|
||||
|
||||
@@ -109,10 +109,19 @@ pipeline {
|
||||
stage('Upload') {
|
||||
steps { script {
|
||||
sshagent(credentials: ['nix-cache-ssh']) {
|
||||
nix.shell("""
|
||||
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}
|
||||
-not -name "*.links" -and -not -name "*-status-mobile-*" \
|
||||
-and -not -name "tmp-*" \
|
||||
-print0 | xargs -0 nix-store -qR | sort -u > "${WORKSPACE_TMP}"/store-paths.txt
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
nix.shell(
|
||||
"""
|
||||
nix-store --export < "${WORKSPACE_TMP}"/store-paths.txt | \\
|
||||
ssh ${env.NIX_SSHOPTS} ${params.NIX_CACHE_USER}@${params.NIX_CACHE_HOST} ${env.NIX_STORE_CMD} --import
|
||||
""",
|
||||
pure: false
|
||||
)
|
||||
|
||||
@@ -71,7 +71,7 @@ in stdenv.mkDerivation rec {
|
||||
};
|
||||
};
|
||||
|
||||
buildInputs = with pkgs; [ nodejs openjdk ];
|
||||
buildInputs = with pkgs; [ nodejs openjdk_headless ];
|
||||
nativeBuildInputs = with pkgs; [ bash gradle unzip ]
|
||||
++ lib.optionals stdenv.isDarwin [ file gnumake ];
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ rec {
|
||||
|
||||
shell = mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
openjdk
|
||||
openjdk_headless
|
||||
gradle
|
||||
lsof # used in start-react-native.sh
|
||||
flock # used in nix/scripts/node_modules.sh
|
||||
|
||||
@@ -38,7 +38,7 @@ stdenv.mkDerivation {
|
||||
];
|
||||
};
|
||||
};
|
||||
buildInputs = with pkgs; [ clojure nodejs bash git openjdk];
|
||||
buildInputs = with pkgs; [ clojure nodejs bash git openjdk_headless ];
|
||||
phases = [
|
||||
"unpackPhase" "secretsPhase" "patchPhase"
|
||||
"configurePhase" "buildPhase" "installPhase"
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ in {
|
||||
nodejs = super.nodejs_20;
|
||||
ruby = super.ruby_3_1;
|
||||
yarn = super.yarn.override { nodejs = super.nodejs_20; };
|
||||
openjdk = super.openjdk17_headless;
|
||||
openjdk_headless = super.openjdk17_headless;
|
||||
xcodeWrapper = callPackage ./pkgs/xcodeenv/compose-xcodewrapper.nix { } {
|
||||
versions = ["16.0" "16.1" "16.2"];
|
||||
};
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{ mkShell, openjdk, androidPkgs }:
|
||||
{ mkShell, openjdk_headless, androidPkgs }:
|
||||
|
||||
mkShell {
|
||||
name = "android-sdk-shell";
|
||||
buildInputs = [ openjdk ];
|
||||
buildInputs = [ openjdk_headless ];
|
||||
|
||||
shellHook = ''
|
||||
export ANDROID_HOME="${androidPkgs.sdk}"
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ let
|
||||
# for calling clojure targets in CI or Makefile
|
||||
clojure = mkShell {
|
||||
buildInputs = with pkgs; [
|
||||
clojure flock maven openjdk
|
||||
clojure flock maven openjdk_headless
|
||||
# lint specific utilities
|
||||
babashka clj-kondo clojure-lsp ripgrep zprint
|
||||
];
|
||||
@@ -61,7 +61,7 @@ let
|
||||
|
||||
# for 'scripts/generate-keystore.sh'
|
||||
keytool = mkShell {
|
||||
buildInputs = with pkgs; [ openjdk apksigner ];
|
||||
buildInputs = with pkgs; [ openjdk_headless apksigner ];
|
||||
};
|
||||
|
||||
# for targets needing 'adb', 'apkanalyzer' and other SDK/NDK tools
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{ callPackage, lib, buildGoPackage, pkgs
|
||||
, androidPkgs, openjdk, gomobile, xcodeWrapper, removeReferencesTo
|
||||
, androidPkgs, openjdk_headless, gomobile, xcodeWrapper, removeReferencesTo
|
||||
, go-bindata, mockgen, protobuf3_20, protoc-gen-go
|
||||
, meta
|
||||
, source
|
||||
@@ -32,7 +32,7 @@ in buildGoPackage rec {
|
||||
extraSrcPaths = [ gomobile ];
|
||||
nativeBuildInputs = [
|
||||
gomobile removeReferencesTo go-bindata mockgen protoc-gen-go protobuf3_20 fakeGit
|
||||
] ++ optional isAndroid openjdk
|
||||
] ++ optional isAndroid openjdk_headless
|
||||
++ optional isIOS xcodeWrapper;
|
||||
|
||||
ldflags = goBuildLdFlags;
|
||||
|
||||
@@ -2,19 +2,41 @@
|
||||
(:require
|
||||
[legacy.status-im.multiaccounts.update.core :as multiaccounts.update]
|
||||
[re-frame.core :as re-frame]
|
||||
[taoensso.timbre :as log]
|
||||
[utils.i18n :as i18n]
|
||||
[utils.re-frame :as rf]))
|
||||
|
||||
(rf/defn save-log-level
|
||||
{:events [:log-level.ui/change-log-level-confirmed]}
|
||||
[{:keys [db] :as cofx} log-level]
|
||||
[{:keys [db]} log-level]
|
||||
(let [old-log-level (get-in db [:profile/profile :log-level])]
|
||||
(when (not= old-log-level log-level)
|
||||
(multiaccounts.update/multiaccount-update
|
||||
cofx
|
||||
:log-level
|
||||
log-level
|
||||
{:on-success #(re-frame/dispatch [:profile/logout])}))))
|
||||
(let [need-set-log-enabled? (or (empty? old-log-level) (empty? log-level))
|
||||
log-enabled? (boolean (seq log-level))
|
||||
rpc-calls (cond-> []
|
||||
log-enabled?
|
||||
(conj {:method "wakuext_setLogLevel"
|
||||
:params [{:logLevel log-level}]
|
||||
:on-error #(log/error "Failed to set log level" %)})
|
||||
|
||||
need-set-log-enabled?
|
||||
(conj {:method "wakuext_setLogEnabled"
|
||||
:params [log-enabled?]
|
||||
:on-error #(log/error "Failed to set log enabled" %)}))]
|
||||
{:fx [[:json-rpc/call
|
||||
(conj (vec (map #(assoc % :on-success nil) (butlast rpc-calls)))
|
||||
(assoc (last rpc-calls)
|
||||
:on-success
|
||||
#(rf/dispatch [:log-level/update-multiaccount log-level])))]]}))))
|
||||
|
||||
(rf/defn update-multiaccount
|
||||
{:events [:log-level/update-multiaccount]}
|
||||
[cofx log-level]
|
||||
(multiaccounts.update/multiaccount-update
|
||||
cofx
|
||||
:log-level
|
||||
log-level
|
||||
{:on-success #(rf/dispatch [:profile/logout])}))
|
||||
|
||||
(rf/defn show-change-log-level-confirmation
|
||||
{:events [:log-level.ui/log-level-selected]}
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
name]]]]))
|
||||
|
||||
(def log-levels
|
||||
"The status-go log library (zap) doesn't support the trace level, so we remove
|
||||
the trace option from the UI. When trace is enabled an error will happen while
|
||||
trying to login (user will see the error 'wrong password')."
|
||||
[{:name "DISABLED"
|
||||
:value ""}
|
||||
{:name "ERROR"
|
||||
@@ -42,9 +45,7 @@
|
||||
{:name "INFO"
|
||||
:value "INFO"}
|
||||
{:name "DEBUG"
|
||||
:value "DEBUG"}
|
||||
{:name "TRACE"
|
||||
:value "TRACE"}])
|
||||
:value "DEBUG"}])
|
||||
|
||||
(views/defview log-level-settings
|
||||
[]
|
||||
|
||||
@@ -275,7 +275,8 @@
|
||||
{:events [:chat/unmute-chat-community]}
|
||||
[{:keys [db]} chat-id]
|
||||
(let [{:keys [community-id]} (get-in db [:chats chat-id])]
|
||||
{:db (assoc-in db [:communities community-id :muted] false)}))
|
||||
(when community-id
|
||||
{:db (assoc-in db [:communities community-id :muted] false)})))
|
||||
|
||||
(rf/defn mute-chat-failed
|
||||
{:events [:chat/mute-failed]}
|
||||
|
||||
@@ -480,3 +480,13 @@
|
||||
(filter (fn [{:keys [tokens]}]
|
||||
(some positive-balance-in-any-chain? tokens))
|
||||
operable-account))))
|
||||
|
||||
(defn token-exchange-rate
|
||||
"Returns the exchange rate based on the token prices.
|
||||
i.e. how many 'divisor' tokens is one 'divident' token."
|
||||
([divident-price divisor-price]
|
||||
(token-exchange-rate divident-price divisor-price constants/min-token-decimals-to-display))
|
||||
([divident-price divisor-price divisor-token-decimals]
|
||||
(-> (money/bignumber divident-price)
|
||||
(money/div (money/bignumber divisor-price))
|
||||
(number/to-fixed (min divisor-token-decimals constants/min-token-decimals-to-display)))))
|
||||
|
||||
@@ -186,16 +186,17 @@
|
||||
|
||||
(rf/reg-event-fx :wallet/swap-proposal-success
|
||||
(fn [{:keys [db]} [swap-proposal]]
|
||||
(let [last-request-uuid (get-in db [:wallet :ui :swap :last-request-uuid])
|
||||
amount-hex (get-in db [:wallet :ui :swap :amount-hex])
|
||||
asset-to-pay (get-in db [:wallet :ui :swap :asset-to-pay])
|
||||
asset-to-receive (get-in db [:wallet :ui :swap :asset-to-receive])
|
||||
network (get-in db [:wallet :ui :swap :network])
|
||||
initial-response? (get-in db [:wallet :ui :swap :initial-response?])
|
||||
view-id (:view-id db)
|
||||
request-uuid (:uuid swap-proposal)
|
||||
best-routes (:best swap-proposal)
|
||||
error-response (:error-response swap-proposal)]
|
||||
(let [last-request-uuid (get-in db [:wallet :ui :swap :last-request-uuid])
|
||||
amount-hex (get-in db [:wallet :ui :swap :amount-hex])
|
||||
asset-to-pay (get-in db [:wallet :ui :swap :asset-to-pay])
|
||||
asset-to-receive (get-in db [:wallet :ui :swap :asset-to-receive])
|
||||
network (get-in db [:wallet :ui :swap :network])
|
||||
initial-response? (get-in db [:wallet :ui :swap :initial-response?])
|
||||
view-id (:view-id db)
|
||||
request-uuid (:uuid swap-proposal)
|
||||
best-routes (:best swap-proposal)
|
||||
updated-token-prices (:updated-prices swap-proposal)
|
||||
error-response (:error-response swap-proposal)]
|
||||
(when (and (= request-uuid last-request-uuid)
|
||||
(or (and (empty? best-routes) error-response)
|
||||
(and
|
||||
@@ -207,6 +208,7 @@
|
||||
:swap-proposal (when-not (empty? best-routes)
|
||||
(assoc (first best-routes) :uuid request-uuid))
|
||||
:error-response error-response
|
||||
:updated-token-prices updated-token-prices
|
||||
:loading-swap-proposal? false
|
||||
:initial-response? false)}
|
||||
(and initial-response? (seq best-routes))
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
(ns status-im.contexts.wallet.swap.utils
|
||||
(:require [status-im.constants :as constants]
|
||||
(:require [clojure.string :as string]
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.wallet.common.utils.networks :as network-utils]
|
||||
[utils.i18n :as i18n]))
|
||||
|
||||
@@ -62,3 +63,12 @@
|
||||
[{:keys [networks]}]
|
||||
(when (= (count networks) 1)
|
||||
(first networks)))
|
||||
|
||||
(defn updated-token-price
|
||||
"Returns the updated token price (number) from the routes."
|
||||
[token updated-prices]
|
||||
(->> token
|
||||
:symbol
|
||||
string/lower-case
|
||||
keyword
|
||||
(get updated-prices)))
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
[status-im.constants :as constants]
|
||||
[status-im.contexts.wallet.common.utils :as utils]
|
||||
[status-im.contexts.wallet.send.utils :as send-utils]
|
||||
[status-im.contexts.wallet.swap.utils :as swap-utils]
|
||||
[utils.money :as money]
|
||||
[utils.number :as number]))
|
||||
|
||||
@@ -62,6 +63,11 @@
|
||||
:<- [:wallet/swap-asset-to-pay]
|
||||
:-> :symbol)
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/swap-updated-token-prices
|
||||
:<- [:wallet/swap]
|
||||
:-> :updated-token-prices)
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/swap-asset-to-pay-networks
|
||||
:<- [:wallet/swap-asset-to-pay]
|
||||
@@ -336,40 +342,23 @@
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/swap-exchange-rate-crypto
|
||||
:<- [:wallet/swap-proposal-amount-in]
|
||||
:<- [:wallet/swap-asset-to-pay]
|
||||
:<- [:wallet/swap-proposal-amount-out]
|
||||
:<- [:wallet/swap-asset-to-receive]
|
||||
(fn [[amount-in asset-to-pay amount-out asset-to-receive]]
|
||||
(let [pay-token-decimals (:decimals asset-to-pay)
|
||||
receive-token-decimals (:decimals asset-to-receive)
|
||||
amount-in-num (some-> amount-in
|
||||
(number/hex->whole pay-token-decimals)
|
||||
(number/to-fixed pay-token-decimals)
|
||||
(money/->bignumber))
|
||||
amount-out-num (some-> amount-out
|
||||
(number/hex->whole receive-token-decimals)
|
||||
(number/to-fixed receive-token-decimals)
|
||||
(money/->bignumber))
|
||||
exchange-rate (when (and amount-in-num amount-out-num)
|
||||
(money/div amount-in-num amount-out-num))
|
||||
display-decimals (min pay-token-decimals
|
||||
constants/min-token-decimals-to-display)]
|
||||
(when exchange-rate
|
||||
(number/to-fixed exchange-rate display-decimals)))))
|
||||
:<- [:wallet/swap-updated-token-prices]
|
||||
(fn [[asset-to-pay asset-to-receive token-prices]]
|
||||
(when (and token-prices asset-to-pay asset-to-receive)
|
||||
(let [pay-price (swap-utils/updated-token-price asset-to-pay token-prices)
|
||||
receive-price (swap-utils/updated-token-price asset-to-receive token-prices)
|
||||
pay-token-decimals (:decimals asset-to-pay)]
|
||||
(utils/token-exchange-rate receive-price pay-price pay-token-decimals)))))
|
||||
|
||||
(rf/reg-sub
|
||||
:wallet/swap-exchange-rate-fiat
|
||||
:<- [:wallet/swap-exchange-rate-crypto]
|
||||
:<- [:wallet/swap-asset-to-pay]
|
||||
:<- [:profile/currency]
|
||||
:<- [:wallet/swap-asset-to-receive]
|
||||
:<- [:wallet/swap-updated-token-prices]
|
||||
:<- [:profile/currency-symbol]
|
||||
:<- [:wallet/prices-per-token]
|
||||
(fn [[swap-exchange-rate asset-to-pay currency currency-symbol prices-per-token]]
|
||||
(when swap-exchange-rate
|
||||
(let [fiat-value (utils/calculate-token-fiat-value
|
||||
{:currency currency
|
||||
:balance swap-exchange-rate
|
||||
:token asset-to-pay
|
||||
:prices-per-token prices-per-token})]
|
||||
(utils/fiat-formatted-for-ui currency-symbol fiat-value)))))
|
||||
(fn [[asset-to-receive token-prices currency-symbol]]
|
||||
(when (and asset-to-receive token-prices)
|
||||
(->> token-prices
|
||||
(swap-utils/updated-token-price asset-to-receive)
|
||||
(utils/fiat-formatted-for-ui currency-symbol)))))
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"_comment": "Instead use: scripts/update-status-go.sh <rev>",
|
||||
"owner": "status-im",
|
||||
"repo": "status-go",
|
||||
"version": "v10.6.0",
|
||||
"commit-sha1": "c5e4eb1a56ea7641efcc7cc677be7fd5d3f92225",
|
||||
"src-sha256": "0n8x03c4dqxwcl27y8x6hmn6wbfpq3llkj15hhjxc4baaqwrhy8i"
|
||||
"version": "v10.8.0",
|
||||
"commit-sha1": "ba8fd51958686aea45e34e684ac925a4e65927f8",
|
||||
"src-sha256": "0kqn5rkfsn7aqc2n2flqvkm6cc53ssk0mc1l84f4czg0paci0717"
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
|
||||
self.wallet_view.collectibles_tab.click()
|
||||
self.wallet_view.set_network_in_wallet(self.network_name)
|
||||
collectibles = {
|
||||
"BVL": {"quantity": 2,
|
||||
"BVL": {"quantity": 1,
|
||||
"info": {"Account": "Account 1",
|
||||
"Network": "Base",
|
||||
"category": "Football Player",
|
||||
@@ -102,8 +102,8 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
|
||||
self.wallet_view.collectibles_tab_on_select_token_view.click()
|
||||
time.sleep(5)
|
||||
self.wallet_view.get_collectible_element('BVL').click()
|
||||
self.wallet_view.amount_input_increase_button.click()
|
||||
self.wallet_view.confirm_button.click()
|
||||
# self.wallet_view.amount_input_increase_button.click()
|
||||
# self.wallet_view.confirm_button.click()
|
||||
for text in [self.account_name, self.sender_short_address]:
|
||||
if not self.wallet_view.from_data_container.get_child_element_by_text(text).is_element_displayed():
|
||||
self.errors.append(self.wallet_view,
|
||||
@@ -118,7 +118,7 @@ class TestWalletCollectibles(MultipleSharedDeviceTestCase):
|
||||
data_to_check = {
|
||||
'Est. time': ' min',
|
||||
'Max fees': r"[$]\d+.\d+",
|
||||
'Recipient gets': '2 '
|
||||
'Recipient gets': '1 '
|
||||
}
|
||||
for key, expected_value in data_to_check.items():
|
||||
try:
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 329 KiB After Width: | Height: | Size: 330 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
Reference in New Issue
Block a user