Merge branch 'master' into wiz/upgrade-bitcoin-core-v23

This commit is contained in:
wiz 2022-07-03 19:34:22 +09:00 committed by GitHub
commit cdd2d9089b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 10 deletions

View File

@ -1,8 +1,13 @@
name: Cypress Tests
on: [push, pull_request]
on:
pull_request:
types: [ opened, review_requested, synchronize ]
branches-ignore:
- 'ops/**'
jobs:
cypress:
if: "!contains(github.event.pull_request.labels.*.name, 'ops')"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false

View File

@ -114,7 +114,7 @@ export class Common {
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;
return {

View File

@ -235,7 +235,7 @@ Corresponding `docker-compose.yml` overrides:
DATABASE_HOST: ""
DATABASE_PORT: ""
DATABASE_DATABASE: ""
DATABASE_USERAME: ""
DATABASE_USERNAME: ""
DATABASE_PASSWORD: ""
...
```

View File

@ -140,9 +140,8 @@ export default class TxView implements TransactionStripped {
}
getColor(): Color {
let feeLevelIndex = feeLevels.slice().reverse().findIndex((feeLvl) => (this.feerate || 1) >= feeLvl);
feeLevelIndex = feeLevelIndex >= 0 ? feeLevels.length - feeLevelIndex : feeLevelIndex;
return hexToColor(mempoolFeeColors[feeLevelIndex - 1] || mempoolFeeColors[mempoolFeeColors.length - 1]);
const feeLevelIndex = feeLevels.findIndex((feeLvl) => Math.max(1, this.feerate) < feeLvl) - 1;
return hexToColor(mempoolFeeColors[feeLevelIndex] || mempoolFeeColors[mempoolFeeColors.length - 1]);
}
}

View File

@ -34,13 +34,21 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
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() {
const that = this;
this.faqTemplates.forEach((x) => this.dict[x.type] = x.template);
setTimeout( () => {
if( this.route.snapshot.fragment ) {
this.openEndpointContainer( this.route.snapshot.fragment );
document.getElementById( this.route.snapshot.fragment ).scrollIntoView();
if (document.getElementById( this.route.snapshot.fragment )) {
document.getElementById( this.route.snapshot.fragment ).scrollIntoView();
}
}
window.addEventListener('scroll', function() {
that.desktopDocsNavPosition = ( window.pageYOffset > 182 ) ? "fixed" : "relative";
@ -90,14 +98,17 @@ export class ApiDocsComponent implements OnInit, AfterViewInit {
}
targetId = element.hash.substring(1);
}
if( this.route.snapshot.fragment === targetId ) {
if( this.route.snapshot.fragment === targetId && document.getElementById( targetId )) {
document.getElementById( targetId ).scrollIntoView();
}
this.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 ) {
const endpointContainerEl = document.querySelector<HTMLElement>( "#" + targetId );
const endpointContentEl = document.querySelector<HTMLElement>( "#" + targetId + " .endpoint-content" );