Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions composables/useIcon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ export const useIcon = () => {
return isDarkMode.value ? '/chain/ahk_dark.svg' : '/chain/ahk.svg'
case 'base':
return isDarkMode.value ? '/chain/base_dark.svg' : '/chain/base.svg'
case 'mnt':
return isDarkMode.value ? '/chain/mnt_dark.svg' : '/chain/mnt.svg'
default:
return null
}
Expand Down
4 changes: 0 additions & 4 deletions composables/useMultipleBalance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ export const networkToPrefix: Partial<Record<ChainType, Prefix>> = {
kusamaHub: 'ahk',
polkadotHub: 'ahp',
base: 'base',
mantle: 'mnt',
// rococoHub: 'ahr',
}

Expand All @@ -29,7 +28,6 @@ export const prefixToNetwork: Partial<Record<Prefix, ChainType>> = {
ahk: 'kusamaHub',
ahp: 'polkadotHub',
base: 'base',
mnt: 'mantle',
// ahr: 'rococoHub',
}

Expand Down Expand Up @@ -82,8 +80,6 @@ export default function (refetchPeriodically: boolean = false) {
// decouple Chain from teleport
[Chain.BASE]:
multiBalances.value.chains.base?.eth?.nativeBalance,
[Chain.MANTLE]:
multiBalances.value.chains.mantle?.mnt?.nativeBalance,
}))

