Skip to content

Commit

Permalink
fix: setClient
Browse files Browse the repository at this point in the history
  • Loading branch information
Argeare5 committed Oct 27, 2023
1 parent e537dff commit 139a633
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/web3/store/transactionsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -231,9 +231,11 @@ export function createTransactionsSlice<T extends BaseTx>({
},

setClient: (chainId, client) => {
const stateClients = get().clients;
const updatedClients = (stateClients[chainId] = client);
set({ clients: updatedClients });
set((state) =>
produce(state, (draft) => {
draft.clients[chainId] = client as Draft<PublicClient>;
}),
);
},

isGelatoAvailable: true,
Expand Down

0 comments on commit 139a633

Please sign in to comment.