Skip to content

Commit

Permalink
sync
Browse files Browse the repository at this point in the history
  • Loading branch information
turbocrime committed Jul 8, 2024
1 parent 50a9a65 commit 4a820a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/react/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ A wrapping component:
```tsx
import { Outlet } from 'react-router-dom';
import { PenumbraProvider } from '@penumbra-zone/react';
import { usePenumbraTransport } from '@penumbra-zone/react/hooks/use-penumbra-transport';
import { usePenumbraTransportSync } from '@penumbra-zone/react/hooks/use-penumbra-transport';
import { TransportProvider } from '@connectrpc/connect-query';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';

Expand All @@ -52,7 +52,7 @@ const queryClient = new QueryClient();

export const PenumbraDappPage = () => (
<PenumbraProvider origin={praxOrigin} makeApprovalRequest>
<TransportProvider transport={usePenumbraTransport()}>
<TransportProvider transport={usePenumbraTransportSync()}>
<QueryClientProvider client={queryClient}>
<Outlet />
</QueryClientProvider>
Expand Down Expand Up @@ -88,13 +88,13 @@ may need more complex query and state management.
```tsx
import { AssetId } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/core/asset/v1/asset_pb.js';
import { BalancesResponse } from '@buf/penumbra-zone_penumbra.bufbuild_es/penumbra/view/v1/view_pb.js';
import { usePenumbraService } from '@penumbra-zone/react/hooks/use-penumbra-service';
import { usePenumbraServiceSync } from '@penumbra-zone/react/hooks/use-penumbra-service';
import { ViewService } from '@penumbra-zone/protobuf';
import { useQuery } from '@tanstack/react-query';
import { AccountBalancesTable } from './imaginary-components';

export default function AssetBalancesByAccount({ assetIdFilter }: { assetIdFilter: AssetId }) {
const viewClient = usePenumbraService(ViewService);
const viewClient = usePenumbraServiceSync(ViewService);

const { isPending, data: groupedBalances } = useQuery({
queryKey: ['balances', assetIdFilter.inner],
Expand Down

0 comments on commit 4a820a2

Please sign in to comment.