mirror of
https://github.com/apotdevin/thunderhub.git
synced 2025-02-22 06:21:37 +01:00
chore: custom mempool url
This commit is contained in:
parent
bc091661ce
commit
dbf2da3d0d
4 changed files with 19 additions and 4 deletions
5
.env
5
.env
|
@ -12,6 +12,11 @@
|
|||
# LOG_LEVEL='info'
|
||||
# TOR_PROXY_SERVER=socks://127.0.0.1:9050
|
||||
|
||||
# -----------
|
||||
# URLs
|
||||
# -----------
|
||||
# MEMPOOL_URL='https://mempool.space'
|
||||
|
||||
# -----------
|
||||
# Interface Configs
|
||||
# -----------
|
||||
|
|
|
@ -24,6 +24,10 @@ const accountConfig = {
|
|||
accountConfigPath: process.env.ACCOUNT_CONFIG_PATH || '',
|
||||
};
|
||||
|
||||
const urls = {
|
||||
mempoolUrl: process.env.MEMPOOL_URL || 'https://mempool.space',
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
poweredByHeader: false,
|
||||
basePath: process.env.BASE_PATH || '',
|
||||
|
@ -37,6 +41,7 @@ module.exports = {
|
|||
...ymlEnv,
|
||||
},
|
||||
publicRuntimeConfig: {
|
||||
...urls,
|
||||
nodeEnv: process.env.NODE_ENV || 'development',
|
||||
apiUrl: `${process.env.BASE_PATH || ''}/api/v1`,
|
||||
apiBaseUrl: `${process.env.API_BASE_URL || ''}/api/v1`,
|
||||
|
|
|
@ -58,7 +58,7 @@ describe('Bitcoin Resolvers', () => {
|
|||
expect(res.errors).toBe(undefined);
|
||||
|
||||
expect(fetchMock).toBeCalledWith(
|
||||
'https://mempool.space/api/v1/fees/recommended',
|
||||
'undefined/api/v1/fees/recommended',
|
||||
undefined
|
||||
);
|
||||
expect(res).toMatchSnapshot();
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
import getConfig from 'next/config';
|
||||
|
||||
const { publicRuntimeConfig } = getConfig() || {};
|
||||
const { mempoolUrl } = publicRuntimeConfig || {};
|
||||
|
||||
const tbase =
|
||||
process.env.NODE_ENV === 'development'
|
||||
? 'http://localhost:3010/dev/v1'
|
||||
|
@ -12,9 +17,9 @@ export const appUrls = {
|
|||
tbase,
|
||||
amboss,
|
||||
oneml: 'https://amboss.space/node/',
|
||||
blockchain: 'https://mempool.space/tx/',
|
||||
blockchainAddress: 'https://mempool.space/address/',
|
||||
fees: 'https://mempool.space/api/v1/fees/recommended',
|
||||
blockchain: `${mempoolUrl}/tx/`,
|
||||
blockchainAddress: `${mempoolUrl}/address/`,
|
||||
fees: `${mempoolUrl}/api/v1/fees/recommended`,
|
||||
ticker: 'https://blockchain.info/ticker',
|
||||
github: 'https://api.github.com/repos/apotdevin/thunderhub/releases/latest',
|
||||
update: 'https://github.com/apotdevin/thunderhub#updating',
|
||||
|
|
Loading…
Add table
Reference in a new issue