Merge branch 'master' into nymkappa/bugfix/umbrel-electrs-504
This commit is contained in:
		
						commit
						1b2fbfd506
					
				| @ -114,7 +114,7 @@ export class Common { | |||||||
|       totalFees += tx.bestDescendant.fee; |       totalFees += tx.bestDescendant.fee; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|     tx.effectiveFeePerVsize = Math.max(Common.isLiquid() ? 0.1 : 1, totalFees / (totalWeight / 4)); |     tx.effectiveFeePerVsize = Math.max(0, totalFees / (totalWeight / 4)); | ||||||
|     tx.cpfpChecked = true; |     tx.cpfpChecked = true; | ||||||
| 
 | 
 | ||||||
|     return { |     return { | ||||||
|  | |||||||
| @ -140,9 +140,8 @@ export default class TxView implements TransactionStripped { | |||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   getColor(): Color { |   getColor(): Color { | ||||||
|     let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => (this.feerate || 1) >= feeLvl); |     const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(1, this.feerate) < feeLvl) - 1; | ||||||
|     feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex; |     return hexToColor(mempoolFeeColors[feeLevelIndex] || mempoolFeeColors[mempoolFeeColors.length - 1]); | ||||||
|     return hexToColor(mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]); |  | ||||||
|   } |   } | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -34,14 +34,22 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { | |||||||
|     private route: ActivatedRoute, |     private route: ActivatedRoute, | ||||||
|   ) { } |   ) { } | ||||||
| 
 | 
 | ||||||
|  |   ngAfterContentChecked() { | ||||||
|  |     if (this.faqTemplates) { | ||||||
|  |       this.faqTemplates.forEach((x) => this.dict[x.type] = x.template); | ||||||
|  |     } | ||||||
|  |     this.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative"; | ||||||
|  |   } | ||||||
|  | 
 | ||||||
|   ngAfterViewInit() { |   ngAfterViewInit() { | ||||||
|     const that = this; |     const that = this; | ||||||
|     this.faqTemplates.forEach((x) => this.dict[x.type] = x.template); |  | ||||||
|     setTimeout( () => { |     setTimeout( () => { | ||||||
|       if( this.route.snapshot.fragment ) { |       if( this.route.snapshot.fragment ) { | ||||||
|         this.openEndpointContainer( this.route.snapshot.fragment ); |         this.openEndpointContainer( this.route.snapshot.fragment ); | ||||||
|  |         if (document.getElementById( this.route.snapshot.fragment )) { | ||||||
|           document.getElementById( this.route.snapshot.fragment ).scrollIntoView(); |           document.getElementById( this.route.snapshot.fragment ).scrollIntoView(); | ||||||
|         } |         } | ||||||
|  |       } | ||||||
|       window.addEventListener('scroll', function() { |       window.addEventListener('scroll', function() { | ||||||
|         that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative"; |         that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative"; | ||||||
|       }, { passive: true} ); |       }, { passive: true} ); | ||||||
| @ -90,14 +98,17 @@ export class ApiDocsComponent implements OnInit, AfterViewInit { | |||||||
|       } |       } | ||||||
|       targetId = element.hash.substring(1); |       targetId = element.hash.substring(1); | ||||||
|     } |     } | ||||||
|     if( this.route.snapshot.fragment === targetId ) { |     if( this.route.snapshot.fragment === targetId && document.getElementById( targetId )) { | ||||||
|       document.getElementById( targetId ).scrollIntoView(); |       document.getElementById( targetId ).scrollIntoView(); | ||||||
|     } |     } | ||||||
|     this.openEndpointContainer( targetId ); |     this.openEndpointContainer( targetId ); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|   openEndpointContainer( targetId ) { |   openEndpointContainer( targetId ) { | ||||||
|     const tabHeaderHeight = document.getElementById( targetId + "-tab-header" ).scrollHeight; |     let tabHeaderHeight = 0; | ||||||
|  |     if (document.getElementById( targetId + "-tab-header" )) { | ||||||
|  |       tabHeaderHeight = document.getElementById( targetId + "-tab-header" ).scrollHeight; | ||||||
|  |     } | ||||||
|     if( ( window.innerWidth <= 992 ) && ( ( this.whichTab === 'rest' ) || ( this.whichTab === 'faq' ) ) && targetId ) { |     if( ( window.innerWidth <= 992 ) && ( ( this.whichTab === 'rest' ) || ( this.whichTab === 'faq' ) ) && targetId ) { | ||||||
|       const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId ); |       const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId ); | ||||||
|       const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" ); |       const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" ); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user