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"
:address "0x0ah...71a"}
:networks [{:network-name :ethereum :short-name "eth"}
{:network-name :optimism :short-name "opt"}]
{:network-name :optimism :short-name "oeth"}]
:action :none}])
(def default-details

View File

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

View File

@ -257,7 +257,7 @@
(def ^:private get-network-full-name
{:eth :ethereum
:opt :optimism
:oeth :optimism
:arb1 :arbitrum})
(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-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-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-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 ethereum-short-name "eth")
(def ^:const optimism-short-name "opt")
(def ^:const optimism-short-name "oeth")
(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 optimism-abbreviated-name "Opt.")
(def ^:const optimism-abbreviated-name "Oeth.")
(def ^:const arbitrum-abbreviated-name "Arb1.")
(def ^:const mainnet-network-name :mainnet)

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -50,5 +50,5 @@
(-> (h/wait-for #(h/get-by-label-text :share-qr-code-settings))
(.then (fn []
(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:"))))))))))

View File

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

View File

@ -42,7 +42,7 @@
:name name
:address address}
: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"}]
:state :default
:action :none}))))

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@
name ""
ens ""
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 ":")}}]]
(let [address-to-save {:address address
:name name

View File

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

View File

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

View File

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

View File

@ -2447,7 +2447,7 @@
"opensea": "OpenSea",
"mainnet": "Mainnet",
"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",
"copy-address": "Copy address",
"show-address-qr": "Show address QR",