@@ -5,7 +5,6 @@ import { createClient } from '../clients/createClient.js'
55import { http } from '../clients/transports/http.js'
66import { parseEther } from '../utils/index.js'
77import * as estimateGas from './actions/estimateGas.js'
8- import * as chainConfig from './chainConfig.js'
98import { lineaSepolia } from './chains.js'
109
1110const client = createClient ( {
@@ -32,36 +31,4 @@ describe('estimateFeesPerGas', () => {
3231 expect ( maxFeePerGas ) . toBeDefined ( )
3332 expect ( maxPriorityFeePerGas ) . toBeDefined ( )
3433 } )
35-
36- test ( 'behavior: `estimateFeesPerGas` returns null' , async ( ) => {
37- vi . spyOn ( estimateGas , 'estimateGas' ) . mockRejectedValueOnce ( new Error ( ) )
38- const spy = vi . spyOn ( chainConfig . chainConfig . fees , 'estimateFeesPerGas' )
39- const { maxFeePerGas, maxPriorityFeePerGas } =
40- await internal_estimateFeesPerGas ( client , {
41- request : {
42- account : address . burn ,
43- to : address . burn ,
44- value : parseEther ( '0.0001' ) ,
45- } ,
46- } )
47- expect ( spy ) . toHaveReturnedWith ( null )
48- expect ( maxFeePerGas ) . toBeDefined ( )
49- expect ( maxPriorityFeePerGas ) . toBeDefined ( )
50- } )
51-
52- test ( 'behavior: `maxPriorityFeePerGas` returns null' , async ( ) => {
53- vi . spyOn ( estimateGas , 'estimateGas' ) . mockRejectedValue ( new Error ( ) )
54- const spy = vi . spyOn ( chainConfig . chainConfig . fees , 'maxPriorityFeePerGas' )
55- const { maxFeePerGas, maxPriorityFeePerGas } =
56- await internal_estimateFeesPerGas ( client , {
57- request : {
58- account : address . burn ,
59- to : address . burn ,
60- value : parseEther ( '0.0001' ) ,
61- } ,
62- } )
63- expect ( spy ) . toHaveReturnedWith ( null )
64- expect ( maxFeePerGas ) . toBeDefined ( )
65- expect ( maxPriorityFeePerGas ) . toBeDefined ( )
66- } )
6734} )
0 commit comments