2023-10-16 14:49:23 +00:00
|
|
|
import { useDataProvider } from '@vegaprotocol/data-provider';
|
|
|
|
import { activeOrdersProvider } from '@vegaprotocol/orders';
|
2024-03-01 14:25:56 +00:00
|
|
|
import { useVegaWallet } from '@vegaprotocol/wallet-react';
|
2023-10-16 14:49:23 +00:00
|
|
|
|
|
|
|
export const PartyActiveOrdersHandler = () => {
|
|
|
|
const { pubKey } = useVegaWallet();
|
|
|
|
const variables = { partyId: pubKey || '' };
|
|
|
|
const skip = !pubKey;
|
|
|
|
useDataProvider({
|
|
|
|
dataProvider: activeOrdersProvider,
|
|
|
|
variables,
|
|
|
|
skip,
|
|
|
|
});
|
|
|
|
return null;
|
|
|
|
};
|