@@ -167,6 +167,20 @@ describe('integration test', () => {
167
167
} )
168
168
} )
169
169
170
+ describe ( 'cfx_feeHistory' , async ( ) => {
171
+ test ( 'cfx_feeHistory' , async ( ) => {
172
+ const result = await request ( {
173
+ method : 'cfx_feeHistory' ,
174
+ params : [ '0x5' , 'latest_state' , [ 20 , 30 ] ] ,
175
+ } )
176
+ console . log ( result )
177
+ expect ( result . result . baseFeePerGas . length ) . toBe ( 6 )
178
+ expect ( result . result . gasUsedRatio . length ) . toBe ( 5 )
179
+ expect ( result . result . oldestEpoch ) . toBeDefined ( )
180
+ expect ( result . result . reward . length ) . toBe ( 5 )
181
+ } )
182
+ } )
183
+
170
184
describe ( 'cfx_getStatus' , ( ) => {
171
185
test ( 'cfx_getStatus' , async ( ) => {
172
186
const stat = await request ( { method : 'cfx_getStatus' } )
@@ -329,7 +343,10 @@ describe('integration test', () => {
329
343
(
330
344
await request ( {
331
345
method : 'wallet_deleteNetwork' ,
332
- params : { password, networkId : db . getNetworkByType ( 'eth' ) [ 0 ] . eid } ,
346
+ params : {
347
+ password,
348
+ networkId : db . getNetworkByType ( 'eth' ) [ 0 ] . eid ,
349
+ } ,
333
350
} )
334
351
) . result ,
335
352
) . toBe ( true )
@@ -359,7 +376,10 @@ describe('integration test', () => {
359
376
(
360
377
await request ( {
361
378
method : 'wallet_deleteNetwork' ,
362
- params : { password, networkId : db . getNetworkByName ( 'foo' ) [ 0 ] . eid } ,
379
+ params : {
380
+ password,
381
+ networkId : db . getNetworkByName ( 'foo' ) [ 0 ] . eid ,
382
+ } ,
363
383
} )
364
384
) . error . message ,
365
385
) . toMatch ( / N o t a l l o w e d t o d e l e t e b u i l t i n n e t w o r k / )
@@ -1215,7 +1235,10 @@ describe('integration test', () => {
1215
1235
// app is from the right site
1216
1236
expect ( app . site . eid ) . toBe ( db . getSite ( ) [ 0 ] . eid )
1217
1237
// app has the right permissions
1218
- expect ( app . perms ) . toStrictEqual ( { wallet_accounts : { } , wallet_basic : { } } )
1238
+ expect ( app . perms ) . toStrictEqual ( {
1239
+ wallet_accounts : { } ,
1240
+ wallet_basic : { } ,
1241
+ } )
1219
1242
// app has the right authed accounts
1220
1243
expect (
1221
1244
app . account . map ( a => [ a1 . eid , a2 . eid ] . includes ( a . eid ) ) ,
@@ -1289,7 +1312,10 @@ describe('integration test', () => {
1289
1312
// app is from the right site
1290
1313
expect ( app . site . eid ) . toBe ( db . getSite ( ) [ 0 ] . eid )
1291
1314
// app has the right permissions
1292
- expect ( app . perms ) . toStrictEqual ( { wallet_accounts : { } , wallet_basic : { } } )
1315
+ expect ( app . perms ) . toStrictEqual ( {
1316
+ wallet_accounts : { } ,
1317
+ wallet_basic : { } ,
1318
+ } )
1293
1319
// app has the right authed accounts
1294
1320
expect (
1295
1321
app . account . map ( a => [ a1 . eid , a2 . eid ] . includes ( a . eid ) ) ,
@@ -1629,7 +1655,10 @@ describe('integration test', () => {
1629
1655
(
1630
1656
await request ( {
1631
1657
method : 'wallet_getAddressPrivateKey' ,
1632
- params : { address : addr . value , accountId : db . getAccount ( ) [ 0 ] . eid } ,
1658
+ params : {
1659
+ address : addr . value ,
1660
+ accountId : db . getAccount ( ) [ 0 ] . eid ,
1661
+ } ,
1633
1662
_internal : true ,
1634
1663
} )
1635
1664
) . error . message ,
0 commit comments