Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ce9d16f
Add get-block-v1 doc
hunicus May 13, 2025
e5973b7
Get correct backend property
hunicus May 13, 2025
cc150b4
Add get-blocks-v1 doc
hunicus May 14, 2025
7fd006d
Add get-blocks-v1 doc for liquid
hunicus May 14, 2025
5a53368
fix copy, add missing error string
nymkappa May 17, 2025
f35855b
Update social sharing image
orangesurf May 18, 2025
fb98f62
Fix meta image file format
orangesurf May 18, 2025
5d0596d
Fix meta image file format
orangesurf May 18, 2025
ce179ee
Merge pull request #2 from JOKACAR-ORG/revert-1-revert-5338-jloppAgre…
Jokacar10 May 19, 2025
a3c6487
prioritize testnet4 address search results
mononaut May 19, 2025
75972f7
Merge pull request #5915 from mempool/mononaut/testnet4-search
wiz May 20, 2025
e0c8cdd
Add historical price endpoint to Liquid backend
natsoni May 20, 2025
a87cdff
Add USD series to Liquid reserves graph
natsoni May 20, 2025
a8a7135
Merge branch 'mempool:master' into master
Jokacar10 May 20, 2025
4d6935c
Fix crash when toggling coinbase tx details
natsoni May 21, 2025
b3db3ce
Fix colspan value
natsoni May 21, 2025
6be58dd
Merge pull request #5918 from mempool/natsoni/fix-tx-details-crash
mononaut May 21, 2025
082a06c
Merge pull request #5919 from mempool/natsoni/fix-details-colspan
mononaut May 21, 2025
b25429a
Merge pull request #5911 from mempool/nymkappa/click-here
nymkappa May 23, 2025
4092ee3
Create codeql.yml12
Jokacar10 May 26, 2025
b763fec
Merge branch 'mempool:master' into master
Jokacar10 May 26, 2025
59a1c62
Fix missing y axis on difficulty chart
natsoni May 30, 2025
3f07e08
Merge pull request #5912 from mempool/orangesurf/metaplanet-sharing-i…
mononaut Jun 2, 2025
77fdb67
reduce enterprise unfurler cluster sizes
mononaut Jun 2, 2025
36775a2
Merge pull request #5926 from mempool/natsoni/hashrate-graph-axis
wiz Jun 2, 2025
1ffcc8f
Merge branch 'master' into mononaut/adjust-unfurler-clusters
wiz Jun 2, 2025
b796a21
Merge pull request #5909 from mempool/hunicus/get-block-9001
wiz Jun 2, 2025
51a014e
Merge branch 'master' into mononaut/adjust-unfurler-clusters
wiz Jun 2, 2025
961c554
Merge pull request #5927 from mempool/mononaut/adjust-unfurler-clusters
wiz Jun 2, 2025
721a647
Merge pull request #5916 from mempool/natsoni/liquid-usd
wiz Jun 2, 2025
42c336f
Merge branch 'mempool:master' into master
Jokacar10 Jun 4, 2025
03089a4
Rename dependabot.yml to dependabot.yml234
Jokacar10 Jun 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
98 changes: 98 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Advanced"

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: '33 7 * * 3'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
# CodeQL supports the following values keywords for 'language': 'actions', 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Add any setup steps before running the `github/codeql-action/init` action.
# This includes steps like installing compilers or runtimes (`actions/setup-node`
# or others). This is typically only required for manual builds.
# - name: Setup runtime (example)
# uses: actions/setup-example@v1

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
shell: bash
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
30 changes: 30 additions & 0 deletions backend/src/api/liquid/liquid.routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import config from '../../config';
import elementsParser from './elements-parser';
import icons from './icons';
import { handleError } from '../../utils/api';
import PricesRepository from '../../repositories/PricesRepository';

class LiquidRoutes {
public initRoutes(app: Application) {
Expand Down Expand Up @@ -31,6 +32,7 @@ class LiquidRoutes {
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/emergency-spent', this.$getEmergencySpentUtxos)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/utxos/emergency-spent/stats', this.$getEmergencySpentUtxosStats)
.get(config.MEMPOOL.API_URL_PREFIX + 'liquid/reserves/status', this.$getFederationAuditStatus)
.get(config.MEMPOOL.API_URL_PREFIX + 'historical-price', this.$getHistoricalPrice)
;
}
}
Expand Down Expand Up @@ -255,6 +257,34 @@ class LiquidRoutes {
}
}

private async $getHistoricalPrice(req: Request, res: Response): Promise<void> {
try {
res.header('Pragma', 'public');
res.header('Cache-control', 'public');
res.setHeader('Expires', new Date(Date.now() + 1000 * 300).toUTCString());
if (['testnet', 'signet', 'liquidtestnet'].includes(config.MEMPOOL.NETWORK)) {
handleError(req, res, 400, 'Prices are not available on testnets.');
return;
}
const timestamp = parseInt(req.query.timestamp as string, 10) || 0;
const currency = req.query.currency as string;

let response;
if (timestamp && currency) {
response = await PricesRepository.$getNearestHistoricalPrice(timestamp, currency);
} else if (timestamp) {
response = await PricesRepository.$getNearestHistoricalPrice(timestamp);
} else if (currency) {
response = await PricesRepository.$getHistoricalPrices(currency);
} else {
response = await PricesRepository.$getHistoricalPrices();
}
res.status(200).send(response);
} catch (e) {
handleError(req, res, 500, 'Failed to get historical prices');
}
}

}

export default new LiquidRoutes();
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ <h1 style="font-size: larger;"><ng-content select="[slot='accelerated-title']"><
</div>
@if (accelerationResponse?.receiptUrl) {
<div class="d-flex flex-row justify-content-center align-items-center">
<span i18n="accelerator.receipt-label"><a [href]="accelerationResponse.receiptUrl" target="_blank">Click here to get a receipt.</a></span>
<span i18n="accelerator.receipt-label"><a [href]="accelerationResponse.receiptUrl" target="_blank">Get a receipt.</a></span>
</div>
}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,11 @@ export class HashrateChartComponent implements OnInit {
{
type: 'value',
position: 'right',
min: (_) => {
min: (value) => {
const firstYAxisMin = this.chartInstance.getModel().getComponent('yAxis', 0).axis.scale.getExtent()[0];
if (firstYAxisMin === Infinity) {
return value.min;
}
const selectedPowerOfTen: any = selectPowerOfTen(firstYAxisMin);
const newMin = Math.floor(firstYAxisMin / selectedPowerOfTen.divider / 10)
return 600 / 2 ** 32 * newMin * selectedPowerOfTen.divider * 10;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="echarts" *browserOnly echarts [initOpts]="pegsChartInitOption" [options]="pegsChartOptions" (chartRendered)="rendered()"></div>
<div class="echarts" *browserOnly echarts [initOpts]="pegsChartInitOption" [options]="pegsChartOptions" (chartInit)="onChartInit($event)" (chartRendered)="rendered()"></div>
<div class="text-center loadingGraphs" *ngIf="!stateService.isBrowser || isLoading">
<div class="spinner-border text-light"></div>
</div>
Loading
Loading