diff --git a/libs/withdraws/src/lib/use-create-withdraw.spec.tsx b/libs/withdraws/src/lib/use-create-withdraw.spec.tsx index cd578af2a..ef9a266bc 100644 --- a/libs/withdraws/src/lib/use-create-withdraw.spec.tsx +++ b/libs/withdraws/src/lib/use-create-withdraw.spec.tsx @@ -18,7 +18,7 @@ import type { WithdrawalEventSubscription, WithdrawalFieldsFragment, } from './__generated__/Withdrawal'; -import { WithdrawalsDocument } from './__generated__/Withdrawal'; +import { WithdrawalEventDocument } from './__generated__/Withdrawal'; import { Schema } from '@vegaprotocol/types'; function setup( @@ -116,7 +116,7 @@ beforeEach(() => { }; mockWithdrawalEvent = { request: { - query: WithdrawalsDocument, + query: WithdrawalEventDocument, variables: { partyId: pubKey }, }, result: { diff --git a/libs/withdraws/src/lib/use-withdrawal-event.ts b/libs/withdraws/src/lib/use-withdrawal-event.ts index 8bc9ba2e9..f7985c88c 100644 --- a/libs/withdraws/src/lib/use-withdrawal-event.ts +++ b/libs/withdraws/src/lib/use-withdrawal-event.ts @@ -2,7 +2,7 @@ import { useApolloClient } from '@apollo/client'; import type { VegaTxState } from '@vegaprotocol/wallet'; import { useCallback, useEffect, useRef } from 'react'; import type { Subscription } from 'zen-observable-ts'; -import { WithdrawalsDocument } from './__generated__/Withdrawal'; +import { WithdrawalEventDocument } from './__generated__/Withdrawal'; import type { WithdrawalEventSubscription, WithdrawalEventSubscriptionVariables, @@ -20,13 +20,13 @@ export const useWithdrawalEvent = (transaction: VegaTxState) => { const waitForWithdrawalEvent = useCallback( (id, partyId) => { - return new Promise((resolve) => { + return new Promise((resolve) => { subRef.current = client .subscribe< WithdrawalEventSubscription, WithdrawalEventSubscriptionVariables >({ - query: WithdrawalsDocument, + query: WithdrawalEventDocument, variables: { partyId }, }) .subscribe(({ data }) => {