Graz Provider
Since graz relies on react-query, you will need to wrap the GrazProvider
and AbstractProvider
with the react-query context provider.
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { GrazProvider } from 'graz'
import { mainnetChains } from 'graz/chains'
import { createConfig, AbstractProvider } from '@abstract-money/react'
import { grazProvider } from '@abstract-money/provider-graz'
const config = createConfig({
apiUrl: 'https://testnet.api.abstract.money/graphql',
provider: grazProvider
})
const client = new QueryClient()
export function App() {
return (
<QueryClientProvider client={client}>
<GrazProvider
client={client}
grazOptions={{
chains: [mainnetChains.osmosis],
chainsConfig: {
[mainnetChains.osmosis.chainId]: {
gas: {
price: '0.25',
denom: 'uosmo',
},
},
},
}}
>
<AbstractProvider config={config}>
{/*...*/}
</AbstractProvider>
</GrazProvider>
</QueryClientProvider>
)
}