Skip to content

Commit

Permalink
Add Westmint Metadata to the Explorer (w3f#4514)
Browse files Browse the repository at this point in the history
* Add Westmint Metadata to the Explorer

* minor fix
  • Loading branch information
DrW3RK authored Feb 27, 2023
1 parent 8e4a6e0 commit c48293a
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions components/Metadata.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,13 @@ const PolkadotJSVersion = Packages.devDependencies["@polkadot/api"].substring(1)

// Chains that will appear in the dropdown selection menu (add new parachains here)
const Networks = [
{ name: "polkadot", rpc: "wss://rpc.polkadot.io" },
{ name: "kusama", rpc: "wss://kusama-rpc.polkadot.io" },
{ name: "statemine", rpc: "wss://statemine-rpc.polkadot.io" },
{ name: "statemint", rpc: "wss://statemint-rpc.polkadot.io" },
{ name: "westend", rpc: "wss://westend-rpc.polkadot.io" },
{ name: "rococo", rpc: "wss://rococo-rpc.polkadot.io" },
{ name: "Polkadot", rpc: "wss://rpc.polkadot.io" },
{ name: "Kusama", rpc: "wss://kusama-rpc.polkadot.io" },
{ name: "Westend", rpc: "wss://westend-rpc.polkadot.io" },
{ name: "Statemint", rpc: "wss://statemint-rpc.polkadot.io" },
{ name: "Statemine", rpc: "wss://statemine-rpc.polkadot.io" },
{ name: "Westmint", rpc: "wss://westmint-rpc.polkadot.io" },
{ name: "Rococo", rpc: "wss://rococo-rpc.polkadot.io" },
];

// Track all top-level containers for expand/collapse all functionality
Expand All @@ -28,8 +29,8 @@ export default function Metadata({ version }) {

useEffect(async () => {
// Load default network
let defaultNetwork = "polkadot";
if (document.title === "Metadata Explorer · Guide") { defaultNetwork = "kusama"; }
let defaultNetwork = "Polkadot";
if (document.title === "Metadata Explorer · Guide") { defaultNetwork = "Kusama"; }
const network = Networks.find(network => { return network.name === defaultNetwork });
const wsUrl = network.rpc;

Expand Down Expand Up @@ -508,4 +509,4 @@ const LoadingStatus = { display: "none" };
const TreeControl = { margin: "0px", color: "#e6007a", cursor: "pointer" };
const SearchStyle = { border: "1px solid #e6007a", width: "400px", height: "40px", fontSize: "16px", textAlign: "center", margin: "1px" }
const TopLevel = { fontSize: "18px" }
const SecondLevel = { paddingLeft: "16px" }
const SecondLevel = { paddingLeft: "16px" }

0 comments on commit c48293a

Please sign in to comment.