Skip to content

Commit a6a4a28

Browse files
authored
Merge pull request #2097 from drift-labs/jack/fix-yellowstream-grpc-client
chore: fix grpc client
2 parents ac67eb3 + 9b51089 commit a6a4a28

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

sdk/src/accounts/grpcProgramAccountSubscriber.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,16 @@ export class grpcProgramAccountSubscriber<
9494
// Subscribe with grpc
9595
this.stream =
9696
(await this.client.subscribe()) as unknown as typeof this.stream;
97+
9798
const filters = this.options.filters.map((filter) => {
9899
return {
99100
memcmp: {
100101
offset: filter.memcmp.offset.toString(),
101-
bytes: bs58.decode(filter.memcmp.bytes),
102+
base58: filter.memcmp.bytes,
102103
},
103104
};
104105
});
106+
105107
const request: SubscribeRequest = {
106108
slots: {},
107109
accounts: {

sdk/src/isomorphic/grpc.node.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,5 +121,7 @@ export async function createClient(
121121
...args: ConstructorParameters<typeof Client>
122122
): Promise<Client> {
123123
const { default: Client_ } = await import('@triton-one/yellowstone-grpc');
124-
return new Client_(...args);
124+
const client = new Client_(...args);
125+
await client.connect();
126+
return client;
125127
}

0 commit comments

Comments
 (0)