Removing Bisq

This commit is contained in:
softsimon
2024-03-17 18:22:38 +09:00
parent 1b21cd89a3
commit 60996a99f0
124 changed files with 51 additions and 8624 deletions

View File

@@ -62,7 +62,6 @@
<p *ngIf="(officialMempoolSpace || (env.BASE_MODULE === 'mempool')) && (currentNetwork !== 'signet') && env.SIGNET_ENABLED"><a [href]="networkLink('signet')" i18n="footer.signet-explorer">Signet Explorer</a></p>
<p *ngIf="(officialMempoolSpace || env.LIQUID_ENABLED) && (currentNetwork !== 'liquidtestnet')"><a [href]="networkLink('liquidtestnet')" i18n="footer.liquid-testnet-explorer">Liquid Testnet Explorer</a></p>
<p *ngIf="(officialMempoolSpace || env.LIQUID_ENABLED) && (currentNetwork !== 'liquid')"><a [href]="networkLink('liquid')" i18n="footer.liquid-explorer">Liquid Explorer</a></p>
<p *ngIf="(officialMempoolSpace && (currentNetwork !== 'bisq'))"><a [href]="networkLink('bisq')" i18n="footer.bisq-explorer">Bisq Explorer</a></p>
</div>
<ng-template #toolBox>
<div class="links">

View File

@@ -82,8 +82,5 @@ export class GlobalFooterComponent implements OnInit {
if( network === 'liquid' || network === 'liquidtestnet' ) {
return (this.env.BASE_MODULE === 'liquid' ? '' : this.env.LIQUID_WEBSITE_URL + this.urlLanguage) + this.networkPaths[thisNetwork] || '/';
}
if( network === 'bisq' ) {
return (this.env.BASE_MODULE === 'bisq' ? '' : this.env.BISQ_WEBSITE_URL + this.urlLanguage) + this.networkPaths[thisNetwork] || '/';
}
}
}

View File

@@ -124,25 +124,11 @@ const ADDRESS_CHARS: {
+ `{20,100}`
+ `)`,
},
bisq: {
base58: `(?:[bB][13]` // b or B at the start, followed by a single 1 or 3
+ BASE58_CHARS
+ `{26,33})`,
bech32: `(?:`
+ `[bB]bc1` // b or B at the start, followed by bc1
+ BECH32_CHARS_LW
+ `{20,100}`
+ `|`
+ `[bB]BC1` // b or B at the start, followed by BC1
+ BECH32_CHARS_UP
+ `{20,100}`
+ `)`,
},
}
type RegexTypeNoAddrNoBlockHash = | `transaction` | `blockheight` | `date` | `timestamp`;
export type RegexType = `address` | `blockhash` | RegexTypeNoAddrNoBlockHash;
export const NETWORKS = [`testnet`, `signet`, `liquid`, `liquidtestnet`, `bisq`, `mainnet`] as const;
export const NETWORKS = [`testnet`, `signet`, `liquid`, `liquidtestnet`, `mainnet`] as const;
export type Network = typeof NETWORKS[number]; // Turn const array into union type
export const ADDRESS_REGEXES: [RegExp, Network][] = NETWORKS
@@ -164,8 +150,6 @@ function isNetworkAvailable(network: Network, env: Env): boolean {
return env.LIQUID_ENABLED === true;
case 'liquidtestnet':
return env.LIQUID_TESTNET_ENABLED === true;
case 'bisq':
return env.BISQ_ENABLED === true;
case 'mainnet':
return true; // There is no "MAINNET_ENABLED" flag
default:
@@ -173,7 +157,7 @@ function isNetworkAvailable(network: Network, env: Env): boolean {
}
}
export function needBaseModuleChange(fromBaseModule: 'mempool' | 'liquid' | 'bisq', toNetwork: Network): boolean {
export function needBaseModuleChange(fromBaseModule: 'mempool' | 'liquid', toNetwork: Network): boolean {
if (!toNetwork) return false; // No target network means no change needed
if (fromBaseModule === 'mempool') {
return toNetwork !== 'mainnet' && toNetwork !== 'testnet' && toNetwork !== 'signet';
@@ -181,9 +165,6 @@ export function needBaseModuleChange(fromBaseModule: 'mempool' | 'liquid' | 'bis
if (fromBaseModule === 'liquid') {
return toNetwork !== 'liquid' && toNetwork !== 'liquidtestnet';
}
if (fromBaseModule === 'bisq') {
return toNetwork !== 'bisq';
}
}
export function getTargetUrl(toNetwork: Network, address: string, env: Env): string {
@@ -194,11 +175,6 @@ export function getTargetUrl(toNetwork: Network, address: string, env: Env): str
targetUrl += '/address/';
targetUrl += address;
}
if (toNetwork === 'bisq') {
targetUrl = env.BISQ_WEBSITE_URL;
targetUrl += '/address/';
targetUrl += address;
}
if (toNetwork === 'mainnet' || toNetwork === 'testnet' || toNetwork === 'signet') {
targetUrl = env.MEMPOOL_WEBSITE_URL;
targetUrl += (toNetwork === 'mainnet' ? '' : `/${toNetwork}`);
@@ -242,9 +218,6 @@ export function getRegex(type: RegexType, network?: Network): RegExp {
case `liquidtestnet`:
leadingZeroes = 8; // We are not interested in Liquid block hashes
break;
case `bisq`:
leadingZeroes = 8; // Assumes at least 32 bits of difficulty
break;
default:
throw new Error(`Invalid Network ${network} (Unreachable error in TypeScript)`);
}
@@ -307,11 +280,6 @@ export function getRegex(type: RegexType, network?: Network): RegExp {
regex += `|`; // OR
regex += ADDRESS_CHARS.liquidtestnet.bech32;
break;
case `bisq`:
regex += ADDRESS_CHARS.bisq.base58;
regex += `|`; // OR
regex += ADDRESS_CHARS.bisq.bech32;
break;
default:
throw new Error(`Invalid Network ${network} (Unreachable error in TypeScript)`);
}