chore: rename opt to oeth (#19974)

chore: rename opt to oeth (#19974)
This commit is contained in:
Omar Basem 2024-05-17 22:23:51 +04:00 committed by GitHub
parent 9d302d8192
commit 624593ec35
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
20 changed files with 47 additions and 47 deletions

View File

@ -13,7 +13,7 @@
:name "Trip to Vegas" :name "Trip to Vegas"
:address "0x0ah...71a"} :address "0x0ah...71a"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:action :none}]) :action :none}])
(def default-details (def default-details

View File

@ -48,7 +48,7 @@
(when show-optimism? (when show-optimism?
[network-amount [network-amount
{:network :optimism {:network :optimism
:amount (str (:amount optimism) " " (or (:token-symbol optimism) "OPT")) :amount (str (:amount optimism) " " (or (:token-symbol optimism) "OETH"))
:divider? show-arbitrum? :divider? show-arbitrum?
:theme theme}]) :theme theme}])
(when show-arbitrum? (when show-arbitrum?

View File

@ -257,7 +257,7 @@
(def ^:private get-network-full-name (def ^:private get-network-full-name
{:eth :ethereum {:eth :ethereum
:opt :optimism :oeth :optimism
:arb1 :arbitrum}) :arb1 :arbitrum})
(def ^:private networks-short-name (def ^:private networks-short-name

View File

@ -251,7 +251,7 @@
(def regx-community-universal-link #"((^https?://status.app/)|(^status-app://))c/([\x00-\x7F]+)$") (def regx-community-universal-link #"((^https?://status.app/)|(^status-app://))c/([\x00-\x7F]+)$")
(def regx-deep-link #"((^ethereum:.*)|(^status-app://[\x00-\x7F]+$))") (def regx-deep-link #"((^ethereum:.*)|(^status-app://[\x00-\x7F]+$))")
(def regx-ens #"^(?=.{5,255}$)([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$") (def regx-ens #"^(?=.{5,255}$)([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.[a-zA-Z]{2,}$")
(def regx-multichain-address #"^(?:(?:eth:|arb1:|opt:)(?=:|))*0x[0-9a-fA-F]{40}$") (def regx-multichain-address #"^(?:(?:eth:|arb1:|oeth:)(?=:|))*0x[0-9a-fA-F]{40}$")
(def regx-address-contains #"(?i)0x[a-fA-F0-9]{40}") (def regx-address-contains #"(?i)0x[a-fA-F0-9]{40}")
(def regx-starts-with-uuid #"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}") (def regx-starts-with-uuid #"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}")
@ -468,13 +468,13 @@
(def ^:const mainnet-short-name "eth") (def ^:const mainnet-short-name "eth")
(def ^:const ethereum-short-name "eth") (def ^:const ethereum-short-name "eth")
(def ^:const optimism-short-name "opt") (def ^:const optimism-short-name "oeth")
(def ^:const arbitrum-short-name "arb1") (def ^:const arbitrum-short-name "arb1")
(def ^:const default-multichain-address-prefix "eth:opt:arb1:") (def ^:const default-multichain-address-prefix "eth:oeth:arb1:")
(def ^:const mainnet-abbreviated-name "Eth.") (def ^:const mainnet-abbreviated-name "Eth.")
(def ^:const optimism-abbreviated-name "Opt.") (def ^:const optimism-abbreviated-name "Oeth.")
(def ^:const arbitrum-abbreviated-name "Arb1.") (def ^:const arbitrum-abbreviated-name "Arb1.")
(def ^:const mainnet-network-name :mainnet) (def ^:const mainnet-network-name :mainnet)

View File

@ -16,7 +16,7 @@
:blur? false :blur? false
:title "Collectibles vault" :title "Collectibles vault"
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:description "0x0ah...78b" :description "0x0ah...78b"
:account-avatar-emoji "🍿" :account-avatar-emoji "🍿"
:customization-color (or customization-color :blue)}] :customization-color (or customization-color :blue)}]

View File

@ -21,7 +21,7 @@
:name "Trip to Vegas" :name "Trip to Vegas"
:address "0x0ah...78b"} :address "0x0ah...78b"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:action :none :action :none
:on-press (fn [] (js/alert "Item pressed")) :on-press (fn [] (js/alert "Item pressed"))
:on-options-press (fn [] (js/alert "Options pressed")) :on-options-press (fn [] (js/alert "Options pressed"))

View File

@ -14,7 +14,7 @@
[] []
(let [state (reagent/atom {:address "0x0ah...78b" (let [state (reagent/atom {:address "0x0ah...78b"
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}]})] {:network-name :optimism :short-name "oeth"}]})]
(fn [] (fn []
[preview/preview-container [preview/preview-container
{:state state {:state state

View File

@ -82,7 +82,7 @@
[network] [network]
(case network (case network
:ethereum "eth:" :ethereum "eth:"
:optimism "opt:" :optimism "oeth:"
:arbitrum "arb1:" :arbitrum "arb1:"
(str (name network) ":"))) (str (name network) ":")))

View File

@ -13,7 +13,7 @@
:name "Trip to Vegas" :name "Trip to Vegas"
:address "0x0ah...71a"} :address "0x0ah...71a"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:state :default :state :default
:action :none} :action :none}
{:account-props {:customization-color :purple {:account-props {:customization-color :purple
@ -23,7 +23,7 @@
:name "My savings" :name "My savings"
:address "0x0ah...72b"} :address "0x0ah...72b"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:state :default :state :default
:action :none} :action :none}
{:account-props {:customization-color :army {:account-props {:customization-color :army
@ -33,7 +33,7 @@
:name "Coin vault" :name "Coin vault"
:address "0x0ah...73c"} :address "0x0ah...73c"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:state :default :state :default
:action :none} :action :none}
{:account-props {:customization-color :orange {:account-props {:customization-color :orange
@ -43,7 +43,7 @@
:name "Crypto fortress" :name "Crypto fortress"
:address "0x0ah...74e"} :address "0x0ah...74e"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:state :default :state :default
:action :none} :action :none}
{:account-props {:customization-color :yellow {:account-props {:customization-color :yellow
@ -53,7 +53,7 @@
:name "Block treasure" :name "Block treasure"
:address "0x0ah...75f"} :address "0x0ah...75f"}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}] {:network-name :optimism :short-name "oeth"}]
:state :default :state :default
:action :none}]) :action :none}])

View File

@ -50,5 +50,5 @@
(-> (h/wait-for #(h/get-by-label-text :share-qr-code-settings)) (-> (h/wait-for #(h/get-by-label-text :share-qr-code-settings))
(.then (fn [] (.then (fn []
(h/is-truthy (h/get-by-text "eth:")) (h/is-truthy (h/get-by-text "eth:"))
(h/is-truthy (h/get-by-text "opt:")) (h/is-truthy (h/get-by-text "oeth:"))
(h/is-truthy (h/get-by-text "arb1:")))))))))) (h/is-truthy (h/get-by-text "arb1:"))))))))))

