From 2296a15c745f195b97f45a45e8be4aee507ab931 Mon Sep 17 00:00:00 2001 From: Joe C Date: Wed, 4 Oct 2023 09:24:57 +0200 Subject: [PATCH] refactor(experimental): change u64 types to slot in slot notifications (#1643) * refactor(experimental): change u64 types to slot in slot notifications * refactor(experimental): fix typo in type tests (#1644) --- .../__typetests__/slot-notifications-type-test.ts | 10 +++++----- .../src/rpc-subscriptions/slot-notifications.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/rpc-core/src/rpc-subscriptions/__typetests__/slot-notifications-type-test.ts b/packages/rpc-core/src/rpc-subscriptions/__typetests__/slot-notifications-type-test.ts index adf21363f28b..6b8732e1172f 100644 --- a/packages/rpc-core/src/rpc-subscriptions/__typetests__/slot-notifications-type-test.ts +++ b/packages/rpc-core/src/rpc-subscriptions/__typetests__/slot-notifications-type-test.ts @@ -2,7 +2,7 @@ import { RpcSubscriptions } from '@solana/rpc-transport/dist/types/json-rpc-types'; -import { U64UnsafeBeyond2Pow53Minus1 } from '../../rpc-methods/common'; +import { Slot } from '../../rpc-methods/common'; import { SolanaRpcSubscriptions } from '../index'; async () => { @@ -13,12 +13,12 @@ async () => { slotNotifications satisfies AsyncIterable< Readonly<{ - parent: U64UnsafeBeyond2Pow53Minus1; - root: U64UnsafeBeyond2Pow53Minus1; - slot: U64UnsafeBeyond2Pow53Minus1; + parent: Slot; + root: Slot; + slot: Slot; }> >; // @ts-expect-error Takes no params. - rpcSubcriptions.slotNotifications({ commitment: 'finalized' }); + rpcSubscriptions.slotNotifications({ commitment: 'finalized' }); }; diff --git a/packages/rpc-core/src/rpc-subscriptions/slot-notifications.ts b/packages/rpc-core/src/rpc-subscriptions/slot-notifications.ts index 9bf99c0dea0f..ba8d8d7e9d90 100644 --- a/packages/rpc-core/src/rpc-subscriptions/slot-notifications.ts +++ b/packages/rpc-core/src/rpc-subscriptions/slot-notifications.ts @@ -1,9 +1,9 @@ -import { U64UnsafeBeyond2Pow53Minus1 } from '../rpc-methods/common'; +import { Slot } from '../rpc-methods/common'; type SlotNotificationsApiNotification = Readonly<{ - parent: U64UnsafeBeyond2Pow53Minus1; - root: U64UnsafeBeyond2Pow53Minus1; - slot: U64UnsafeBeyond2Pow53Minus1; + parent: Slot; + root: Slot; + slot: Slot; }>; export interface SlotNotificationsApi {