Unnecessary duplication removed
This commit is contained in:
parent
f62afdac16
commit
c7bd607c5a
|
@ -320,18 +320,6 @@
|
||||||
(let [counter (count address)]
|
(let [counter (count address)]
|
||||||
(str (subs address 0 6) "\u2026" (subs address (- counter 3) counter)))))
|
(str (subs address 0 6) "\u2026" (subs address (- counter 3) counter)))))
|
||||||
|
|
||||||
(defn make-limit-label-crypto
|
|
||||||
[amount currency]
|
|
||||||
(str amount
|
|
||||||
" "
|
|
||||||
(some-> currency
|
|
||||||
name
|
|
||||||
string/upper-case)))
|
|
||||||
|
|
||||||
(defn make-limit-label-fiat
|
|
||||||
[amount currency-symbol]
|
|
||||||
(str currency-symbol amount))
|
|
||||||
|
|
||||||
(defn get-account-name-error
|
(defn get-account-name-error
|
||||||
[s existing-account-names]
|
[s existing-account-names]
|
||||||
(cond
|
(cond
|
||||||
|
|
|
@ -191,19 +191,12 @@
|
||||||
current-crypto-limit
|
current-crypto-limit
|
||||||
current-fiat-limit)
|
current-fiat-limit)
|
||||||
input-value (controlled-input/input-value input-state)
|
input-value (controlled-input/input-value input-state)
|
||||||
valid-input? (not (or (string/blank? input-value)
|
|
||||||
(<= (controlled-input/numeric-value
|
valid-input? (not (or (controlled-input/empty-value? input-state)
|
||||||
input-state)
|
(controlled-input/input-error input-state)))
|
||||||
0)
|
|
||||||
(> (controlled-input/numeric-value
|
|
||||||
input-state)
|
|
||||||
current-limit)))
|
|
||||||
input-num-value (controlled-input/numeric-value input-state)
|
|
||||||
confirm-disabled? (or (nil? route)
|
confirm-disabled? (or (nil? route)
|
||||||
(empty? route)
|
(empty? route)
|
||||||
(string/blank? input-value)
|
(not valid-input?))
|
||||||
(<= input-num-value 0)
|
|
||||||
(> input-num-value current-limit))
|
|
||||||
amount-in-crypto (if crypto-currency?
|
amount-in-crypto (if crypto-currency?
|
||||||
input-value
|
input-value
|
||||||
(number/remove-trailing-zeroes
|
(number/remove-trailing-zeroes
|
||||||
|
@ -344,9 +337,8 @@
|
||||||
:title (i18n/label
|
:title (i18n/label
|
||||||
:t/send-limit
|
:t/send-limit
|
||||||
{:limit (if crypto-currency?
|
{:limit (if crypto-currency?
|
||||||
(utils/make-limit-label-crypto current-limit token-symbol)
|
(utils/prettify-crypto-balance token-symbol (money/bignumber current-limit) conversion-rate)
|
||||||
(utils/make-limit-label-fiat current-limit
|
(utils/prettify-balance currency-symbol (money/bignumber current-limit)))})
|
||||||
currency-symbol))})
|
|
||||||
:status (when (controlled-input/input-error input-state) :error)}]}]
|
:status (when (controlled-input/input-error input-state) :error)}]}]
|
||||||
[routes/view
|
[routes/view
|
||||||
{:token token-by-symbol
|
{:token token-by-symbol
|
||||||
|
|
Loading…
Reference in New Issue