View File

@ -27,8 +27,8 @@
config/mainnet-chain-explorer-link config/mainnet-chain-explorer-link
address])} address])}
{:icon :i/link {:icon :i/link
:accessibility-label :view-on-opt :accessibility-label :view-on-oeth
:label (i18n/label :t/view-on-opt) :label (i18n/label :t/view-on-oeth)
:right-icon :i/external :right-icon :i/external
:on-press #(rf/dispatch :on-press #(rf/dispatch
[:wallet/navigate-to-chain-explorer-from-bottom-sheet [:wallet/navigate-to-chain-explorer-from-bottom-sheet

View File

@ -42,7 +42,7 @@
:name name :name name
:address address} :address address}
:networks [{:network-name :ethereum :short-name "eth"} :networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"} {:network-name :optimism :short-name "oeth"}
{:network-name :arbitrum :short-name "arb1"}] {:network-name :arbitrum :short-name "arb1"}]
:state :default :state :default
:action :none})))) :action :none}))))

View File

@ -6,7 +6,7 @@
[utils.i18n :as i18n] [utils.i18n :as i18n]
[utils.re-frame :as rf])) [utils.re-frame :as rf]))
(def ^:private supported-networks #{:eth :arb1 :opt}) (def ^:private supported-networks #{:eth :arb1 :oeth})
(defn- contains-supported-address? (defn- contains-supported-address?
[s] [s]

View File

@ -12,9 +12,9 @@
constants/ethereum-sepolia-chain-id)) constants/ethereum-sepolia-chain-id))
(is (= (utils/network->chain-id {:network "optimism" :testnet-enabled? true :goerli-enabled? false}) (is (= (utils/network->chain-id {:network "optimism" :testnet-enabled? true :goerli-enabled? false})
constants/optimism-sepolia-chain-id)) constants/optimism-sepolia-chain-id))
(is (= (utils/network->chain-id {:network "opt" :testnet-enabled? false :goerli-enabled? true}) (is (= (utils/network->chain-id {:network "oeth" :testnet-enabled? false :goerli-enabled? true})
constants/optimism-mainnet-chain-id)) constants/optimism-mainnet-chain-id))
(is (= (utils/network->chain-id {:network :opt :testnet-enabled? true :goerli-enabled? true}) (is (= (utils/network->chain-id {:network :oeth :testnet-enabled? true :goerli-enabled? true})
constants/optimism-goerli-chain-id)) constants/optimism-goerli-chain-id))
(is (= (utils/network->chain-id {:network :arb1 :testnet-enabled? false :goerli-enabled? false}) (is (= (utils/network->chain-id {:network :arb1 :testnet-enabled? false :goerli-enabled? false})
constants/arbitrum-mainnet-chain-id)) constants/arbitrum-mainnet-chain-id))
@ -25,24 +25,24 @@
(testing "network-preference-prefix->network-names function" (testing "network-preference-prefix->network-names function"
(is (= (utils/network-preference-prefix->network-names "eth") (is (= (utils/network-preference-prefix->network-names "eth")
(seq [:mainnet]))) (seq [:mainnet])))
(is (= (utils/network-preference-prefix->network-names "eth:opt") (is (= (utils/network-preference-prefix->network-names "eth:oeth")
(seq [:mainnet :optimism]))) (seq [:mainnet :optimism])))
(is (= (utils/network-preference-prefix->network-names "eth:opt:arb1") (is (= (utils/network-preference-prefix->network-names "eth:oeth:arb1")
(seq [:mainnet :optimism :arbitrum]))))) (seq [:mainnet :optimism :arbitrum])))))
(deftest short-names->network-preference-prefix-test (deftest short-names->network-preference-prefix-test
(are [expected short-names] (are [expected short-names]
(= expected (utils/short-names->network-preference-prefix short-names)) (= expected (utils/short-names->network-preference-prefix short-names))
"eth:" ["eth"] "eth:" ["eth"]
"eth:opt:" ["eth" "opt"] "eth:oeth:" ["eth" "oeth"]
"eth:opt:arb1:" ["eth" "opt" "arb1"])) "eth:oeth:arb1:" ["eth" "oeth" "arb1"]))
(deftest network-preference-prefix->network-names-test (deftest network-preference-prefix->network-names-test
(are [expected short-names] (are [expected short-names]
(= expected (utils/network-preference-prefix->network-names short-names)) (= expected (utils/network-preference-prefix->network-names short-names))
(seq [:mainnet]) "eth" (seq [:mainnet]) "eth"
(seq [:mainnet :optimism]) "eth:opt" (seq [:mainnet :optimism]) "eth:oeth"
(seq [:mainnet :optimism :arbitrum]) "eth:opt:arb1")) (seq [:mainnet :optimism :arbitrum]) "eth:oeth:arb1"))
(deftest test-network-ids->formatted-text (deftest test-network-ids->formatted-text
(testing "Empty network-ids should return an empty string" (testing "Empty network-ids should return an empty string"

View File

@ -102,7 +102,7 @@
:address "x000"}] :address "x000"}]
(is (= (utils/get-wallet-qr wallet-multichain) (is (= (utils/get-wallet-qr wallet-multichain)
"eth:opt:x000")) "eth:oeth:x000"))
(is (= (utils/get-wallet-qr wallet-singlechain) (is (= (utils/get-wallet-qr wallet-singlechain)
"x000"))))) "x000")))))

