Fork me on GitHub
#clj-kondo
<
2023-03-23
>
teawaterwire10:03:28

is there a way to remove these warnings, without removing the unresolved symbole rule?

borkdude10:03:40

I need more context. Is this a .cljc file?

borkdude10:03:42

And/or: can you provide this code, with minimal but complete context in a .cljs or .cljc file? Then I would be able to say moe

teawaterwire10:03:05

cljs file

(ns app.magic
  (:require 
   [re-frame.core :as rf]
   [promesa.core :as p]
   [clojure.string :as str]
   [app.utils :refer [j->c]]
   [app.config :refer [env]]
   [app.matrix :as matrix]
   ["ethers" :refer [ethers]]
   ["magic-sdk" :refer [Magic]]
   ["@magic-ext/webauthn" :refer [WebAuthnExtension]]))

(defonce magic (new Magic (:magic-key env)
                (clj->js {:extensions [(new WebAuthnExtension)]})))

(defonce magic-provider (new (.. ethers -providers -Web3Provider) (.-rpcProvider magic)))

borkdude10:03:18

ok, I see the issue. this is a workaround:

(defonce magic-provider (let [provider (.. ethers -providers -Web3Provider)]
                          (new provider (.-rpcProvider magic))))

borkdude10:03:28

Feel free to post an issue about this

teawaterwire10:03:43

great thanks will create an issue 👍