I'm getting this error when trying to execute a contract using temple wallet in my Dapp.
Failed to send request to https://hangzhounet.smartpy.io/chains/main/blocks/head/helpers/forge/operations. Invalid request provided or RPC node is temporarily unreachable.
Tried changing the RPC nodes in the Temple wallet itself to https://hangzhounet.api.tez.ie/, no difference except the text change in the link in the error. Tried setting a new Tezos tool kit in the Dapp to a different RPC node, no difference either.
Using React and redux.
NPM versions:
"@taquito/beacon-wallet": "^11.0.2-beta",
"@taquito/signer": "^11.0.2-beta",
"@taquito/taquito": "^11.0.2-beta",
"@taquito/utils": "^11.0.2-beta",
"@temple-wallet/dapp": "^6.0.1",
This is the code for checking if the wallet is available:
useEffect(() => {
return TempleWallet.onAvailabilityChange((available) => {
if (available) dispatch(setWallet(new TempleWallet(process.env.REACT_APP_NAME || 'MAVRYK')))
})
}, [dispatch])
This is where I connect to the wallet
try {
if (!state.wallet) {
dispatch(showToaster(ERROR, 'Temple Wallet not available', ''))
throw new Error('Temple Wallet not available')
} else {
await state.wallet.wallet?.connect((process.env.REACT_APP_NETWORK || 'hangzhounet') as TempleDAppNetwork, {
forcePermission,
})
const tzs = state.wallet.wallet?.toTezos()
const accountPkh = await tzs?.wallet.pkh()
dispatch({
type: CONNECT,
tezos: tzs,
ready: Boolean(tzs),
accountPkh: accountPkh,
})
}
} catch (err: any) {
dispatch(showToaster(ERROR, 'Failed to connect TempleWallet', err.message))
console.error(`Failed to connect TempleWallet: ${err.message}`)
}
And this is where I call the contract:
const contract = await state.wallet.tezos?.wallet.at(delegationAddress.address)
console.log('contract', contract)
const transaction = await contract?.methods
.registerAsSatellite(form.name, form.description, form.image, form.fee)
.send()
console.log('transaction', transaction)
Has Anyone encountered this problem / know how to address it? Thanks in advance!