Skip to content

Commit

Permalink
Improve finding of market nfts
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisses committed Dec 15, 2023
1 parent aa60767 commit ab3e261
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nosana_node/solana.clj
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
(when (not (empty? data))
(let [r-data (reverse data)]
(loop [[head & rst] r-data]
(if (zero? head)
(if (or (= 1 head) (zero? head))
(recur rst)
(->> head (conj rst) (take 32) reverse byte-array public-key))))))

Expand Down Expand Up @@ -253,7 +253,7 @@
(filter #(= (second %) (.toString collection)))
first)]
(when idx
(-> tokens (nth idx) :account :data :parsed :info :mint PublicKey.))))
(-> tokens (nth idx) :account :data :parsed :info :mint PublicKey.))))

(defn get-nos-market-pda
"Find the PDA of a markets vault."
Expand Down

0 comments on commit ab3e261

Please sign in to comment.