Remove Sourcify integration method: local snapshot
This commit is contained in:
parent
e99e5c35ea
commit
4671197846
|
@ -30,14 +30,6 @@ const SourcifyMenu: React.FC = () => {
|
||||||
>
|
>
|
||||||
Sourcify Servers
|
Sourcify Servers
|
||||||
</SourcifyMenuItem>
|
</SourcifyMenuItem>
|
||||||
<SourcifyMenuItem
|
|
||||||
checked={sourcifySource === SourcifySource.CUSTOM_SNAPSHOT_SERVER}
|
|
||||||
onClick={() =>
|
|
||||||
setSourcifySource(SourcifySource.CUSTOM_SNAPSHOT_SERVER)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
Local Snapshot
|
|
||||||
</SourcifyMenuItem>
|
|
||||||
</Menu.Items>
|
</Menu.Items>
|
||||||
</div>
|
</div>
|
||||||
</Menu>
|
</Menu>
|
||||||
|
|
|
@ -23,16 +23,12 @@ export enum SourcifySource {
|
||||||
|
|
||||||
// Centralized Sourcify servers
|
// Centralized Sourcify servers
|
||||||
CENTRAL_SERVER,
|
CENTRAL_SERVER,
|
||||||
|
|
||||||
// Snapshot server
|
|
||||||
CUSTOM_SNAPSHOT_SERVER,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const sourcifyIPNS =
|
const sourcifyIPNS =
|
||||||
"k51qzi5uqu5dll0ocge71eudqnrgnogmbr37gsgl12uubsinphjoknl6bbi41p";
|
"k51qzi5uqu5dll0ocge71eudqnrgnogmbr37gsgl12uubsinphjoknl6bbi41p";
|
||||||
const defaultIpfsGatewayPrefix = `https://ipfs.io/ipns/${sourcifyIPNS}`;
|
const defaultIpfsGatewayPrefix = `https://ipfs.io/ipns/${sourcifyIPNS}`;
|
||||||
const sourcifyHttpRepoPrefix = `https://repo.sourcify.dev`;
|
const sourcifyHttpRepoPrefix = `https://repo.sourcify.dev`;
|
||||||
const snapshotPrefix = "http://localhost:3006";
|
|
||||||
|
|
||||||
const resolveSourcifySource = (source: SourcifySource) => {
|
const resolveSourcifySource = (source: SourcifySource) => {
|
||||||
if (source === SourcifySource.IPFS_IPNS) {
|
if (source === SourcifySource.IPFS_IPNS) {
|
||||||
|
@ -41,7 +37,8 @@ const resolveSourcifySource = (source: SourcifySource) => {
|
||||||
if (source === SourcifySource.CENTRAL_SERVER) {
|
if (source === SourcifySource.CENTRAL_SERVER) {
|
||||||
return sourcifyHttpRepoPrefix;
|
return sourcifyHttpRepoPrefix;
|
||||||
}
|
}
|
||||||
return snapshotPrefix;
|
|
||||||
|
throw new Error(`Unknown Sourcify intergration source code: ${source}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
export const sourcifyMetadata = (
|
export const sourcifyMetadata = (
|
||||||
|
|
Loading…
Reference in New Issue