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 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>

View File

@ -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 = (