ajoliat23 / blockBook

0 stars 0 forks source link

Incorporating wallet adapter from https://github.com/solana-labs/wallet-adapter #13

Closed ajoliat23 closed 1 year ago

ajoliat23 commented 1 year ago

I'm wondering if we should just clone the entire wallet-adapter repo into a branch and then pull main into the same branch because of the sheer number of dependencies. I added the files Zach committed and installed the packages, but I'm getting weird errors like:

namespaceFCError solanaWalletError

Despite the updating the package.json.

When I googled the first error it was recommended that I "use an export assignment to specify a default export for the namespace" and they gave this example:

car.d.ts (file name)

declare module 'car' { class Car { color: string; age: number; maxSpeed: number; } export = Car; }

but I can't tell what the assignment is for FC to make an export assignment...

Someone posted his solution for the same problem on that github page and recommended cloning the repo, I'll paste his code below.

walletSolution

jgurary commented 1 year ago

This might expect the Solana wallet adapter to be cloned and present locally, but more likely it's just a typo in the name somewhere or just needs an npm i to fix. You might also consider the react specific package if you're going with react anyways: https://www.npmjs.com/package/@solana/wallet-adapter-react. Could also follow the tutorial here: https://github.com/solana-labs/wallet-adapter#quick-links