Skip to content

Commit

Permalink
Demo
Browse files Browse the repository at this point in the history
  • Loading branch information
prevetal committed Feb 27, 2024
1 parent 6a15fc2 commit 04ff444
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 32 deletions.
9 changes: 5 additions & 4 deletions src/components/account/Stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,14 @@
import { ref, onBeforeMount, watch, computed } from 'vue'
import { useGlobalStore } from '@/stores'
import { generateAddress, currencyСonversion, formatTokenAmount } from '@/utils'
import DemoStats from '@/demo/Stats.json'
const store = useGlobalStore(),
loading = store.demo ? ref(false) : ref(true),
APR = !store.demo ? ref(0) : ref(0.2125),
totalRewardsPrice = !store.demo ? ref(0) : ref(110.016),
totalTokensPrice = !store.demo ? ref(0) : ref(15070.18),
RPDE = !store.demo ? ref(0) : ref(4000000)
APR = !store.demo ? ref(0) : ref(DemoStats[store.currentNetwork].APR),
totalRewardsPrice = !store.demo ? ref(0) : ref(DemoStats[store.currentNetwork].totalRewardsPrice),
totalTokensPrice = !store.demo ? ref(0) : ref(DemoStats[store.currentNetwork].totalTokensPrice),
RPDE = !store.demo ? ref(0) : ref(DemoStats[store.currentNetwork].RPDE)
onBeforeMount(async () => {
Expand Down
48 changes: 20 additions & 28 deletions src/demo/Account.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
"liquid": {
"native": [
{
"amount": 10000000000,
"amount": 20235470000,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -393,7 +393,7 @@
],
"ibc": [
{
"amount": 10000000000,
"amount": 8888000000,
"denom": "HYDROGEN",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/hydrogen.svg",
Expand All @@ -403,7 +403,7 @@
},
"staked": [
{
"amount": 100324500000,
"amount": 36824500000,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -412,7 +412,7 @@
],
"unbonding": [
{
"amount": 1000590000,
"amount": 175899590000,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -421,7 +421,7 @@
],
"rewards": [
{
"amount": 10000000,
"amount": 234000,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand Down Expand Up @@ -558,7 +558,7 @@
"liquid": {
"native": [
{
"amount": 10000000000,
"amount": 4376452726,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -567,7 +567,7 @@
],
"ibc": [
{
"amount": 10000000000,
"amount": 2625626346,
"denom": "HYDROGEN",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/hydrogen.svg",
Expand All @@ -577,25 +577,17 @@
},
"staked": [
{
"amount": 100324500000,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
"symbol": "BOOT"
}
],
"unbonding": [
{
"amount": 1000590000,
"amount": 5879542475,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
"symbol": "BOOT"
}
],
"unbonding": [],
"rewards": [
{
"amount": 10000000,
"amount": 234676547,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand Down Expand Up @@ -732,7 +724,7 @@
"liquid": {
"native": [
{
"amount": 10000000000,
"amount": 82376367426,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -741,7 +733,7 @@
],
"ibc": [
{
"amount": 10000000000,
"amount": 2135563462,
"denom": "HYDROGEN",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/hydrogen.svg",
Expand All @@ -751,7 +743,7 @@
},
"staked": [
{
"amount": 100324500000,
"amount": 32465473562,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -760,7 +752,7 @@
],
"unbonding": [
{
"amount": 1000590000,
"amount": 457436345,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -769,7 +761,7 @@
],
"rewards": [
{
"amount": 10000000,
"amount": 3426323426,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand Down Expand Up @@ -906,7 +898,7 @@
"liquid": {
"native": [
{
"amount": 10000000000,
"amount": 2346346546,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -915,7 +907,7 @@
],
"ibc": [
{
"amount": 10000000000,
"amount": 32463426,
"denom": "HYDROGEN",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/hydrogen.svg",
Expand All @@ -925,7 +917,7 @@
},
"staked": [
{
"amount": 100324500000,
"amount": 1463464364,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -934,7 +926,7 @@
],
"unbonding": [
{
"amount": 1000590000,
"amount": 24356664,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand All @@ -943,7 +935,7 @@
],
"rewards": [
{
"amount": 10000000,
"amount": 34634634,
"denom": "boot",
"exponent": 0,
"logo": "https://raw.githubusercontent.com/cosmos/chain-registry/master/bostrom/images/boot.svg",
Expand Down
15 changes: 15 additions & 0 deletions src/demo/Stats.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"cosmoshub": {
"APR": 0.14,
"totalRewardsPrice": 80.016,
"totalTokensPrice": 10070.18,
"RPDE": 4000000
},

"bostrom": {
"APR": 0.2125,
"totalRewardsPrice": 110.016,
"totalTokensPrice": 15070.18,
"RPDE": 4000000
}
}

0 comments on commit 04ff444

Please sign in to comment.