-
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.
some refactor on utils and function and variable naming
- Loading branch information
1 parent
63fd2a1
commit 13460f4
Showing
4 changed files
with
46 additions
and
35 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
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
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