View File

@ -12,7 +12,7 @@
name "" name ""
ens "" ens ""
test? false test? false
;; the chain short names should be a string like eth: or eth:arb:opt: ;; the chain short names should be a string like eth: or eth:arb:oeth:
chain-short-names (str constants/mainnet-short-name ":")}}]] chain-short-names (str constants/mainnet-short-name ":")}}]]
(let [address-to-save {:address address (let [address-to-save {:address address
:name name :name name

View File

@ -21,7 +21,7 @@
:chain-id 4 :chain-id 4
:layer 2} :layer 2}
{:test? true {:test? true
:short-name "opt" :short-name "oeth"
:related-chain-id 10 :related-chain-id 10
:chain-id 5 :chain-id 5
:layer 2}] :layer 2}]
@ -34,7 +34,7 @@
:chain-id 42161 :chain-id 42161
:layer 2} :layer 2}
{:test? false {:test? false
:short-name "opt" :short-name "oeth"
:chain-id 10 :chain-id 10
:layer 2}]}) :layer 2}]})
@ -54,8 +54,8 @@
:chain-id 42161 :chain-id 42161
:layer 2} :layer 2}
{:network-name :optimism {:network-name :optimism
:short-name "opt" :short-name "oeth"
:abbreviated-name "Opt." :abbreviated-name "Oeth."
:chain-id 10 :chain-id 10
:layer 2}] :layer 2}]
(map #(dissoc % :source :related-chain-id) (rf/sub [sub-name])))))) (map #(dissoc % :source :related-chain-id) (rf/sub [sub-name]))))))
@ -77,8 +77,8 @@
:chain-id 42161 :chain-id 42161
:layer 2} :layer 2}
:optimism {:network-name :optimism :optimism {:network-name :optimism
:short-name "opt" :short-name "oeth"
:abbreviated-name "Opt." :abbreviated-name "Oeth."
:chain-id 10 :chain-id 10
:layer 2}} :layer 2}}
(rf/sub [sub-name]))))) (rf/sub [sub-name])))))

