From cbbb6e7a7976ae4763d5c7231fd25086820cc495 Mon Sep 17 00:00:00 2001 From: AlexanderNtk Date: Fri, 28 Jun 2024 11:25:22 +0000 Subject: [PATCH] Apply automatic changes --- README.md | 2 +- chains/README.md | 4 +- chains/mainnet/axelar.json | 74 ++++++++++++++ index.html | 2 +- pingpub.commit | 2 +- src/layouts/components/NavBarWallet.vue | 16 ++- src/modules/[chain]/faucet/index.vue | 2 +- src/modules/[chain]/staking/[validator].vue | 12 ++- src/modules/wallet/keplr.vue | 1 + src/modules/wallet/unisat.vue | 104 ++++++++++++++++++++ src/router/index.ts | 2 +- src/stores/useBlockchain.ts | 4 +- src/stores/useDistributionStore.ts | 17 +++- src/stores/useWalletStore.ts | 7 +- 14 files changed, 231 insertions(+), 18 deletions(-) create mode 100644 chains/mainnet/axelar.json create mode 100644 src/modules/wallet/unisat.vue diff --git a/README.md b/README.md index 342d5900..051bc973 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Your donation will help us make better products. Thanks in advance. ## Hire us -You can hire us by submiting an issue and fund the issue on [IssueHunter](https://issuehunt.io/r/ping-pub/explorer) +You can hire us by submitting an issue and fund the issue on [IssueHunter](https://issuehunt.io/r/ping-pub/explorer) ## Contributors diff --git a/chains/README.md b/chains/README.md index 7b651cfa..dbb910de 100644 --- a/chains/README.md +++ b/chains/README.md @@ -1,10 +1,10 @@ # Directory Layout -** if you want to list your blockhain on ping.pub, please submit your configure on https://github.com/ping-pub/ping.pub.git ** +** if you want to list your blockchain on ping.pub, please submit your configuration on https://github.com/ping-pub/ping.pub.git ** - Submit configs for mainnet, go to https://github.com/ping-pub/explorer/tree/master/chains/mainnet -- Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/master/chains/testnet, thess configs will be enabled when you visit the domain starts withs `testnet.*`, for example `https://testnet.ping.pub` +- Submit configs for testnet, go to https://github.com/ping-pub/explorer/tree/master/chains/testnet, these configs will be enabled when you visit the domain that starts with `testnet.*`, for example `https://testnet.ping.pub` # Sample of Config diff --git a/chains/mainnet/axelar.json b/chains/mainnet/axelar.json new file mode 100644 index 00000000..28bd6d98 --- /dev/null +++ b/chains/mainnet/axelar.json @@ -0,0 +1,74 @@ +{ + "chain_name": "axelar", + "api": [ + "https://rest.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe" + ], + "rpc": [ + "https://tm.axelar.lava.build/lava-referer-97409c72-1a82-4861-8651-119c15151cbe" + ], + "snapshot_provider": "", + "sdk_version": "0.45.6", + "coin_type": "118", + "min_tx_fee": "800", + "addr_prefix": "axelar", + "logo": "/logos/axelar.svg", + "theme_color": "#161723", + "assets": [ + { + "base": "uaxl", + "symbol": "AXL", + "exponent": "6", + "coingecko_id": "axelar", + "logo": "/logos/axelar.svg" + }, + { + "base": "uusdc", + "symbol": "axlUSDC", + "exponent": "6", + "coingecko_id": "usd-coin", + "logo": "/logos/usdc.svg" + }, + { + "base": "uusdt", + "symbol": "axlUSDT", + "exponent": "6", + "coingecko_id": "tether", + "logo": "/logos/usdt.svg" + }, + { + "base": "dai-wei", + "symbol": "axlDAI", + "exponent": "18", + "coingecko_id": "dai", + "logo": "/logos/dai.svg" + }, + { + "base": "weth-wei", + "symbol": "axlWETH", + "exponent": "18", + "coingecko_id": "ethereum", + "logo": "/logos/weth.svg" + }, + { + "base": "wmatic-wei", + "symbol": "axlWMATIC", + "exponent": "18", + "coingecko_id": "matic-network", + "logo": "/logos/wmatic.svg" + }, + { + "base": "wavax-wei", + "symbol": "axlWAVAX", + "exponent": "18", + "coingecko_id": "avalanche-2", + "logo": "/logos/wavax.svg" + }, + { + "base": "dot-planck", + "symbol": "axlDOT", + "exponent": "10", + "coingecko_id": "polkadot", + "logo": "/logos/dot.svg" + } + ] +} diff --git a/index.html b/index.html index 3c1c9f94..156b08af 100644 --- a/index.html +++ b/index.html @@ -38,7 +38,7 @@ }); gtag('config', 'G-SSBKVF3GMX'); - + diff --git a/pingpub.commit b/pingpub.commit index 743890ce..8b137891 100644 --- a/pingpub.commit +++ b/pingpub.commit @@ -1 +1 @@ -a6691efb017acd4fe9b90431b7573043ce8b509b \ No newline at end of file + diff --git a/src/layouts/components/NavBarWallet.vue b/src/layouts/components/NavBarWallet.vue index 2d0c69d5..fc52e616 100644 --- a/src/layouts/components/NavBarWallet.vue +++ b/src/layouts/components/NavBarWallet.vue @@ -1,8 +1,10 @@ diff --git a/src/modules/[chain]/faucet/index.vue b/src/modules/[chain]/faucet/index.vue index e82d768d..263f2743 100644 --- a/src/modules/[chain]/faucet/index.vue +++ b/src/modules/[chain]/faucet/index.vue @@ -24,7 +24,7 @@ const checklist = computed(() => { const bs = balances.value.length > 0 && balances.value.findIndex((v:any) => v.amount <= 10) === -1; return [ { title: 'Rest Endpoint', status: endpoint && endpoint[0].address !== '' }, - { title: 'Has Faucet Configured', status: chainStore.current?.faucet !== undefined }, + { title: 'Faucet Configured', status: chainStore.current?.faucet !== undefined }, { title: 'Faucet Account', status: faucet.value !== ''}, { title: 'Faucet Balance', status: bs}, ]; diff --git a/src/modules/[chain]/staking/[validator].vue b/src/modules/[chain]/staking/[validator].vue index d253d092..a4f883c8 100644 --- a/src/modules/[chain]/staking/[validator].vue +++ b/src/modules/[chain]/staking/[validator].vue @@ -1,7 +1,9 @@ + + diff --git a/src/router/index.ts b/src/router/index.ts index 7dc4a6d0..7030ae87 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -14,7 +14,7 @@ const router = createRouter({ router.beforeEach((to) => { const { chain } = to.params if(chain){ - const blockchain = useBlockchain() + const blockchain= useBlockchain() if(chain !== blockchain.chainName) { blockchain.setCurrent(chain.toString()) } diff --git a/src/stores/useBlockchain.ts b/src/stores/useBlockchain.ts index ac1ae2cc..e6a15c55 100644 --- a/src/stores/useBlockchain.ts +++ b/src/stores/useBlockchain.ts @@ -16,10 +16,11 @@ import { CosmosRestClient } from '@/libs/client'; import { useBankStore, useBaseStore, + useDistributionStore, useGovStore, useMintStore, useStakingStore, - useWalletStore, + useWalletStore } from '.'; import { useBlockModule } from '@/modules/[chain]/block/block'; import { DEFAULT } from '@/libs'; @@ -151,6 +152,7 @@ export const useBlockchain = defineStore('blockchain', { useGovStore().initial(); useMintStore().initial(); useBlockModule().initial(); + useDistributionStore().initial(); }, randomEndpoint(chainName: string) : Endpoint | undefined { diff --git a/src/stores/useDistributionStore.ts b/src/stores/useDistributionStore.ts index d2dc0a8f..8e398417 100644 --- a/src/stores/useDistributionStore.ts +++ b/src/stores/useDistributionStore.ts @@ -3,7 +3,14 @@ import { useBlockchain } from './useBlockchain'; export const useDistributionStore = defineStore('distributionStore', { state: () => { - return {}; + return { + params: {} as { + community_tax: string; + base_proposer_reward: string; + bonus_proposer_reward: string; + withdraw_addr_enabled: boolean; + }, + }; }, getters: { blockchain() { @@ -11,6 +18,14 @@ export const useDistributionStore = defineStore('distributionStore', { }, }, actions: { + initial() { + this.fetchParams(); + }, + async fetchParams() { + const response = await this.blockchain.rpc?.getDistributionParams(); + if (response?.params) this.params = response.params; + return this.params; + }, async fetchCommunityPool() { return this.blockchain.rpc?.getDistributionCommunityPool(); }, diff --git a/src/stores/useWalletStore.ts b/src/stores/useWalletStore.ts index 5962287c..2843e72e 100644 --- a/src/stores/useWalletStore.ts +++ b/src/stores/useWalletStore.ts @@ -128,8 +128,11 @@ export const useWalletStore = defineStore('walletStore', { if(value) this.wallet = value }, suggestChain() { - // const router = useRouter() - router.push({path: '/wallet/keplr'}) + if (window.location.pathname === '/SIDE-Testnet') { + router.push({path: '/wallet/unisat'}) + } else { + router.push({path: '/wallet/keplr'}) + } } }, }); \ No newline at end of file