Skip to content

Commit

Permalink
Merge pull request #127 from effectai/fix/await_createclient
Browse files Browse the repository at this point in the history
Set createClient as async
  • Loading branch information
djmbritt authored May 30, 2024
2 parents 0136f6d + ff4e979 commit b727c8f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export type CreateClientArgs = {
options?: ClientOpts;
} & ({ network: Network } | { session: Session });

export const createClient = ({
export const createClient = async ({
network,
session,
options = {},
Expand All @@ -115,7 +115,7 @@ export const createClient = ({
const client = new Client(chain, options);

// automatically set the session whenever the session is provided
client.setSession(session);
await client.setSession(session);

return client;
}
Expand Down

0 comments on commit b727c8f

Please sign in to comment.