const currentChain = computed(() => prefixToChainMap[urlPrefix.value])
Expand Down
6 changes: 0 additions & 6 deletions libs/static/src/chains.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export const CHAINS: Config<ChainProperties> = {
dot: toChainProperty(0, 10, 'DOT', 'https://polkadot.subscan.io/', 'SUB'),
ahp: toChainProperty(0, 10, 'DOT', 'https://assethub-polkadot.subscan.io/', 'SUB'),
base: toChainProperty(42, 18, 'ETH', 'https://basescan.org', 'EVM'),
mnt: toChainProperty(42, 18, 'MNT', 'https://mantlescan.xyz', 'EVM'), // ss58Format is not available
// ahr: toChainProperty(42, 12, 'ROC', 'https://rockmine.subscan.io/'),
// movr: toChainProperty(1285, 18, 'MOVR', 'https://moonriver.subscan.io/'),
// glmr: toChainProperty(1284, 18, 'GLMR', 'https://moonbeam.subscan.io/'),
Expand All @@ -50,7 +49,6 @@ export const chainPrefixes: Prefix[] = [
'ksm',
'dot',
'base',
'mnt',
// 'ahr',
// 'movr',
// 'glmr',
Expand All @@ -69,7 +67,6 @@ export const chainInfo: Record<Prefix, string> = {
dot: 'polkadot',
ahp: 'statemint',
base: 'base',
mnt: 'mantle',
// ahr: 'rockmine',
// movr: 'moonriver',
// glmr: 'moonbeam',
Expand All @@ -81,7 +78,6 @@ export const chainNames: Record<Prefix, string> = {
dot: 'Polkadot',
ahp: 'Polkadot AssetHub',
base: 'Base',
mnt: 'Mantle',
// ahr: 'Rococo AssetHub',
// movr: 'Moonriver',
// glmr: 'Moonbeam',
Expand All @@ -107,7 +103,6 @@ export const teleportExistentialDeposit: Record<Prefix, number> = {
dot: 15000000000,
ahp: 5000000000,
base: 0,
mnt: 0,
}

export const existentialDeposit: Record<Prefix, number> = {
Expand All @@ -116,5 +111,4 @@ export const existentialDeposit: Record<Prefix, number> = {
dot: 1e10,
ahp: 1e8,
base: 1e15,
mnt: 1e15,
}
2 changes: 0 additions & 2 deletions libs/static/src/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ export const ALTERNATIVE_ENDPOINT_MAP: Config<ENDPOINT_URL[]> = {
dot: POLKADOT_ENDPOINTS,
ahp: AHP_ENDPOINTS,
base: ['https://mainnet.base.org'],
mnt: ['https://rpc.mantle.xyz'],
// ahr: ['wss://rococo-asset-hub-rpc.polkadot.io'],
// glmr: ['wss://public-rpc.pinknode.io/moonbeam'],
// movr: ['wss://wss.api.moonriver.moonbeam.network'],
Expand All @@ -54,7 +53,6 @@ export const ENDPOINT_MAP: Config<ENDPOINT_URL> = {
dot: POLKADOT_ENDPOINTS[0],
ahp: AHP_ENDPOINTS[0],
base: 'https://mainnet.base.org',
mnt: 'https://rpc.mantle.xyz',
// ahr: 'wss://rococo-asset-hub-rpc.polkadot.io',
// glmr: 'wss://public-rpc.pinknode.io/moonbeam',
// movr: 'wss://wss.api.moonriver.moonbeam.network',
Expand Down
1 change: 0 additions & 1 deletion libs/static/src/indexers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const INDEXERS: Config<SquidEndpoint> = {
ahp: 'https://ahp.gql.api.kodadot.xyz/',
dot: 'https://ahp.gql.api.kodadot.xyz/', // DEV: show PolkadotHub
base: 'https://kodadot.squids.live/basick/graphql',
mnt: 'https://squid.subsquid.io/flock/graphql',
// ahr: 'https://squid.subsquid.io/snack/graphql',
// movr: 'https://squid.subsquid.io/antick/v/001-rc0/graphql',
// glmr: 'https://squid.subsquid.io/click/v/002/graphql',
Expand Down
1 change: 0 additions & 1 deletion libs/static/src/names.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export const NAMES: Record<Prefix, string> = {
dot: 'Polkadot',
ahp: 'PolkadotHub',
base: 'Base',
mnt: 'Mantle',
// ahr: 'RococoHub',
// glmr: 'Moonbeam [Beta]',
// movr: 'Moonriver [Beta]',
Expand Down
1 change: 0 additions & 1 deletion libs/static/src/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export const EXPLORERS: Record<Prefix, string> = {
dot: 'https://polkadot.subscan.io/account/',
ahp: 'https://assethub-polkadot.subscan.io/account/',
base: 'https://basescan.org/address/',
mnt: 'https://mantlescan.xyz/address/',
// ahr: 'https://assethub-rococo.subscan.io/account/',
// movr: 'https://moonriver.subscan.io/account/',
// glmr: 'https://moonbeam.subscan.io/account/',
Expand Down
2 changes: 1 addition & 1 deletion libs/static/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export type Prefix = 'ksm' | 'ahk' | 'dot' | 'ahp' | 'base' | 'mnt'
export type Prefix = 'ksm' | 'ahk' | 'dot' | 'ahp' | 'base'
// | 'ahr'
// | 'glmr'
// | 'movr'
Expand Down
4 changes: 2 additions & 2 deletions plugins/wagmi.client.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { WagmiPlugin } from '@wagmi/vue'
import { defineNuxtPlugin } from 'nuxt/app'
import { base, mantle } from '@wagmi/vue/chains'
import { base } from '@wagmi/vue/chains'
import { defaultWagmiConfig } from '@web3modal/wagmi/vue'

export default defineNuxtPlugin((nuxtApp) => {
Expand All @@ -13,7 +13,7 @@ export default defineNuxtPlugin((nuxtApp) => {
}

return defaultWagmiConfig({
chains: [base, mantle],
chains: [base],
projectId,
metadata,
})
Expand Down
3 changes: 0 additions & 3 deletions public/chain/mnt.svg

This file was deleted.

3 changes: 0 additions & 3 deletions public/chain/mnt_dark.svg

This file was deleted.

7 changes: 1 addition & 6 deletions stores/fiat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export const useFiatStore = defineStore('fiat', {
ethereum: {
usd: null,
},
mantle: {
usd: null,
},
},
}),
getters: {
Expand All @@ -45,8 +42,6 @@ export const useFiatStore = defineStore('fiat', {
return state.fiatPrice.polkadot.usd
case 'ETH':
return state.fiatPrice.ethereum.usd
case 'MNT':
return state.fiatPrice.mantle.usd
default:
return 0
}
Expand All @@ -59,7 +54,7 @@ export const useFiatStore = defineStore('fiat', {
}

const prices = await Promise.all(
(['kusama', 'polkadot', 'ethereum', 'mantle'] as TokenName[]).map(getPrice),
(['kusama', 'polkadot', 'ethereum'] as TokenName[]).map(getPrice),
)
prices.forEach((price) => {
this.fiatPrice = Object.assign({}, this.fiatPrice, price)
Expand Down
5 changes: 1 addition & 4 deletions stores/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ const DEFAULT_BALANCE_STATE = {
dot: '0',
ahp: '0',
eth: '0',
mnt: '0',
// ahr: '0',
// glmr: '0',
// movr: '0',
Expand All @@ -31,7 +30,6 @@ export type ChainType =
| 'kusamaHub'
| 'polkadotHub'
| 'base'
| 'mantle'
// | 'rococoHub'

type ChainDetail = {
Expand All @@ -41,7 +39,7 @@ type ChainDetail = {
selected: boolean
address: string
}
export type ChainToken = Partial<Record<'dot' | 'ksm' | 'eth' | 'mnt', ChainDetail>>
export type ChainToken = Partial<Record<'dot' | 'ksm' | 'eth', ChainDetail>>

interface MultiBalances {
address: string
Expand Down Expand Up @@ -102,7 +100,6 @@ export const useIdentityStore = defineStore('identity', {
{ chain: 'polkadot', token: 'DOT' },
{ chain: 'polkadotHub', token: 'DOT' },
{ chain: 'base', token: 'ETH' },
{ chain: 'mantle', token: 'MNT' },
],
multiBalanceAssetsTestnet: [
// { chain: 'rococoHub', token: 'ROC' },
Expand Down
5 changes: 2 additions & 3 deletions utils/coinprice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,13 @@ export const getPrice = async (id: string): Promise<GetPrice> => {
return emptyPrice
}

export type Token = 'KSM' | 'DOT' | 'ETH' | 'MNT'
export type TokenName = 'kusama' | 'polkadot' | 'ethereum' | 'mantle'
export type Token = 'KSM' | 'DOT' | 'ETH'
export type TokenName = 'kusama' | 'polkadot' | 'ethereum'
// tokenMap but reversed
const tokenMap: Record<Token, TokenName> = {
KSM: 'kusama',
DOT: 'polkadot',
ETH: 'ethereum',
MNT: 'mantle',
}

export const getApproximatePriceOf = async (id: string): Promise<number> => {
Expand Down
9 changes: 1 addition & 8 deletions utils/teleport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ export enum Chain {
ASSETHUBPOLKADOT = 'AssetHubPolkadot',
POLKADOT = 'Polkadot',
BASE = 'Base',
MANTLE = 'Mantle',
}

export type TeleportChain = {
Expand Down Expand Up @@ -47,7 +46,6 @@ export const chainToPrefixMap: Record<Chain, Prefix> = {
[Chain.ASSETHUBPOLKADOT]: 'ahp',
[Chain.POLKADOT]: 'dot',
[Chain.BASE]: 'base',
[Chain.MANTLE]: 'mnt',
}

export const prefixToChainMap: Partial<Record<Prefix, Chain>> = {
Expand All @@ -56,7 +54,6 @@ export const prefixToChainMap: Partial<Record<Prefix, Chain>> = {
ahp: Chain.ASSETHUBPOLKADOT,
dot: Chain.POLKADOT,
base: Chain.BASE,
mnt: Chain.MANTLE,
}

const getApi = (chain: Chain) => {
Expand Down Expand Up @@ -118,7 +115,7 @@ export const getTransactionFee = async ({
return info.partialFee.toString()
}

export type Currency = 'KSM' | 'DOT' | 'ETH' | 'MNT'
export type Currency = 'KSM' | 'DOT' | 'ETH'

export const getChainCurrency = (chain: Chain): Currency => {
switch (chain) {
Expand All @@ -128,9 +125,6 @@ export const getChainCurrency = (chain: Chain): Currency => {
case Chain.POLKADOT:
case Chain.ASSETHUBPOLKADOT:
return 'DOT'
case Chain.BASE:
case Chain.MANTLE:
return 'MNT'
}
}

Expand All @@ -139,6 +133,5 @@ export const chainToPrecisionMap: Record<Chain, number> = {
[Chain.ASSETHUBKUSAMA]: 6,
[Chain.ASSETHUBPOLKADOT]: 5,
[Chain.BASE]: 5,
[Chain.MANTLE]: 5,
[Chain.POLKADOT]: 4,
}
4 changes: 1 addition & 3 deletions utils/viem.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type { Prefix } from '@kodadot1/static'
import { base, mantle } from '@wagmi/vue/chains'
import { base } from '@wagmi/vue/chains'
import { type Chain } from 'viem'

export const CHAIN_ID_TO_PREFIX: Record<number, Prefix> = {
[base.id]: 'base',
[mantle.id]: 'mnt',
}

export const PREFIX_TO_CHAIN: Partial<Record<Prefix, Chain>> = {
base: base,
mnt: mantle,
}