add genesis L1

This commit is contained in:
liangping 2021-12-05 10:07:39 +08:00
parent 00c0d1147c
commit 838971bbbe
3 changed files with 13 additions and 2 deletions

View File

@ -0,0 +1,8 @@
{
"chain_name": "genesisL1",
"coingecko": "genesisL1",
"api": "https://api.genesisl1.org",
"sdk_version": "0.42.4",
"addr_prefix": "genesis",
"logo": "https://raw.githubusercontent.com/alpha-omega-labs/bashscripts/main/genesisl1.png"
}

View File

@ -28,6 +28,7 @@
"injective": "Injective Protocal", "injective": "Injective Protocal",
"vidulum": "Vidulum", "vidulum": "Vidulum",
"kichain": "KI Chain", "kichain": "KI Chain",
"genesisL1": "Genesis L1",
"staking": "Staking", "staking": "Staking",
"governance": "Governance", "governance": "Governance",

View File

@ -280,6 +280,8 @@ export function formatTokenDenom(tokenDenom) {
denom = 'IBC...' denom = 'IBC...'
} else if (denom.startsWith('NANOLIKE')) { } else if (denom.startsWith('NANOLIKE')) {
denom = 'LIKE' denom = 'LIKE'
} else if (denom.startsWith('APHOTON')) {
denom = 'PHOTON'
} }
return denom return denom
@ -291,7 +293,7 @@ export function getUnitAmount(amount, denom) {
if (denom.startsWith('basecro')) { if (denom.startsWith('basecro')) {
return String((Number(amount) * 100000000).toFixed()) return String((Number(amount) * 100000000).toFixed())
} }
if (denom.startsWith('rowan')) { if (denom.startsWith('rowan') || denom.startsWith('aphoton')) {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
return (BigInt(amount) * 1000000000000000000n).toString() return (BigInt(amount) * 1000000000000000000n).toString()
} }
@ -308,7 +310,7 @@ export function formatTokenAmount(tokenAmount, fraction = 2, denom = 'uatom') {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n) amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n)
// } // }
} else if (denom.startsWith('rowan')) { } else if (denom === 'rowan' || denom === 'aphoton') {
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n) amount = Number(BigInt(Number(tokenAmount)) / 1000000000000000000n)
// } // }