Merge branch 'master' into trade

# Conflicts:
#	src/store/chains/index.js
This commit is contained in:
liangping 2021-11-19 09:28:23 +08:00
commit 7e29fd9c14
35 changed files with 109 additions and 6 deletions

View File

@ -10,8 +10,10 @@ on:
jobs:
deploy:
name: Ping deploy
runs-on: self-hosted
runs-on: mainnet
steps:
- name: print
run: echo ${GITHUB_REF#refs/heads/}
- name: Git Checkout Latest
uses: actions/checkout@v2

27
.github/workflows/testnet-deploy.yaml vendored Normal file
View File

@ -0,0 +1,27 @@
name: Ping Deploy
on:
push:
branches: [ testnet ]
pull_request:
branches: [ testnet ]
jobs:
deploy:
name: Ping deploy
runs-on: testnet
steps:
- name: print
run: echo ${GITHUB_REF#refs/heads/}
- name: Git Checkout Latest
uses: actions/checkout@v2
- name: Install
run: yarn install
- name: Build
run: yarn run vue-cli-service build
- name: Deploy
run: cp -rf ./dist/* /var/www/html/

View File

@ -1,5 +1,6 @@
{
"chain_name": "akash-network",
"coingecko": "akash-network",
"api": "https://akash.api.ping.pub",
"sdk_version": "0.41.3",
"addr_prefix": "akash",

View File

@ -1,5 +1,6 @@
{
"chain_name": "band-protocol",
"coingecko": "band-protocol",
"api": "https://laozi1.bandchain.org/api",
"addr_prefix": "band",
"logo": "https://dl.airtable.com/.attachments/472ae99a508e32b4439b416beddd4eb9/c5166f62/band-symbol-blue-bg.75a3ad91.svg",

View File

@ -1,5 +1,6 @@
{
"chain_name": "bitsong",
"coingecko": "bitsong",
"api": "https://lcd.explorebitsong.com",
"addr_prefix": "bitsong",
"logo": "https://dl.airtable.com/.attachments/8016b71b69fb108f0ff33eb9af1c943f/f5fe4ef4/bitsong.svg",

View File

@ -1,6 +1,7 @@
{
"chain_name": "certik",
"coingecko": "certik",
"api":"https://azuredragon.noopsbycertik.com",
"sdk_version": "0.42.9",
"addr_prefix": "certik",

View File

@ -1,5 +1,6 @@
{
"chain_name": "cosmos",
"coingecko": "cosmos",
"api":"https://cosmos.api.ping.pub",
"sdk_version": "0.42.6",
"addr_prefix": "cosmos",

View File

@ -1,6 +1,7 @@
{
"chain_name": "crypto-com-chain",
"coingecko": "crypto-com-chain",
"api": "https://mainnet.crypto.org:1317",
"sdk_version": "0.39.2",
"addr_prefix": "cro",

View File

@ -1,5 +1,6 @@
{
"chain_name": "desmos",
"coingecko": "",
"api": "https://api.mainnet.desmos.network",
"sdk_version": "0.42.0",
"addr_prefix": "desmos",

View File

@ -1,5 +1,6 @@
{
"chain_name": "e-money",
"coingecko": "e-money",
"api": "https://emoney.validator.network/api",
"addr_prefix": "emoney",
"logo": "https://dl.airtable.com/.attachments/276e4d6de567b073a5e400240d7d83e9/9bb49806/yoR2r25W_400x400.jpg",

View File

@ -1,5 +1,6 @@
{
"chain_name": "injective",
"coingecko": "injective-protocol",
"api": "https://lcd.injective.network",
"sdk_version": "0.42.4",
"addr_prefix": "inj",

View File

@ -1,5 +1,6 @@
{
"chain_name": "iris-network",
"coingecko": "iris-network",
"api": "https://iris.api.ping.pub",
"sdk_version": "0.42.4",
"addr_prefix": "iaa",

View File

@ -1,5 +1,6 @@
{
"chain_name": "juno",
"coingecko": "juno-network",
"api": "https://juno.api.ping.pub",
"sdk_version": "0.42.4",
"addr_prefix": "juno",

View File

@ -1,5 +1,6 @@
{
"chain_name": "kava",
"coingecko": "kava",
"api": "https://api.data.kava.io",
"sdk_version": "0.39.2",
"addr_prefix": "kava",

View File

@ -0,0 +1,8 @@
{
"chain_name": "kichain",
"coingecko": "ki",
"api": "https://ki.api.ping.pub",
"sdk_version": "0.42.10",
"addr_prefix": "ki",
"logo": "https://dl.airtable.com/.attachments/b1f670d31bf69d7ca9906df8437d91a7/b2667ad1/ki.png"
}

View File

@ -1,5 +1,6 @@
{
"chain_name": "likecoin",
"coingecko": "likecoin",
"api": "https://mainnet-node.like.co",
"sdk_version": "0.42.0",
"addr_prefix": "cosmos",

View File

@ -1,5 +1,6 @@
{
"chain_name": "okexchain",
"coingecko": "okexchain",
"api": "https://exchainrpc.okex.org/okexchain/v1",
"sdk_version": "0.39.2",
"addr_prefix": "ex",

View File

@ -1,5 +1,6 @@
{
"chain_name": "osmosis",
"coingecko": "osmosis",
"api": "https://lcd-osmosis.keplr.app",
"sdk_version": "0.42.5",
"addr_prefix": "osmo",

View File

@ -1,5 +1,6 @@
{
"chain_name": "persistence",
"coingecko": "persistence",
"api": "https://rest.core.persistence.one",
"sdk_version": "0.42.4",
"addr_prefix": "persistence",

View File

@ -1,5 +1,6 @@
{
"chain_name": "regen",
"coingecko": "regen",
"api": "https://regen.api.ping.pub",
"sdk_version": "0.42.4",
"addr_prefix": "regen",

View File

@ -1,5 +1,6 @@
{
"chain_name": "secret",
"coingecko": "secret",
"api": "https://api.scrt.network",
"sdk_version": "0.33.8",
"addr_prefix": "secret",

View File

@ -1,5 +1,6 @@
{
"chain_name": "sentinel",
"coingecko": "sentinel",
"api": "https://lcd.sentinel.co",
"sdk_version": "0.42.6",
"addr_prefix": "sent",

View File

@ -1,5 +1,6 @@
{
"chain_name": "sifchain",
"coingecko": "sifchain",
"api": "https://api.sifchain.finance",
"sdk_version": "0.42.6",
"addr_prefix": "sif",

View File

@ -1,5 +1,6 @@
{
"chain_name": "stargaze",
"coingecko": "stargaze-protocol",
"api": "https://rest.stargaze.publicawesome.dev",
"sdk_version": "0.44.3",
"addr_prefix": "stars",

View File

@ -1,5 +1,6 @@
{
"chain_name": "starname",
"coingecko": "starname",
"api": "https://api.iov-mainnet-ibc.iov.one",
"sdk_version": "0.42.6",
"addr_prefix": "star",

View File

@ -1,5 +1,6 @@
{
"chain_name": "terra-luna",
"coingecko": "terra-luna",
"api": "https://fcd.terra.dev",
"sdk_version": "0.44.2",
"addr_prefix": "terra",

View File

@ -1,6 +1,7 @@
{
"chain_name": "vidulum",
"api": "https://mainnet-lcd.vidulum.app/",
"coingecko": "vidulum",
"api": "https://mainnet-lcd.vidulum.app",
"sdk_version": "0.44.0",
"addr_prefix": "vdl",
"logo": "/logos/VDL.png"

View File

@ -27,6 +27,7 @@
"stargaze": "Stargaze",
"injective": "Injective Protocal",
"vidulum": "Vidulum",
"kichain": "KI Chain",
"staking": "Staking",
"governance": "Governance",

View File

@ -321,6 +321,11 @@ export function formatTokenAmount(tokenAmount, fraction = 2, denom = 'uatom') {
return parseFloat(amount)
}
export function isTestnet() {
return (window.location.hostname.startsWith('testnet')
|| window.location.search.indexOf('testnet') > -1)
}
export function formatToken(token, IBCDenom = {}, decimals = 2) {
if (token) {
return `${formatTokenAmount(token.amount, decimals, token.denom)} ${formatTokenDenom(IBCDenom[token.denom] || token.denom)}`

View File

@ -355,7 +355,10 @@ export default class ChainFetch {
async getMarketChart(days = 14, coin = null) {
const conf = this.getSelectedConfig()
const currency = getUserCurrency()
return ChainFetch.fetch(' https://api.coingecko.com', `/api/v3/coins/${coin || conf.chain_name}/market_chart?vs_currency=${currency}&days=${days}`)
if (conf.coingecko && conf.coingecko.length > 0) {
return ChainFetch.fetch(' https://api.coingecko.com', `/api/v3/coins/${coin || conf.coingecko}/market_chart?vs_currency=${currency}&days=${days}`)
}
return null
}
// CoinMarketCap

View File

@ -1,4 +1,5 @@
import store from '@/store'
import { isTestnet } from '../../libs/data/data'
const modules = [
{
@ -71,6 +72,36 @@ function processMenu() {
menu.children = children
chainMenus.push(menu)
})
chainMenus.push({ header: 'LINKS' })
if (isTestnet()) {
chainMenus.push({
title: 'Mainnet Explorer',
href: 'https://ping.pub',
icon: 'ChromeIcon',
})
} else {
chainMenus.push({
title: 'Testnet Explorer',
href: 'http://testnet.ping.pub',
icon: 'LifeBuoyIcon',
})
}
chainMenus.push({
title: 'Discord',
href: 'https://discord.gg/CmjYVSr6GW',
icon: 'EyeIcon',
})
chainMenus.push({
title: 'Twitter',
href: 'https://twitter.com/ping_pub',
icon: 'TwitterIcon',
})
chainMenus.push({
title: 'Github',
href: 'https://github.com/ping-pub/explorer',
icon: 'GithubIcon',
})
return chainMenus
}

View File

@ -1,7 +1,9 @@
import { isTestnet } from '@/libs/data/data'
let chains = {}
let configs = require.context('../../chains/mainnet', false, /\.json$/)
if (window.location.hostname.startsWith('testnet') || window.location.search.indexOf('testnet') > -1) {
if (isTestnet()) {
configs = require.context('../../chains/testnet', false, /\.json$/)
}

View File

@ -14,7 +14,7 @@
class="mb-1"
>
<b-button
:href="`./uptime/my`"
to="./uptime/my"
variant="primary"
>
Browse favourate only

View File

@ -51,7 +51,7 @@ export default {
const validators = []
pinned[x].forEach(address => {
const val = cached.find(v => address === consensusPubkeyToHexAddress(v.consensus_pubkey))
validators.push({ address, validator: val.description })
if (val) validators.push({ address, validator: val.description })
})
chainVals[x] = validators
})