Closed Woody4618 closed 10 months ago
So readin the code it looks like AnchorWallet does not support signMessage in walletAdapterReact 🤔
Ok I fixed it, looks like the docs where outdated. When I just pass in wallet instead of AnchorWallet it works since wallet implements signMessage:
const wallet = useWallet();
const drive = await new ShdwDrive(CONNECTION, wallet).init();
Thank you for letting us know. We will make the needed updates in the docs.
@GummersGG please reopen this issue as it may be a bug that requires some attention.
Reopen
Ok I fixed it, looks like the docs where outdated. When I just pass in wallet instead of AnchorWallet it works since wallet implements signMessage: const wallet = useWallet(); const drive = await new ShdwDrive(CONNECTION, wallet).init();
@Woody4618 Can you please share a link of the example you were working from that had wallet as AnchorWallet
for react? Our web example for react and the readme both don't do this.
Hey, i followed the instructions here: https://docs.genesysgo.com/shadow/shadow-drive/the-sdk It even sais in all caps it needs to be an anchor wallet :D "NOTE: the wallet object WILL need to be an AnchorWallet object in either instance."
Gotcha gotcha, those docs are quite outdated for sure. We're working on a total revamp.
Once we launch our new docs, I'll follow up here and close this issue.
@GummersGG just a quick note that we need to update the code examples for shdw drive as part of the docs revamp.
Hello, i am using wallet adapter with the example from the docs. Creating a new storage account works, I can sign it with phantom wallet but uploadFile throws this error:
Do i need to pass in a private key and create a local wallet? That would mean I can not use it in combination with just the wallet adapter?
This is the code: `(undefined)
const [uploadUrl, setUploadUrl] = useState(undefined)
const [txnSig, setTxnSig] = useState(undefined)
const wallet = useAnchorWallet();
const [file, setFile] = useState
const onSubmit = async (event: any) => {
`