@@ -18,14 +18,7 @@ import { sleep } from "@cosmjs/utils";
1818import Transport from "@ledgerhq/hw-transport" ;
1919
2020import { LedgerSigner } from "./ledgersigner" ;
21- import {
22- faucet ,
23- ledgerEnabled ,
24- pendingWithoutLedger ,
25- pendingWithoutSimapp ,
26- simapp ,
27- simappEnabled ,
28- } from "./testutils.spec" ;
21+ import { faucet , ledgerEnabled , simapp , simappEnabled } from "./testutils.spec" ;
2922
3023const interactiveTimeout = 120_000 ;
3124
@@ -45,7 +38,7 @@ async function createTransport(): Promise<Transport> {
4538 return TransportClass . create ( interactiveTimeout , interactiveTimeout ) ;
4639}
4740
48- describe ( "LedgerSigner" , ( ) => {
41+ ( ledgerEnabled ( ) ? describe : xdescribe ) ( "LedgerSigner" , ( ) => {
4942 const defaultChainId = "testing" ;
5043 const defaultFee = calculateFee ( 100_000 , "0.025ucosm" ) ;
5144 const defaultMemo = "Some memo" ;
@@ -72,20 +65,15 @@ describe("LedgerSigner", () => {
7265 } ) ;
7366
7467 beforeEach ( async ( ) => {
75- if ( ledgerEnabled ( ) ) {
76- transport = await createTransport ( ) ;
77- }
68+ transport = await createTransport ( ) ;
7869 } ) ;
7970
8071 afterEach ( async ( ) => {
81- if ( ledgerEnabled ( ) ) {
82- await transport . close ( ) ;
83- }
72+ await transport . close ( ) ;
8473 } ) ;
8574
8675 describe ( "getAccount" , ( ) => {
8776 it ( "works" , async ( ) => {
88- pendingWithoutLedger ( ) ;
8977 const signer = new LedgerSigner ( transport , {
9078 testModeAllowed : true ,
9179 hdPaths : [ makeCosmoshubPath ( 0 ) , makeCosmoshubPath ( 1 ) , makeCosmoshubPath ( 10 ) ] ,
@@ -122,7 +110,6 @@ describe("LedgerSigner", () => {
122110 it (
123111 "returns valid signature" ,
124112 async ( ) => {
125- pendingWithoutLedger ( ) ;
126113 const signer = new LedgerSigner ( transport , {
127114 testModeAllowed : true ,
128115 hdPaths : [ makeCosmoshubPath ( 0 ) , makeCosmoshubPath ( 1 ) , makeCosmoshubPath ( 10 ) ] ,
@@ -160,11 +147,9 @@ describe("LedgerSigner", () => {
160147 interactiveTimeout ,
161148 ) ;
162149
163- it (
150+ ( simappEnabled ( ) ? it : xit ) (
164151 "creates signature accepted by Stargate backend" ,
165152 async ( ) => {
166- pendingWithoutLedger ( ) ;
167- pendingWithoutSimapp ( ) ;
168153 const signer = new LedgerSigner ( transport , {
169154 testModeAllowed : true ,
170155 hdPaths : [ makeCosmoshubPath ( 0 ) , makeCosmoshubPath ( 1 ) , makeCosmoshubPath ( 10 ) ] ,
0 commit comments