Skip to content

Commit

Permalink
fix: fix test example
Browse files Browse the repository at this point in the history
Defaults test example to use tcp.
Adds required params in example setup.
  • Loading branch information
coreyphillips committed Oct 3, 2024
1 parent 37507db commit 6063b2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion example/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const servers = {
host: '35.187.18.233',
ssl: 8900,
tcp: 8911,
protocol: EProtocol.ssl
protocol: EProtocol.tcp
}
],
[EAvailableNetworks.testnet]: [
Expand Down
8 changes: 7 additions & 1 deletion example/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { EAvailableNetworks, generateMnemonic, Wallet } from '../src';
import { getData, onMessage, servers, setData } from './helpers';
import * as repl from 'repl';
import net from 'net';
import tls from 'tls';

const network: EAvailableNetworks = EAvailableNetworks.mainnet;

Expand All @@ -15,11 +17,15 @@ const runExample = async (mnemonic = generateMnemonic()): Promise<void> => {
setData
},
electrumOptions: {
net,
tls,
servers: servers[network]
},
gapLimitOptions: {
lookAhead: 5,
lookBehind: 5
lookBehind: 5,
lookAheadChange: 5,
lookBehindChange: 5
}
});
if (createWalletResponse.isErr()) return;
Expand Down

0 comments on commit 6063b2d

Please sign in to comment.