Remove Sourcify integration method: local snapshot

This commit is contained in:
Willian Mitsuda 2021-10-22 15:59:45 -03:00
parent e99e5c35ea
commit 4671197846
2 changed files with 2 additions and 13 deletions

View File

@ -30,14 +30,6 @@ const SourcifyMenu: React.FC = () => {
>
Sourcify Servers
</SourcifyMenuItem>
<SourcifyMenuItem
checked={sourcifySource === SourcifySource.CUSTOM_SNAPSHOT_SERVER}
onClick={() =>
setSourcifySource(SourcifySource.CUSTOM_SNAPSHOT_SERVER)
}
>
Local Snapshot
</SourcifyMenuItem>
</Menu.Items>
</div>
</Menu>

View File

@ -23,16 +23,12 @@ export enum SourcifySource {
// Centralized Sourcify servers
CENTRAL_SERVER,
// Snapshot server
CUSTOM_SNAPSHOT_SERVER,
}
const sourcifyIPNS =
"k51qzi5uqu5dll0ocge71eudqnrgnogmbr37gsgl12uubsinphjoknl6bbi41p";
const defaultIpfsGatewayPrefix = `https://ipfs.io/ipns/${sourcifyIPNS}`;
const sourcifyHttpRepoPrefix = `https://repo.sourcify.dev`;
const snapshotPrefix = "http://localhost:3006";
const resolveSourcifySource = (source: SourcifySource) => {
if (source === SourcifySource.IPFS_IPNS) {
@ -41,7 +37,8 @@ const resolveSourcifySource = (source: SourcifySource) => {
if (source === SourcifySource.CENTRAL_SERVER) {
return sourcifyHttpRepoPrefix;
}
return snapshotPrefix;
throw new Error(`Unknown Sourcify intergration source code: ${source}`);
};
export const sourcifyMetadata = (