add e-money, bigsong tauri.conf

This commit is contained in:
liangping
2021-10-11 15:10:29 +08:00
parent be26d29cad
commit 170a53f5e4
33 changed files with 13242 additions and 9668 deletions
+2
View File
@@ -20,6 +20,8 @@
"sentinel": "Sentinel",
"sifchain": "Sifchain",
"starname": "Starname",
"bitsong": "BitSong",
"emoney": "E-Money",
"staking": "Staking",
"governance": "Governance",
-32
View File
@@ -1,32 +0,0 @@
import {
makeAuthInfoBytes, makeSignDoc, Registry,
// makeSignBytes,
} from '@cosmjs/proto-signing'
export default class Client {
async signDirect(signerAddress, messages, fee, memo, { accountNumber, sequence, chainId }) {
// const accountFromSigner = (await this.signer.getAccounts()).find(account => account.address === signerAddress)
// if (!accountFromSigner) {
// throw new Error('Failed to retrieve account from signer')
// }
const pubkey = ''
const txBodyEncodeObject = {
typeUrl: '/cosmos.tx.v1beta1.TxBody',
value: {
messages,
memo,
},
}
const txBodyBytes = new Registry().encode(txBodyEncodeObject)
const gasLimit = 1
const authInfoBytes = makeAuthInfoBytes([pubkey], fee.amount, gasLimit, sequence)
const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber)
const { signature, signed } = await this.signer.signDirect(signerAddress, signDoc)
return tx_4.TxRaw.fromPartial({
bodyBytes: signed.bodyBytes,
authInfoBytes: signed.authInfoBytes,
signatures: [encoding_1.fromBase64(signature.signature)],
})
}
}
+9 -5
View File
@@ -20,6 +20,7 @@ const modules = [
scope: 'normal',
title: 'governance',
route: 'governance',
exclude: 'emoney',
},
{
scope: 'normal',
@@ -54,14 +55,17 @@ function processMenu() {
title: chain,
icon: store.state.chains.config[chain].logo,
}
const { excludes } = store.state.chains.config[chain]
const children = []
modules.forEach(m => {
if (m.scope.match('normal') || m.scope.match(chain)) {
children.push({
if (excludes === undefined || excludes.indexOf(m.route) === -1) {
if (m.scope.match('normal') || m.scope.match(chain)) {
children.push({
// header: `item-${chain}-${m.route}`,
title: m.title,
route: { name: m.route, params: { chain } },
})
title: m.title,
route: { name: m.route, params: { chain } },
})
}
}
})
menu.children = children
+7
View File
@@ -0,0 +1,7 @@
{
"chain_name": "bitsong",
"api": "https://lcd.explorebitsong.com",
"addr_prefix": "bitsong",
"logo": "https://dl.airtable.com/.attachments/8016b71b69fb108f0ff33eb9af1c943f/f5fe4ef4/bitsong.svg",
"sdk_version": "0.39.2"
}
+8
View File
@@ -0,0 +1,8 @@
{
"chain_name": "e-money",
"api": "https://emoney.validator.network/api",
"addr_prefix": "emoney",
"logo": "https://dl.airtable.com/.attachments/276e4d6de567b073a5e400240d7d83e9/9bb49806/yoR2r25W_400x400.jpg",
"sdk_version": "0.42.10",
"excludes": "mint governance"
}
+1
View File
@@ -3,5 +3,6 @@
"api": "https://iris.api.ping.pub",
"sdk_version": "0.42.4",
"addr_prefix": "iaa",
"excludes": "mint",
"logo": "https://dl.airtable.com/.attachments/2d6d51b1b262db00ecc51616ffc3bdf5/90ff00d0/IRISnet.svg"
}
+23 -20
View File
@@ -41,7 +41,7 @@
<summary-parmeters-component :data="staking" />
</b-col>
</b-row>
<b-row>
<b-row v-if="gov.items.length > 0">
<b-col>
<summary-parmeters-component :data="gov" />
</b-col>
@@ -159,11 +159,6 @@ export default {
this.marketData = res
})
this.$http.getMintingInflation().then(res => {
const chainIndex = this.chain.items.findIndex(x => x.subtitle === 'inflation')
this.$set(this.chain.items[chainIndex], 'title', `${percent(res)}%`)
})
this.$http.getStakingParameters().then(res => {
this.staking = this.normalize(res, 'Staking Parameters')
Promise.all([this.$http.getStakingPool(), this.$http.getBankTotal(res.bond_denom)])
@@ -178,10 +173,14 @@ export default {
this.slasing = this.normalize(res, 'Slashing Parameters')
})
const selected = this.$route.params.chain
if (selected === 'iris') {
const conf = this.$http.getSelectedConfig()
if (conf.excludes && conf.excludes.indexOf('mint') > -1) {
this.mint = null
} else {
this.$http.getMintingInflation().then(res => {
const chainIndex = this.chain.items.findIndex(x => x.subtitle === 'inflation')
this.$set(this.chain.items[chainIndex], 'title', `${percent(res)}%`)
})
this.$http.getMintParameters().then(res => {
this.mint = this.normalize(res, 'Minting Parameters')
})
@@ -190,19 +189,23 @@ export default {
this.$http.getDistributionParameters().then(res => {
this.distribution = this.normalize(res, 'Distribution Parameters')
})
Promise.all([
this.$http.getGovernanceParameterDeposit(),
this.$http.getGovernanceParameterTallying(),
this.$http.getGovernanceParameterVoting(),
]).then(data => {
let items = []
data.forEach(item => {
const values = this.normalize(item, '').items
items = items.concat(values)
if (conf.excludes && conf.excludes.indexOf('governance') > -1) {
this.gov.items = []
} else {
Promise.all([
this.$http.getGovernanceParameterDeposit(),
this.$http.getGovernanceParameterTallying(),
this.$http.getGovernanceParameterVoting(),
]).then(data => {
let items = []
data.forEach(item => {
const values = this.normalize(item, '').items
items = items.concat(values)
})
this.gov.items = items
this.$set(this.gov, 'items', items)
})
this.gov.items = items
this.$set(this.gov, 'items', items)
})
}
},
methods: {
normalize(data, title) {
+1 -1
View File
@@ -411,7 +411,7 @@ export default {
labels: Object.keys(total.value),
datasets: [
{
label: 'Value',
label: 'Market Cap',
data: Object.values(total.value),
backgroundColor: chartColors(),
borderWidth: 0,