Skip to content

Commit

Permalink
Add check for valid key pair on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisses committed Sep 17, 2023
1 parent 67c88e3 commit d196bd5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/nosana_node/nosana.clj
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Running Nosana Node %s
(let [network (:solana-network vault)
signer (try (get-signer-key vault)
(catch Exception e
nil))
(throw (ex-info "Node key pair could not be loaded" {}))))
signer-pub (if signer
(.getPublicKey signer)
(:system sol/addresses))
Expand Down Expand Up @@ -235,6 +235,9 @@ Running Nosana Node %s
(:nodeAccessKey market)
network))

_ (when (nil? nft)
(throw (ex-info "Could not find Access Key and no NFT was provided" {})))

;; when the market does not have an NFT, we pass the nos-ata
;; as the nft-ata. this is because the program requires the
;; account to be a valid TokenAccount (without further
Expand Down

0 comments on commit d196bd5

Please sign in to comment.