-
Notifications
You must be signed in to change notification settings - Fork 985
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add ability to tap to disable from networks
- Loading branch information
1 parent
5412092
commit ee5669c
Showing
22 changed files
with
887 additions
and
419 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(ns quo.components.wallet.network-link.helpers) | ||
|
||
(def ^:private central-figure-width 63) | ||
|
||
(defn calculate-side-lines-path-1x | ||
"Calculates the `d` attribute for the side lines based on the SVG width." | ||
[width] | ||
(let [side-offset (/ (- width central-figure-width) 2)] | ||
{:left (str "M0 57 L" side-offset " 57") | ||
:right (str "M" (+ side-offset central-figure-width) " 1 L" width " 1")})) | ||
|
||
(defn calculate-transform | ||
"Calculates the transform attribute for the central figure based on the SVG width." | ||
[width] | ||
(let [translate-x (/ (- width central-figure-width) 2)] | ||
(str "translate(" translate-x " 0)"))) | ||
|
||
(defn calculate-side-lines-path-2x | ||
"Calculates the `d` attribute for the side lines based on the SVG width." | ||
[width] | ||
(let [side-offset (/ (- width central-figure-width) 2)] | ||
{:left (str "M0 113 L" side-offset " 113") | ||
:right (str "M" (+ side-offset central-figure-width) " 1 L" width " 1")})) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
(ns quo.components.wallet.network-link.style) | ||
|
||
(def left-circle-container | ||
{:position :absolute | ||
:left -3}) | ||
|
||
(def right-circle-container | ||
{:position :absolute | ||
:right -3}) | ||
|
||
(def bottom-left-circle-container | ||
{:position :absolute | ||
:bottom -3 | ||
:left -3}) | ||
|
||
(def top-right-circle-container | ||
{:position :absolute | ||
:top -3 | ||
:right -3}) | ||
|
||
(def link-linear-container | ||
{:flex-direction :row | ||
:align-items :center | ||
:height 10}) | ||
|
||
(def link-1x-container | ||
{:flex 1 | ||
:height 58 | ||
:justify-content :center}) | ||
|
||
(def link-2x-container | ||
{:flex 1 | ||
:height 114 | ||
:justify-content :center}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
(ns status-im.contexts.wallet.common.utils.networks | ||
(:require [clojure.string :as string] | ||
[status-im.constants :as constants] | ||
[status-im.contexts.wallet.common.utils :as utils])) | ||
|
||
(defn resolve-receiver-networks | ||
[{:keys [prefix testnet-enabled? goerli-enabled?]}] | ||
(let [prefix (if (string/blank? prefix) | ||
constants/default-multichain-address-prefix | ||
prefix) | ||
prefix-seq (string/split prefix #":")] | ||
(->> prefix-seq | ||
(remove string/blank?) | ||
(mapv | ||
#(utils/network->chain-id | ||
{:network % | ||
:testnet-enabled? testnet-enabled? | ||
:goerli-enabled? goerli-enabled?}))))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.