Skip to content

Commit

Permalink
refactor(experimental): change u64 types to slot in slot notifications (
Browse files Browse the repository at this point in the history
#1643)

* refactor(experimental): change u64 types to slot in slot notifications

* refactor(experimental): fix typo in type tests (#1644)
  • Loading branch information
buffalojoec authored Oct 4, 2023
1 parent cd89114 commit 2296a15
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand All @@ -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' });
};
8 changes: 4 additions & 4 deletions packages/rpc-core/src/rpc-subscriptions/slot-notifications.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 2296a15

Please sign in to comment.