Skip to content

Commit 80ac5cc

Browse files
fix: update client options to avoid using chrysalis nodes (#109)
* fix: update client options to avoid using chrysalis nodes * fix: format --------- Co-authored-by: Begoña Álvarez de la Cruz <[email protected]>
1 parent 9fbf172 commit 80ac5cc

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

packages/shared/lib/network.ts

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,10 @@ export const updateClientOptions = (config: NetworkConfig): void => {
296296
})
297297
}
298298

299-
export const buildClientOptions = (config: NetworkConfig): ClientOptions => {
300-
const nodeCandidates = getNodeCandidates(config).map((n) => ({ ...n, network: config.network }))
301-
return {
302-
...config,
303-
node: nodeCandidates.find((n) => n.isPrimary),
304-
nodes: nodeCandidates,
305-
network: config.network.id,
306-
}
307-
}
299+
export const buildClientOptions = (config: NetworkConfig): ClientOptions => ({
300+
...config,
301+
network: config.network.id.includes('mainnet') ? 'mainnet' : 'testnet',
302+
})
308303

309304
export const getDefaultClientOptions = (): ClientOptions => {
310305
const { id, type } =

0 commit comments

Comments
 (0)