View File

@ -163,7 +163,7 @@
:related-chain-id 42161 :related-chain-id 42161
:layer 2} :layer 2}
{:test? true {:test? true
:short-name "opt" :short-name "oeth"
:related-chain-id 10 :related-chain-id 10
:layer 2}] :layer 2}]
:prod [{:test? false :prod [{:test? false
@ -175,7 +175,7 @@
:chain-id 42161 :chain-id 42161
:layer 2} :layer 2}
{:test? false {:test? false
:short-name "opt" :short-name "oeth"
:chain-id 10 :chain-id 10
:layer 2}]}) :layer 2}]})
@ -477,9 +477,9 @@
:chain-id 42161 :chain-id 42161
:related-chain-id nil :related-chain-id nil
:layer 2} :layer 2}
{:short-name "opt" {:short-name "oeth"
:network-name :optimism :network-name :optimism
:abbreviated-name "Opt." :abbreviated-name "Oeth."
:chain-id 10 :chain-id 10
:related-chain-id nil :related-chain-id nil
:layer 2}] :layer 2}]
@ -625,7 +625,7 @@
address address
emoji]} wallet-account emoji]} wallet-account
network-options [{:network-name :ethereum :short-name "eth"} network-options [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"} {:network-name :optimism :short-name "oeth"}
{:network-name :arbitrum :short-name "arb1"}] {:network-name :arbitrum :short-name "arb1"}]
size-option 20] size-option 20]
(is (is

View File

@ -3,7 +3,7 @@
"_comment": "Instead use: scripts/update-status-go.sh <rev>", "_comment": "Instead use: scripts/update-status-go.sh <rev>",
"owner": "status-im", "owner": "status-im",
"repo": "status-go", "repo": "status-go",
"version": "v0.179.17", "version": "v0.179.19",
"commit-sha1": "0dbbf7c641691b3b5b6f4eb241d133aa7d42bf82", "commit-sha1": "3103c298015483cb4d1ee90c8f432fcefe21927d",
"src-sha256": "0fp6zwb35pwmgb88xyqilw5dj8007cq9m186s915glnf94a45b7x" "src-sha256": "0ks0ks1fxfn1vdnl5j1pygvyv8gbiixihxrc1ac39yi5q61hwccb"
} }

View File

@ -2447,7 +2447,7 @@
"opensea": "OpenSea", "opensea": "OpenSea",
"mainnet": "Mainnet", "mainnet": "Mainnet",
"view-on-eth": "View on Etherscan", "view-on-eth": "View on Etherscan",
"view-on-opt": "View on Optimism Explorer", "view-on-oeth": "View on Optimism Explorer",
"view-on-arb": "View on Arbiscan", "view-on-arb": "View on Arbiscan",
"copy-address": "Copy address", "copy-address": "Copy address",
"show-address-qr": "Show address QR", "show-address-qr": "Show address QR",