Skip to content

Commit

Permalink
Updates for gm-frontend tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikbratashchuk committed May 11, 2024
1 parent fd058bb commit 75a9b4c
Show file tree
Hide file tree
Showing 10 changed files with 15,568 additions and 1,722 deletions.
5 changes: 1 addition & 4 deletions components/wallet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ import { ChainName } from '@cosmos-kit/core';

const allowedChains = [
'gmrollup',
'celestiatestnet',
'celestiatestnet2',
'celestiatestnet3',
];

export const WalletSection = ({
Expand Down Expand Up @@ -133,7 +130,7 @@ export const WalletSection = ({
);

useEffect(() => {
setChainName?.(window.localStorage.getItem('selected-chain') || 'osmosis');
setChainName?.(window.localStorage.getItem('selected-chain'));
}, [setChainName]);

const onChainChange: handleSelectChainDropdown = async (
Expand Down
15 changes: 5 additions & 10 deletions config/assetlist.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,23 @@
export const assetlist = {
"$schema": "../../assetlist.schema.json",
"chain_name": "gmrollup",
"chain_name": "gm-rollup",
"chain-id": "gm",
"assets": [
{
"description": "",
"description": "The native token of the gm rollup chain.",
"denom_units": [
// is there also a ustake?
{
"denom": "ustake",
"exponent": 0
},
{
"denom": "stake",
"exponent": 6
}
],
// "base": "ustake", // is this correct instead of `stake`?
"base": "stake",
"name": "GM rollup",
"name": "gm rollup token",
"display": "stake",
"symbol": "STAKE",
"logo_URIs": {
"svg": "https://raw.githubusercontent.com/jcstein/gm-portal/b030ce3fe548d188fbacb6b932d7e51dc7afd65e/frontend/public/gm.svg"
}
}
]
}
}
51 changes: 4 additions & 47 deletions config/chain.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export const chain = {
"$schema": "../../chain.schema.json",
"chain_name": "gmrollup",
"chain_name": "gm-rollup",
"chain_id": "gm",
"pretty_name": "my gm rollup",
"pretty_name": "gm-world rollup",
"status": "live",
"network_type": "testnet",
"bech32_prefix": "gm",
Expand All @@ -15,47 +15,11 @@ export const chain = {
"fees": {
"fee_tokens": [
{
"denom": "ustake", // should this be `stake`?
"denom": "stake",
"fixed_min_gas_price": 0
}
]
},
// "fees": {
// "fee_tokens": [
// {
// "denom": "utia",
// "fixed_min_gas_price": 0
// }
// ]
// },
// "codebase": {
// "git_repo": "https://github.com/celestiaorg/celestia-app",
// "recommended_version": "v0.12.0",
// "compatible_versions": [
// "v0.12.0"
// ],
// "genesis": {
// "genesis_url": "https://raw.githubusercontent.com/celestiaorg/networks/master/blockspacerace/genesis.json"
// },
// "versions": [
// {
// "name": "v0.12.0",
// "recommended_version": "v0.12.0",
// "compatible_versions": [
// "v0.12.0"
// ]
// }
// ]
// },
// "peers": {
// "seeds": [
// {
// "id": "f97a75fb69d3a5fe893dca7c8d238ccc0bd66a8f",
// "address": "celestia-blockspacerace.seed.brocha.in:30583",
// "provider": "Brochain"
// }
// ]
// },
"apis": {
"rpc": [
{
Expand All @@ -71,11 +35,4 @@ export const chain = {
]
},
"beta": true,
// "explorers": [
// {
// "kind": "Mintscan",
// "url": "https://testnet.mintscan.io/celestia-incentivized-testnet",
// "tx_page": "https://testnet.mintscan.io/celestia-incentivized-testnet/txs/${txHash}"
// }
// ]
}
}
4 changes: 3 additions & 1 deletion config/defaults.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
export const CHAIN_NAME = 'gm-rollup';

import { assets } from 'chain-registry';
import { AssetList, Asset } from '@chain-registry/types';

export const defaultChainName = 'gmrollup';
export const defaultChainName = 'gm-rollup';

export const getChainAssets = (chainName: string = defaultChainName) => {
return assets.find((chain) => chain.chain_name === chainName) as AssetList;
Expand Down
Loading

0 comments on commit 75a9b4c

Please sign in to comment.