change network names and remove hardcoded chain data
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
parent
eff6e61a39
commit
74f922fd3e
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"author": "Ghost Team <someone@ghostchain.io>",
|
"author": "GHOST Team <someone@ghostchain.io>",
|
||||||
"description": "Wallet for Ghost and Casper blockchains light clients",
|
"description": "Wallet for GHOST and Casper blockchains light clients",
|
||||||
"homepage_url": "https://github.com/ghostchain/ghost-wallet",
|
"homepage_url": "https://git.ghostchain.io/ghostchain/ghost-extension-wallet",
|
||||||
"name": "Ghost Wallet",
|
"name": "GHOST Wallet",
|
||||||
"short_name": "ghost-wallet",
|
"short_name": "ghost-wallet",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"default_title": "Ghost Wallet",
|
"default_title": "GHOST Wallet",
|
||||||
"default_popup": "ui/assets/wallet-popup.html"
|
"default_popup": "ui/assets/wallet-popup.html"
|
||||||
},
|
},
|
||||||
"options_ui": {
|
"options_ui": {
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"author": "Ghost Team <someone@ghostchain.io>",
|
"author": "GHOST Team <someone@ghostchain.io>",
|
||||||
"description": "Wallet for Ghost and Casper blockchains light clients",
|
"description": "Wallet for GHOST and Casper blockchains light clients",
|
||||||
"homepage_url": "https://github.com/ghostchain/ghost-wallet",
|
"homepage_url": "https://git.ghostchain.io/ghostchain/ghost-extension-wallet",
|
||||||
"name": "Ghost Wallet",
|
"name": "GHOST Wallet",
|
||||||
"short_name": "ghost-wallet",
|
"short_name": "ghost-wallet",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"manifest_version": 3,
|
"manifest_version": 3,
|
||||||
@ -12,7 +12,7 @@
|
|||||||
"type": "module"
|
"type": "module"
|
||||||
},
|
},
|
||||||
"action": {
|
"action": {
|
||||||
"default_title": "Ghost Wallet",
|
"default_title": "GHOST Wallet",
|
||||||
"default_popup": "ui/assets/wallet-popup.html"
|
"default_popup": "ui/assets/wallet-popup.html"
|
||||||
},
|
},
|
||||||
"options_ui": {
|
"options_ui": {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ghost Wallet Options</title>
|
<title>GHOST Wallet Options</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body style="background-color: #f9f9f9">
|
<body style="background-color: #f9f9f9">
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>Ghost Wallet</title>
|
<title>GHOST Wallet</title>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "ghost-wallet",
|
"name": "ghost-wallet",
|
||||||
"version": "0.1.0",
|
"version": "0.1.1",
|
||||||
"description": "Browser extension to manage ghost blockchain light clients.",
|
"description": "Browser extension to manage ghost blockchain light clients.",
|
||||||
"main": "dist/src/index.js",
|
"main": "dist/src/index.js",
|
||||||
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
import { useEffect, useState } from "react"
|
import { useEffect, useState } from "react"
|
||||||
import { MdDeleteOutline } from "react-icons/md"
|
import { MdDeleteOutline } from "react-icons/md"
|
||||||
import * as environment from "../environment"
|
import * as environment from "@/environment"
|
||||||
|
|
||||||
import "./Bootnodes.css"
|
import "./Bootnodes.css"
|
||||||
import { Title, Switch } from "."
|
import { Title, Switch } from "."
|
||||||
import { helper } from "@substrate/light-client-extension-helpers/extension-page"
|
import { helper } from "@substrate/light-client-extension-helpers/extension-page"
|
||||||
import { wellKnownGenesisHashByChainId } from "../constants"
|
import { wellKnownGenesisHashByChainId, networks } from "@/constants"
|
||||||
|
|
||||||
import {
|
import {
|
||||||
Select,
|
Select,
|
||||||
@ -50,7 +50,7 @@ const saveToLocalStorage = async (
|
|||||||
}
|
}
|
||||||
|
|
||||||
export const Bootnodes = () => {
|
export const Bootnodes = () => {
|
||||||
const [selectedChain, setSelectedChain] = useState<string>("casper_staging_testnet")
|
const [selectedChain, setSelectedChain] = useState<string>(networks[0].value)
|
||||||
const [defaultBn, setDefaultBn] = useState<BootnodesType[]>([])
|
const [defaultBn, setDefaultBn] = useState<BootnodesType[]>([])
|
||||||
const [customBn, setCustomBn] = useState<BootnodesType[]>([])
|
const [customBn, setCustomBn] = useState<BootnodesType[]>([])
|
||||||
const [customBnInput, setCustomBnInput] = useState<string>("")
|
const [customBnInput, setCustomBnInput] = useState<string>("")
|
||||||
@ -164,9 +164,15 @@ export const Bootnodes = () => {
|
|||||||
</SelectTrigger>
|
</SelectTrigger>
|
||||||
<SelectContent className="sm:w-[250px] w-[100%]">
|
<SelectContent className="sm:w-[250px] w-[100%]">
|
||||||
<SelectGroup>
|
<SelectGroup>
|
||||||
<SelectItem data-testid="scheme-casper_staging_testnet" value="casper_staging_testnet">
|
{networks.map(network => (
|
||||||
Casper
|
<SelectItem
|
||||||
</SelectItem>
|
key={network.chainId}
|
||||||
|
data-testid={`scheme-${network.value}`}
|
||||||
|
value={network.value}
|
||||||
|
>
|
||||||
|
{network.label}
|
||||||
|
</SelectItem>
|
||||||
|
))}
|
||||||
</SelectGroup>
|
</SelectGroup>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -177,7 +177,7 @@ export const Options: FunctionComponent = () => {
|
|||||||
>
|
>
|
||||||
<FaGithub className="w-8 h-8" />
|
<FaGithub className="w-8 h-8" />
|
||||||
<div className="block float-left text-xs text-left">
|
<div className="block float-left text-xs text-left">
|
||||||
<div className="md:block hidden text-primary">Ghost Wallet Git</div>
|
<div className="md:block hidden text-primary">GHOST Wallet Git</div>
|
||||||
<div className="text-accent">v {pckg.version}</div>
|
<div className="text-accent">v {pckg.version}</div>
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
@ -26,7 +26,7 @@ import {
|
|||||||
} from "@polkadot-labs/hdkd"
|
} from "@polkadot-labs/hdkd"
|
||||||
import React from "react"
|
import React from "react"
|
||||||
import { Header, BottomNavBar } from "../../components"
|
import { Header, BottomNavBar } from "../../components"
|
||||||
import { networks } from "./networks"
|
import { networks } from "@/constants"
|
||||||
|
|
||||||
type Scheme = "Sr25519" | "Ed25519" | "Ecdsa"
|
type Scheme = "Sr25519" | "Ed25519" | "Ecdsa"
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import {
|
|||||||
generateMnemonic,
|
generateMnemonic,
|
||||||
mnemonicToEntropy,
|
mnemonicToEntropy,
|
||||||
} from "@polkadot-labs/hdkd-helpers"
|
} from "@polkadot-labs/hdkd-helpers"
|
||||||
import { networks } from "./networks"
|
import { networks } from "@/constants"
|
||||||
import { SubmitHandler, useForm } from "react-hook-form"
|
import { SubmitHandler, useForm } from "react-hook-form"
|
||||||
import { toHex } from "@polkadot-api/utils"
|
import { toHex } from "@polkadot-api/utils"
|
||||||
import { useNavigate } from "react-router-dom"
|
import { useNavigate } from "react-router-dom"
|
||||||
|
@ -20,7 +20,7 @@ import {
|
|||||||
ed25519CreateDerive,
|
ed25519CreateDerive,
|
||||||
sr25519CreateDerive,
|
sr25519CreateDerive,
|
||||||
} from "@polkadot-labs/hdkd"
|
} from "@polkadot-labs/hdkd"
|
||||||
import { networks } from "./networks"
|
import { networks } from "@/constants"
|
||||||
import { Layout2 } from "@/components/Layout2"
|
import { Layout2 } from "@/components/Layout2"
|
||||||
import { BottomNavBar, Header } from "../../components"
|
import { BottomNavBar, Header } from "../../components"
|
||||||
import { Button } from "@/components/ui/button"
|
import { Button } from "@/components/ui/button"
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
export type Network = {
|
|
||||||
chainId: string
|
|
||||||
label: string
|
|
||||||
value: string
|
|
||||||
logo: string
|
|
||||||
prefix: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export const networks: Network[] = [
|
|
||||||
{
|
|
||||||
chainId: "0x07074eb5f47a6f4dd70430674e5174d5414bc055292b90392fb6f0a28c7524d1",
|
|
||||||
value: "casper_staging_testnet",
|
|
||||||
label: "Casper",
|
|
||||||
logo: "https://cryptologos.cc/logos/ghostchain-logo.svg",
|
|
||||||
prefix: 1996,
|
|
||||||
}
|
|
||||||
]
|
|
@ -46,7 +46,7 @@ export const Welcome = () => {
|
|||||||
<li className="flex items-center gap-3">
|
<li className="flex items-center gap-3">
|
||||||
<Signal className="w-8 h-8 text-primary" aria-hidden="true" />
|
<Signal className="w-8 h-8 text-primary" aria-hidden="true" />
|
||||||
<p className="ml-3 text-base">
|
<p className="ml-3 text-base">
|
||||||
Be connected to the Ghost and Casper networks from your browser
|
Be connected to the GHOST and CASPER networks from your browser
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
<li className="flex items-center gap-3">
|
<li className="flex items-center gap-3">
|
||||||
@ -64,7 +64,7 @@ export const Welcome = () => {
|
|||||||
<li className="flex items-center gap-3">
|
<li className="flex items-center gap-3">
|
||||||
<GlobeLock className="w-8 h-8 text-primary" aria-hidden="true" />
|
<GlobeLock className="w-8 h-8 text-primary" aria-hidden="true" />
|
||||||
<p className="ml-3 text-base">
|
<p className="ml-3 text-base">
|
||||||
Make your browser be part of the Ghost and Casper networks
|
Make your browser be part of the GHOST and CASPER networks
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -16,7 +16,7 @@ import type { InPageRpcSpec } from "./types"
|
|||||||
|
|
||||||
const PROVIDER_INFO = {
|
const PROVIDER_INFO = {
|
||||||
uuid: crypto.randomUUID(),
|
uuid: crypto.randomUUID(),
|
||||||
name: "Ghost Wallet Browser Extension",
|
name: "GHOST Wallet Browser Extension",
|
||||||
icon: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>",
|
icon: "data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'/>",
|
||||||
rdns: "io.ghostchain.GhostWalletExtension",
|
rdns: "io.ghostchain.GhostWalletExtension",
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user