@@ -37,12 +37,12 @@ export class Collector {
37
37
isDataMustBeEmpty ?: boolean ;
38
38
outputCapacityRange ?: Hex [ ] ;
39
39
} ) : Promise < IndexerCell [ ] | undefined > {
40
- let param : any = {
40
+ let param : unknown = {
41
41
script_search_mode : 'exact' ,
42
42
} ;
43
43
if ( lock ) {
44
44
param = {
45
- ...param ,
45
+ ...param ! ,
46
46
script : parseScript ( lock ) ,
47
47
script_type : 'lock' ,
48
48
filter : {
@@ -53,19 +53,19 @@ export class Collector {
53
53
} ;
54
54
} else if ( type ) {
55
55
param = {
56
- ...param ,
56
+ ...param ! ,
57
57
script : parseScript ( type ) ,
58
58
script_type : 'type' ,
59
59
} ;
60
60
}
61
- let payload = {
61
+ const payload = {
62
62
id : Math . floor ( Math . random ( ) * 100000 ) ,
63
63
jsonrpc : '2.0' ,
64
64
method : 'get_cells' ,
65
65
params : [ param , 'asc' , '0x3E8' ] ,
66
66
} ;
67
67
const body = JSON . stringify ( payload , null , ' ' ) ;
68
- let response = (
68
+ const response = (
69
69
await axios ( {
70
70
method : 'post' ,
71
71
url : this . ckbIndexerUrl ,
@@ -86,9 +86,9 @@ export class Collector {
86
86
87
87
collectInputs ( liveCells : IndexerCell [ ] , needCapacity : bigint , fee : bigint , config ?: CollectConfig ) : CollectResult {
88
88
const changeCapacity = config ?. minCapacity ?? MIN_CAPACITY ;
89
- let inputs : CKBComponents . CellInput [ ] = [ ] ;
89
+ const inputs : CKBComponents . CellInput [ ] = [ ] ;
90
90
let sumInputsCapacity = BigInt ( 0 ) ;
91
- for ( let cell of liveCells ) {
91
+ for ( const cell of liveCells ) {
92
92
inputs . push ( {
93
93
previousOutput : {
94
94
txHash : cell . outPoint . txHash ,
@@ -109,11 +109,11 @@ export class Collector {
109
109
}
110
110
111
111
collectUdtInputs ( { liveCells, needAmount } : { liveCells : IndexerCell [ ] ; needAmount : bigint } ) : CollectUdtResult {
112
- let inputs : CKBComponents . CellInput [ ] = [ ] ;
112
+ const inputs : CKBComponents . CellInput [ ] = [ ] ;
113
113
let sumInputsCapacity = BigInt ( 0 ) ;
114
114
let sumAmount = BigInt ( 0 ) ;
115
115
const isRgbppLock = liveCells . length > 0 && isRgbppLockCellIgnoreChain ( liveCells [ 0 ] . output ) ;
116
- for ( let cell of liveCells ) {
116
+ for ( const cell of liveCells ) {
117
117
inputs . push ( {
118
118
previousOutput : {
119
119
txHash : cell . outPoint . txHash ,
0 commit comments