From 9b2ac1622eaf517d701f9ed791ded3fbf34c7132 Mon Sep 17 00:00:00 2001 From: Jesse Eisses Date: Tue, 21 Nov 2023 20:10:06 +0100 Subject: [PATCH] Fix parsing of solana network from env --- src/nosana_node/cli.clj | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/nosana_node/cli.clj b/src/nosana_node/cli.clj index 4010a92..4f2a1e2 100644 --- a/src/nosana_node/cli.clj +++ b/src/nosana_node/cli.clj @@ -6,6 +6,10 @@ [clojure.tools.cli :as cli])) (defn get-env-fn + ([e default parse-fn] (fn [_] (let [env (System/getenv e)] + (if env + (parse-fn env) + default)))) ([e default] (fn [_] (or (System/getenv e) default))) ([e] (fn [_] (System/getenv e)))) @@ -27,7 +31,7 @@ :default-fn (get-env-fn "NOSANA_NFT") :id :nft] ["-n" "--network NETWORK" "Solana network to run on (mainnet or devnet)" - :default-fn (get-env-fn "SOLANA_NETWORK" :devnet) + :default-fn (get-env-fn "SOLANA_NETWORK" :mainnet) :parse-fn #(keyword %) :id :solana-network] ["-w" "--wallet PATH" "Path to wallet private key"