File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -321,21 +321,21 @@ export const getFees: TGetFees = async () => {
321321 try {
322322 fees = await new Promise < IOnchainFees > ( ( resolve , reject ) => {
323323 // try twice
324- const mpPromise = Promise . race ( [
325- fetchMp ( ) . catch ( fetchMp ) ,
326- throwTimeout ( 10000 ) ,
327- ] ) ;
328324 const btPromise = Promise . race ( [
329325 fetchBt ( ) . catch ( fetchBt ) ,
330326 throwTimeout ( 10000 ) ,
327+ ] ) ;
328+ const mpPromise = Promise . race ( [
329+ fetchMp ( ) . catch ( fetchMp ) ,
330+ throwTimeout ( 10000 ) ,
331331 ] ) . catch ( ( ) => null ) ; // Prevent unhandled rejection
332332
333- // prioritize mempool.space over blocktank
334- mpPromise . then ( resolve ) . catch ( ( ) => {
335- btPromise
336- . then ( ( btFees ) => {
337- if ( btFees !== null ) {
338- resolve ( btFees ) ;
333+ // prioritize blocktank over mempool.space
334+ btPromise . then ( resolve ) . catch ( ( ) => {
335+ mpPromise
336+ . then ( ( mpFees ) => {
337+ if ( mpFees !== null ) {
338+ resolve ( mpFees ) ;
339339 } else {
340340 reject ( new Error ( 'Failed to fetch fees' ) ) ;
341341 }
You can’t perform that action at this time.
0 commit comments