Skip to content

Commit 8af17fc

Browse files
fdmirzazone117x
authored andcommitted
fix: lint issue
1 parent d4cfa51 commit 8af17fc

File tree

4 files changed

+10
-14
lines changed

4 files changed

+10
-14
lines changed

src/api/controllers/db-controller.ts

+6-7
Original file line numberDiff line numberDiff line change
@@ -107,20 +107,19 @@ export function getTxStatusString(txStatus: DbTxStatus | string): Transaction['t
107107
return 'abort_by_response';
108108
case DbTxStatus.AbortByPostCondition:
109109
return 'abort_by_post_condition';
110-
case DbTxStatus.AbortByPostCondition:
111-
return 'abort_by_post_condition';
110+
case DbTxStatus.AbortByPostCondition:
111+
return 'abort_by_post_condition';
112112
default:
113113
throw new Error(`Unexpected DbTxStatus: ${txStatus}`);
114114
}
115115
}
116116

117117
export function getTxStatus(txStatus: DbTxStatus | string): string {
118-
if(txStatus == ''){
119-
return ''
120-
}else{
121-
return getTxStatusString(txStatus)
118+
if (txStatus == '') {
119+
return '';
120+
} else {
121+
return getTxStatusString(txStatus);
122122
}
123-
124123
}
125124

126125
type HasEventTransaction = SmartContractTransaction | ContractCallTransaction;

src/api/routes/rosetta/construction.ts

+2-5
Original file line numberDiff line numberDiff line change
@@ -348,12 +348,9 @@ export function createRosettaConstructionRouter(db: DataStore): RouterWithAsync
348348
};
349349
}
350350
res.json(response);
351-
} catch(error) {
352-
console.error(error)
351+
} catch (error) {
352+
console.error(error);
353353
}
354-
355-
356-
357354
});
358355

359356
//construction/submit endpoint

src/datastore/common.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export enum DbTxStatus {
4040
Pending = 0,
4141
Success = 1,
4242
AbortByResponse = -1,
43-
AbortByPostCondition = -2
43+
AbortByPostCondition = -2,
4444
}
4545

4646
export interface BaseTx {

src/rosetta-helpers.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import { ec as EC } from 'elliptic';
3030
import { txidFromData } from '@blockstack/stacks-transactions/lib/utils';
3131
import * as btc from 'bitcoinjs-lib';
3232
import * as c32check from 'c32check';
33-
import { getTxTypeString,getTxStatus } from './api/controllers/db-controller';
33+
import { getTxTypeString, getTxStatus } from './api/controllers/db-controller';
3434
import { RosettaConstants, RosettaNetworks } from './api/rosetta-constants';
3535
import { BaseTx, DbTxStatus, DbTxTypeId } from './datastore/common';
3636
import { getTxSenderAddress, getTxSponsorAddress } from './event-stream/reader';

0 commit comments

Comments
 (0)