Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.8.3",
"@babel/preset-typescript": "^7.8.3",
"@ledgerhq/hw-transport-node-hid": "^5.46.0",
"@types/crypto-js": "^4.0.1",
"@types/jest": "^26.0.20",
"@types/ledgerhq__hw-transport": "^4.21.3",
Expand Down
2 changes: 1 addition & 1 deletion src/client/LumClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
DistributionExtension,
} from '@cosmjs/stargate';

import { LumWallet, LumUtils, LumTypes, LumMessages } from '..';
import { LumWallet, LumUtils, LumTypes } from '..';

export class LumClient {
readonly tmClient: Tendermint34Client;
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/LumLedgerWallet.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Transport from '@ledgerhq/hw-transport';
import Cosmos from '@ledgerhq/hw-app-cosmos';

import { LumUtils, LumTypes, LumRegistry } from '..';
import { LumUtils, LumTypes } from '..';
import { LumWallet } from '.';

export class LumLedgerWallet extends LumWallet {
Expand Down
27 changes: 19 additions & 8 deletions tests/faucet.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { LumClient, LumConstants, LumMessages, LumUtils, LumWallet, LumWalletFactory } from '../src';
import { LumClient, LumUtils, LumWallet, LumWalletFactory } from '../src';

describe('Faucet', () => {
let clt: LumClient;
Expand All @@ -14,12 +14,23 @@ describe('Faucet', () => {
});

it('Should build and dispatch a mint message', async () => {
const mintMsg = LumMessages.BuildMsgMintAndSend(w1.getAddress(), new Date());
const fee = {
amount: [{ denom: LumConstants.LumDenom, amount: '0' }],
gas: '100000',
};
const broadcastResult = await clt.signAndBroadcastTx(w1, [mintMsg], fee, 'I need a dollar!');
expect(LumUtils.broadcastTxCommitSuccess(broadcastResult)).toBeTruthy();
// WIP
// const mintMsg = LumMessages.BuildMsgMintAndSend(w1.getAddress(), new Date());
// const fee = {
// amount: [{ denom: LumConstants.LumDenom, amount: '0' }],
// gas: '100000',
// };
// const chainId = await clt.getChainId();
// const acc = await clt.getAccount(w1.getAddress());
// const doc = {
// accountNumber: acc.accountNumber,
// chainId,
// fee: fee,
// memo: 'I need a dollar!',
// messages: [mintMsg],
// sequence: acc.sequence,
// };
// const broadcastResult = await clt.signAndBroadcastTx(w1, doc);
// expect(LumUtils.broadcastTxCommitSuccess(broadcastResult)).toBeTruthy();
});
});
2 changes: 0 additions & 2 deletions tests/ledger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ describe('Ledger', () => {

it('Should be able to connect to ledger hardware wallet', async () => {
// WIP - manual testing using ledger device

// const transport = await TransportNodeHid.create();
// const w1 = await LumWalletFactory.fromLedgerTransport(transport, `m/44'/118'/0'/0/0`, 'lum');
// const acc = await clt.getAccount(w1.getAddress());
// expect(acc).toBeTruthy();
// const balance = await clt.getBalance(acc.address, 'lum');
// expect(parseInt(balance.amount)).toBeGreaterThan(0);

// TODO: requires to fixe the ledger signing implementation
// const chainId = await clt.getChainId();
// const sendMsg = LumMessages.BuildMsgSend(w1.getAddress(), 'lum1ty3meqzqxq7vkdyp7l7znzvn0t50w92uf6h4px', [{ denom: 'lum', amount: '3' }]);
Expand Down
Loading