|
1 | | -import { LumClient, LumConstants, LumMessages, LumWallet } from '../src'; |
| 1 | +import { LumClient, LumConstants, LumMessages, LumUtils, LumWallet } from '../src'; |
2 | 2 |
|
3 | | -describe('LumClient', () => { |
| 3 | +describe('Faucet', () => { |
4 | 4 | let clt: LumClient; |
5 | 5 | let w1: LumWallet; |
6 | 6 |
|
7 | 7 | beforeAll(async () => { |
8 | 8 | clt = await LumClient.connect('http://node0.testnet.lum.network/rpc'); |
9 | | - w1 = await LumWallet.fromMnemonic('noodle hope lounge dismiss erase elephant seek crawl check equal city chest'); |
10 | | - console.log(w1.address); |
| 9 | + w1 = await LumWallet.fromMnemonic(LumUtils.generateMnemonic()); |
11 | 10 | }); |
12 | 11 |
|
13 | 12 | afterAll(async () => { |
14 | 13 | await expect(clt.disconnect()).resolves.toBeTruthy(); |
15 | 14 | }); |
16 | 15 |
|
17 | | - it('should build and dispatch a mint message', async () => { |
| 16 | + it('Should build and dispatch a mint message', async () => { |
18 | 17 | const mintMsg = LumMessages.BuildMsgMintAndSend(w1.address, new Date()); |
19 | | - |
20 | 18 | const fee = { |
21 | 19 | amount: [{ denom: LumConstants.LumDenom, amount: '0' }], |
22 | 20 | gas: '100000', |
23 | 21 | }; |
24 | | - |
25 | | - const broadcastResult = await clt.signAndBroadcastTx(w1, [mintMsg], fee, 'You mad bro? You aint got money bro?'); |
26 | | - console.log(broadcastResult); |
| 22 | + const broadcastResult = await clt.signAndBroadcastTx(w1, [mintMsg], fee, 'I need a dollar!', false); |
| 23 | + expect(LumUtils.broadcastTxCommitSuccess(broadcastResult)).toBeTruthy(); |
27 | 24 | }); |
28 | 25 | }); |
0 commit comments