change network names and remove hardcoded chain data

Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
This commit is contained in:
Uncle Fatso 2025-08-12 19:33:17 +03:00
parent eff6e61a39
commit 74f922fd3e
Signed by: f4ts0
GPG Key ID: 565F4F2860226EBB
13 changed files with 32 additions and 43 deletions

View File

@ -1,8 +1,8 @@
{
"author": "Ghost Team <someone@ghostchain.io>",
"description": "Wallet for Ghost and Casper blockchains light clients",
"homepage_url": "https://github.com/ghostchain/ghost-wallet",
"name": "Ghost Wallet",
"author": "GHOST Team <someone@ghostchain.io>",
"description": "Wallet for GHOST and Casper blockchains light clients",
"homepage_url": "https://git.ghostchain.io/ghostchain/ghost-extension-wallet",
"name": "GHOST Wallet",
"short_name": "ghost-wallet",
"version": "0.0.0",
"manifest_version": 3,
@ -12,7 +12,7 @@
"type": "module"
},
"action": {
"default_title": "Ghost Wallet",
"default_title": "GHOST Wallet",
"default_popup": "ui/assets/wallet-popup.html"
},
"options_ui": {

View File

@ -1,8 +1,8 @@
{
"author": "Ghost Team <someone@ghostchain.io>",
"description": "Wallet for Ghost and Casper blockchains light clients",
"homepage_url": "https://github.com/ghostchain/ghost-wallet",
"name": "Ghost Wallet",
"author": "GHOST Team <someone@ghostchain.io>",
"description": "Wallet for GHOST and Casper blockchains light clients",
"homepage_url": "https://git.ghostchain.io/ghostchain/ghost-extension-wallet",
"name": "GHOST Wallet",
"short_name": "ghost-wallet",
"version": "0.0.0",
"manifest_version": 3,
@ -12,7 +12,7 @@
"type": "module"
},
"action": {
"default_title": "Ghost Wallet",
"default_title": "GHOST Wallet",
"default_popup": "ui/assets/wallet-popup.html"
},
"options_ui": {

View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Ghost Wallet Options</title>
<title>GHOST Wallet Options</title>
<meta charset="utf-8" />
</head>
<body style="background-color: #f9f9f9">

View File

@ -1,7 +1,7 @@
<!doctype html>
<html>
<head>
<title>Ghost Wallet</title>
<title>GHOST Wallet</title>
<meta charset="utf-8" />
</head>
<body>

View File

@ -1,6 +1,6 @@
{
"name": "ghost-wallet",
"version": "0.1.0",
"version": "0.1.1",
"description": "Browser extension to manage ghost blockchain light clients.",
"main": "dist/src/index.js",
"author": "Uncle f4ts0 <f4ts0@ghostchain.io>",

View File

@ -1,11 +1,11 @@
import { useEffect, useState } from "react"
import { MdDeleteOutline } from "react-icons/md"
import * as environment from "../environment"
import * as environment from "@/environment"
import "./Bootnodes.css"
import { Title, Switch } from "."
import { helper } from "@substrate/light-client-extension-helpers/extension-page"
import { wellKnownGenesisHashByChainId } from "../constants"
import { wellKnownGenesisHashByChainId, networks } from "@/constants"
import {
Select,
@ -50,7 +50,7 @@ const saveToLocalStorage = async (
}
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 [customBn, setCustomBn] = useState<BootnodesType[]>([])
const [customBnInput, setCustomBnInput] = useState<string>("")
@ -164,9 +164,15 @@ export const Bootnodes = () => {
</SelectTrigger>
<SelectContent className="sm:w-[250px] w-[100%]">
<SelectGroup>
<SelectItem data-testid="scheme-casper_staging_testnet" value="casper_staging_testnet">
Casper
{networks.map(network => (
<SelectItem
key={network.chainId}
data-testid={`scheme-${network.value}`}
value={network.value}
>
{network.label}
</SelectItem>
))}
</SelectGroup>
</SelectContent>
</Select>

View File

@ -177,7 +177,7 @@ export const Options: FunctionComponent = () => {
>
<FaGithub className="w-8 h-8" />
<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>
</Link>

View File

@ -26,7 +26,7 @@ import {
} from "@polkadot-labs/hdkd"
import React from "react"
import { Header, BottomNavBar } from "../../components"
import { networks } from "./networks"
import { networks } from "@/constants"
type Scheme = "Sr25519" | "Ed25519" | "Ecdsa"

View File

@ -5,7 +5,7 @@ import {
generateMnemonic,
mnemonicToEntropy,
} from "@polkadot-labs/hdkd-helpers"
import { networks } from "./networks"
import { networks } from "@/constants"
import { SubmitHandler, useForm } from "react-hook-form"
import { toHex } from "@polkadot-api/utils"
import { useNavigate } from "react-router-dom"

View File

@ -20,7 +20,7 @@ import {
ed25519CreateDerive,
sr25519CreateDerive,
} from "@polkadot-labs/hdkd"
import { networks } from "./networks"
import { networks } from "@/constants"
import { Layout2 } from "@/components/Layout2"
import { BottomNavBar, Header } from "../../components"
import { Button } from "@/components/ui/button"

View File

@ -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,
}
]

View File

@ -46,7 +46,7 @@ export const Welcome = () => {
<li className="flex items-center gap-3">
<Signal className="w-8 h-8 text-primary" aria-hidden="true" />
<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>
</li>
<li className="flex items-center gap-3">
@ -64,7 +64,7 @@ export const Welcome = () => {
<li className="flex items-center gap-3">
<GlobeLock className="w-8 h-8 text-primary" aria-hidden="true" />
<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>
</li>
</ul>

View File

@ -16,7 +16,7 @@ import type { InPageRpcSpec } from "./types"
const PROVIDER_INFO = {
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'/>",
rdns: "io.ghostchain.GhostWalletExtension",
}