@@ -64,7 +64,7 @@ describe('CronosClient', () => {
6464 status : '1' ,
6565 } ;
6666 axiosMock
67- . onGet ( '/api ' , {
67+ . onGet ( '' , {
6868 params : {
6969 module : 'account' ,
7070 action : 'txlist' ,
@@ -83,7 +83,7 @@ describe('CronosClient', () => {
8383
8484 const cronosClient = new CronosClient (
8585 'https://evm-t3.cronos.org:8545/' ,
86- 'https://cronos-chainindex.com ' ,
86+ 'https://cronos.org/explorer/testnet3/api ' ,
8787 ) ;
8888
8989 const txListRespone = await cronosClient . getTxsByAddress (
@@ -104,42 +104,9 @@ describe('CronosClient', () => {
104104 } ) ;
105105
106106 it ( 'should return the `pendingTxList` from chainIndexAPI ' , async ( ) => {
107- const txPendingListStub = {
108- message : 'OK' ,
109- result : [
110- {
111- contractAddress : '' ,
112- cumulativeGasUsed : '52380' ,
113- from : '0x5a58b4d21720a96077ef0df280d73a26249f0784' ,
114- gas : '72000' ,
115- gasPrice : '100' ,
116- gasUsed : '1000' ,
117- hash : '0xc7d45697d4f2296964500a83ca3fbcc34f6d68ba58ed6b8ea4fe93363d6dd384' ,
118- input :
119- '0xa9059cbb000000000000000000000000899c7b2a8d62c3b848c052a16a4364a091eb308b0000000000000000000000000000000000000000000000000000102e294e53fd' ,
120- nonce : '2992' ,
121- to : '0x95f7c0b0def5ec981709c5c47e32963e5450bf38' ,
122- value : '0' ,
123- } ,
124- {
125- contractAddress : '' ,
126- cumulativeGasUsed : '52380' ,
127- from : '0x5a58b4d21720a96077ef0df280d73a26249f0784' ,
128- gas : '72000' ,
129- gasPrice : '100' ,
130- gasUsed : '1000' ,
131- hash : '0xc7d45697d4f2296964500a83ca3fbcc34f6d68ba58ed6b8ea4fe93363d6dd384' ,
132- input :
133- '0xa9059cbb000000000000000000000000899c7b2a8d62c3b848c052a16a4364a091eb308b0000000000000000000000000000000000000000000000000000102e294e53fd' ,
134- nonce : '2992' ,
135- to : '0x95f7c0b0def5ec981709c5c47e32963e5450bf38' ,
136- value : '0' ,
137- } ,
138- ] ,
139- status : '1' ,
140- } ;
107+ const txPendingListStub = { message : 'No transactions found' , result : [ ] , status : '0' } ;
141108 axiosMock
142- . onGet ( '/api ' , {
109+ . onGet ( '' , {
143110 params : {
144111 module : 'account' ,
145112 action : 'pendingtxlist' ,
@@ -159,14 +126,14 @@ describe('CronosClient', () => {
159126 const cronosClient = new CronosClient (
160127 // 'https://cronos-testnet-3.crypto.org:8545/',
161128 'https://evm-t3.cronos.org:8545/' ,
162- 'https://cronos-chainindex.com ' ,
129+ 'https://cronos.org/explorer/testnet3/api ' ,
163130 ) ;
164131 const txPendingListRespone = await cronosClient . getPendingTxsByAddress (
165132 '0x95F7C0B0dEF5Ec981709c5C47E32963E5450bF38' ,
166133 { page : '1' , offset : '2' } ,
167134 ) ;
168- expect ( txPendingListRespone . message ) . to . equal ( 'OK ' ) ;
169- expect ( txPendingListRespone . status ) . to . equal ( '1 ' ) ;
135+ expect ( txPendingListRespone . message ) . to . equal ( 'No transactions found ' ) ;
136+ expect ( txPendingListRespone . status ) . to . equal ( '0 ' ) ;
170137 expect ( txPendingListRespone . result ) . to . deep . equal ( txPendingListStub . result ) ;
171138
172139 const txPendingListEmptyRespone = await cronosClient . getPendingTxsByAddress (
0 commit comments