Skip to content

Commit

Permalink
Set the network for registration to devnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisses committed Nov 30, 2023
1 parent 805bd60 commit cfb0018
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions src/nosana_node/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@
;; parse the inner options passed to this action
:else
(let [{a-summary :summary a-errors :errors a-args :arguments a-options :options}
(cli/parse-opts (rest arguments) (get-in cli-options [action :options]))]
(cli/parse-opts (rest arguments)
(get-in cli-options [action :options]))]
(cond
(:help a-options)
{:exit-message (usage action a-summary) :ok? true}
Expand All @@ -211,10 +212,11 @@

:else
(do


;; merge CLI over existing config
(cond->
(-> sys
(assoc :nos/action action)
(update :nos/vault merge state)))))))
(update :nos/vault merge state))
;; hard override the network to devnet for test grid registration
(= action "join-test-grid")
(assoc-in [:nos/vault :solana-network] :devnet))))))
4 changes: 2 additions & 2 deletions src/nosana_node/nosana.clj
Original file line number Diff line number Diff line change
Expand Up @@ -818,8 +818,8 @@
;; if there is still not enough balance request use to deposit funds
(let [new-balance (-> (sol/get-balance (.getPublicKey account) network))]
(if (< new-balance min-sol-balance)
(throw (ex-info (str "Insufficient SOL to operate,"
"deposit 0.1 SOL on the node address:\n" address)
(throw (ex-info (str "Insufficient SOL to operate, "
"please deposit 0.1 SOL on the node address:\n" address)
{}))
sys))))

Expand Down

0 comments on commit cfb0018

Please sign in to comment.