From 0eabc7bb0ebfb73289e0b1f2ce643741b4da38b8 Mon Sep 17 00:00:00 2001 From: Brian Sztamfater Date: Tue, 9 Apr 2024 20:30:18 -0300 Subject: [PATCH] fix comp tests --- .../send/input_amount/component_spec.cljs | 117 ++++++++++-------- 1 file changed, 62 insertions(+), 55 deletions(-) diff --git a/src/status_im/contexts/wallet/send/input_amount/component_spec.cljs b/src/status_im/contexts/wallet/send/input_amount/component_spec.cljs index 5257d3e39fe9..14cbba608e34 100644 --- a/src/status_im/contexts/wallet/send/input_amount/component_spec.cljs +++ b/src/status_im/contexts/wallet/send/input_amount/component_spec.cljs @@ -12,61 +12,68 @@ (set! debounce/debounce-and-dispatch #()) (def sub-mocks - {:profile/profile {:currency :usd} - :wallet/selected-network-details [{:source 525 - :short-name "eth" - :network-name :mainnet - :chain-id 1 - :related-chain-id 5}] - :wallet/current-viewing-account {:path "m/44'/60'/0'/0/1" - :emoji "💎" - :key-uid "0x2f5ea39" - :address "0x1" - :wallet false - :name "Account One" - :type :generated - :watch-only? false - :chat false - :test-preferred-chain-ids #{5 420 421613} - :color :purple - :hidden false - :prod-preferred-chain-ids #{1 10 42161} - :network-preferences-names #{:mainnet :arbitrum - :optimism} - :position 1 - :clock 1698945829328 - :created-at 1698928839000 - :operable "fully" - :mixedcase-address "0x7bcDfc75c431" - :public-key "0x04371e2d9d66b82f056bc128064" - :removed false} - :wallet/wallet-send-token {:symbol :eth - :total-balance 100 - :market-values-per-currency {:usd {:price 10}} - :balances-per-chain {1 {:raw-balance - (money/bignumber - "2500") - :has-error false}}} - :wallet/wallet-send-loading-suggested-routes? false - :wallet/wallet-send-route [{:from {:chainid 1 - :native-currency-symbol "ETH"} - :to {:chain-id 1 - :native-currency-symbol "ETH"} - :gas-amount "23487" - :gas-fees {:base-fee "32.325296406" - :max-priority-fee-per-gas "0.011000001" - :eip1559-enabled true}}] - :wallet/wallet-send-suggested-routes {:candidates []} - :wallet/wallet-send-selected-networks [1] - :view-id :screen/wallet.send-input-amount - :wallet/wallet-send-to-address "0x04371e2d9d66b82f056bc128064" - :profile/currency-symbol "$" - :wallet/token-by-symbol {:symbol :eth - :total-balance 100 - :market-values-per-currency {:usd {:price 10}}} - :wallet/wallet-send-disabled-from-chain-ids [] - :wallet/wallet-send-from-values-by-chain {1 (money/bignumber "250")} - :wallet/wallet-send-to-values-by-chain {1 (money/bignumber "250")}}) + {:profile/profile {:currency :usd} + :wallet/selected-network-details [{:source 525 + :short-name "eth" + :network-name :mainnet + :chain-id 1 + :related-chain-id 5}] + :wallet/current-viewing-account {:path "m/44'/60'/0'/0/1" + :emoji "💎" + :key-uid "0x2f5ea39" + :address "0x1" + :wallet false + :name "Account One" + :type :generated + :watch-only? false + :chat false + :test-preferred-chain-ids #{5 420 421613} + :color :purple + :hidden false + :prod-preferred-chain-ids #{1 10 42161} + :network-preferences-names #{:mainnet :arbitrum + :optimism} + :position 1 + :clock 1698945829328 + :created-at 1698928839000 + :operable "fully" + :mixedcase-address "0x7bcDfc75c431" + :public-key "0x04371e2d9d66b82f056bc128064" + :removed false} + :wallet/wallet-send-token {:symbol :eth + :networks [{:source 879 + :short-name "eth" + :network-name :mainnet + :abbreviated-name "Eth." + :chain-id 1 + :related-chain-id 1 + :layer 1}]} + :wallet/current-viewing-account-tokens-filtered {:balances-per-chain {1 {:raw-balance + (money/bignumber + "2500") + :has-error false}} + :total-balance 100 + :market-values-per-currency {:usd {:price 10}}} + :wallet/wallet-send-loading-suggested-routes? false + :wallet/wallet-send-route [{:from {:chainid 1 + :native-currency-symbol "ETH"} + :to {:chain-id 1 + :native-currency-symbol "ETH"} + :gas-amount "23487" + :gas-fees {:base-fee "32.325296406" + :max-priority-fee-per-gas "0.011000001" + :eip1559-enabled true}}] + :wallet/wallet-send-suggested-routes {:candidates []} + :wallet/wallet-send-selected-networks [1] + :view-id :screen/wallet.send-input-amount + :wallet/wallet-send-to-address "0x04371e2d9d66b82f056bc128064" + :profile/currency-symbol "$" + :wallet/token-by-symbol {:symbol :eth + :total-balance 100 + :market-values-per-currency {:usd {:price 10}}} + :wallet/wallet-send-disabled-from-chain-ids [] + :wallet/wallet-send-from-values-by-chain {1 (money/bignumber "250")} + :wallet/wallet-send-to-values-by-chain {1 (money/bignumber "250")}}) (h/describe "Send > input amount screen" (h/setup-restorable-re-frame)