commit
53f2c0d134
19
chains/mainnet/humans.json
Normal file
19
chains/mainnet/humans.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"chain_name": "humans",
|
||||
"api":["https://api.humans-mainnet.stake-take.com"],
|
||||
"rpc":["https://rpc.humans-mainnet.stake-take.com"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.3",
|
||||
"coin_type": 60,
|
||||
"min_tx_fee": "5000",
|
||||
"addr_prefix": "human",
|
||||
"logo": "/logos/humans.jpg",
|
||||
"keplr_features": ["ibc-transfer", "ibc-go", "eth-address-gen", "eth-key-sign"],
|
||||
"assets": [{
|
||||
"base": "aheart",
|
||||
"symbol": "HEART",
|
||||
"exponent": 18,
|
||||
"coingecko_id": "humans-ai",
|
||||
"logo": "/logos/humans.jpg"
|
||||
}]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "osmosis",
|
||||
"coingecko": "osmosis",
|
||||
"api": ["https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"],
|
||||
"rpc": ["https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"],
|
||||
"api": ["https://lcd.osmosis.zone","https://api-osmosis-ia.cosmosia.notional.ventures", "https://osmosis-api.polkachu.com", "https://lcd-osmosis.blockapsis.com"],
|
||||
"rpc": ["https://rpc.osmosis.zone", "https://rpc-osmosis-ia.cosmosia.notional.ventures:443", "https://osmosis-rpc.polkachu.com:443", "https://osmosis.validator.network:443", "https://rpc-osmosis.blockapsis.com:443"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.1",
|
||||
"coin_type": "118",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "quicksilver",
|
||||
"coingecko": "",
|
||||
"api": ["https://quicksilver-api.polkachu.com", "https://api-quicksilver.nodeist.net"],
|
||||
"rpc": ["https://quicksilver-rpc.polkachu.com", "https://rpc-quicksilver.nodeist.net"],
|
||||
"api": ["https://quicksilver-api.polkachu.com", "https://api-quicksilver.nodeist.net", "https://api.quicksilver.stake-take.com"],
|
||||
"rpc": ["https://quicksilver-rpc.polkachu.com", "https://rpc-quicksilver.nodeist.net", "https://rpc.quicksilver.stake-take.com"],
|
||||
"sdk_version": "0.46.7",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "8000",
|
||||
|
19
chains/mainnet/uptick.json
Normal file
19
chains/mainnet/uptick.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"chain_id":"uptick_117-1",
|
||||
"chain_name": "uptick-network-mainnet",
|
||||
"api": "https://rest.uptick.network",
|
||||
"sdk_version": "v0.46.0",
|
||||
"coin_type": "60",
|
||||
"min_tx_fee": "40000",
|
||||
"addr_prefix": "uptick",
|
||||
"logo": "https://file.uptick.network/file/image/dNOLswid7dGe29CFhPp3Ow.png",
|
||||
"assets": [
|
||||
{
|
||||
"base": "auptick",
|
||||
"symbol": "UPTICK",
|
||||
"exponent": "18",
|
||||
"coingecko_id": "uptick-network",
|
||||
"logo": "https://file.uptick.network/file/image/dNOLswid7dGe29CFhPp3Ow.png"
|
||||
}
|
||||
]
|
||||
}
|
19
chains/testnet/humans.json
Normal file
19
chains/testnet/humans.json
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"chain_name": "humans",
|
||||
"api":["https://api.humans.stake-take.com"],
|
||||
"rpc":["https://rpc.humans.stake-take.com"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.46.3",
|
||||
"coin_type": 60,
|
||||
"min_tx_fee": "5000",
|
||||
"addr_prefix": "human",
|
||||
"logo": "/logos/humans.jpg",
|
||||
"keplr_features": ["ibc-transfer", "ibc-go", "eth-address-gen", "eth-key-sign"],
|
||||
"assets": [{
|
||||
"base": "aheart",
|
||||
"symbol": "HEART",
|
||||
"exponent": 18,
|
||||
"coingecko_id": "humans-ai",
|
||||
"logo": "/logos/humans.jpg"
|
||||
}]
|
||||
}
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "osmosis",
|
||||
"coingecko": "osmosis",
|
||||
"api": ["https://lcd-test.osmosis.zone", "https://lcd.osmo-test.ccvalidators.com", "https://osmosistest-lcd.quickapi.com"],
|
||||
"rpc": ["https://rpc-test.osmosis.zone", "https://testnet-rpc.osmosis.zone:443", "https://rpc.osmo-test.ccvalidators.com:443"," https://osmosistest-rpc.quickapi.com:443"],
|
||||
"api": ["https://lcd.osmotest5.osmosis.zone"],
|
||||
"rpc": ["https://rpc.osmotest5.osmosis.zone"],
|
||||
"snapshot_provider": "",
|
||||
"sdk_version": "0.44.5",
|
||||
"coin_type": "118",
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"chain_name": "quicksilver",
|
||||
"coingecko": "",
|
||||
"api": ["https://quicksilver-testnet-api.polkachu.com"],
|
||||
"rpc": ["https://quicksilver-testnet-rpc.polkachu.com"],
|
||||
"api": ["https://api.quicksilver-testnet.stake-take.com", "https://quicksilver-testnet-api.polkachu.com"],
|
||||
"rpc": ["https://rpc.quicksilver-testnet.stake-take.com", "https://quicksilver-testnet-rpc.polkachu.com"],
|
||||
"sdk_version": "0.46.1",
|
||||
"coin_type": "118",
|
||||
"min_tx_fee": "8000",
|
||||
@ -17,4 +17,4 @@
|
||||
"logo": "/logos/quicksilver.png"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
"md-editor-v3": "^2.8.1",
|
||||
"numeral": "^2.0.6",
|
||||
"osmojs": "^14.0.0-rc.0",
|
||||
"ping-widget": "^0.0.30",
|
||||
"ping-widget": "^0.0.33",
|
||||
"pinia": "^2.0.28",
|
||||
"postcss": "^8.4.23",
|
||||
"qrcode": "^1.5.3",
|
||||
|
BIN
public/logos/humans.jpg
Normal file
BIN
public/logos/humans.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
@ -8,5 +8,7 @@ const store = useTxDialog();
|
||||
:sender="store.sender"
|
||||
:endpoint="store.endpoint"
|
||||
:params="store.params"
|
||||
@view="store.view"
|
||||
@confirmed="store.confirmed"
|
||||
></ping-tx-dialog>
|
||||
</template>
|
||||
|
@ -87,7 +87,11 @@ function loadAccount(address: string) {
|
||||
});
|
||||
});
|
||||
}
|
||||
loadAccount(props.address);
|
||||
|
||||
|
||||
function updateEvent() {
|
||||
loadAccount(props.address);
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div v-if="account">
|
||||
@ -130,7 +134,7 @@ loadAccount(props.address);
|
||||
<label
|
||||
for="send"
|
||||
class="btn btn-primary btn-sm mr-2"
|
||||
@click="dialog.open('send', {})"
|
||||
@click="dialog.open('send', {}, updateEvent)"
|
||||
>Send</label
|
||||
>
|
||||
<label
|
||||
@ -139,7 +143,7 @@ loadAccount(props.address);
|
||||
@click="
|
||||
dialog.open('transfer', {
|
||||
chain_name: blockchain.current?.prettyName,
|
||||
})
|
||||
}, updateEvent)
|
||||
"
|
||||
>transfer</label
|
||||
>
|
||||
@ -302,13 +306,13 @@ loadAccount(props.address);
|
||||
<label
|
||||
for="delegate"
|
||||
class="btn btn-primary btn-sm mr-2"
|
||||
@click="dialog.open('delegate', {})"
|
||||
@click="dialog.open('delegate', {}, updateEvent)"
|
||||
>Delegate</label
|
||||
>
|
||||
<label
|
||||
for="withdraw"
|
||||
class="btn btn-primary btn-sm"
|
||||
@click="dialog.open('withdraw', {})"
|
||||
@click="dialog.open('withdraw', {}, updateEvent)"
|
||||
>Withdraw</label
|
||||
>
|
||||
</div>
|
||||
@ -353,7 +357,7 @@ loadAccount(props.address);
|
||||
@click="
|
||||
dialog.open('delegate', {
|
||||
validator_address: v.delegation.validator_address,
|
||||
})
|
||||
}, updateEvent)
|
||||
"
|
||||
>delegate</label
|
||||
>
|
||||
@ -363,7 +367,7 @@ loadAccount(props.address);
|
||||
@click="
|
||||
dialog.open('redelegate', {
|
||||
validator_address: v.delegation.validator_address,
|
||||
})
|
||||
}, updateEvent)
|
||||
"
|
||||
>Redelegate</label
|
||||
>
|
||||
@ -373,7 +377,7 @@ loadAccount(props.address);
|
||||
@click="
|
||||
dialog.open('unbond', {
|
||||
validator_address: v.delegation.validator_address,
|
||||
})
|
||||
}, updateEvent)
|
||||
"
|
||||
>Unbond</label
|
||||
>
|
||||
|
@ -275,13 +275,12 @@ const result = ref('');
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<VTextarea v-model="query" label="Query String" class="my-2" />
|
||||
<VTextarea v-model="result" label="Result" />
|
||||
<textarea v-model="query" placeholder="Query String, {}" label="Query String" class="my-2 textarea textarea-bordered w-full" />
|
||||
<textarea v-model="result" readonly placeholder="Query Result" label="Result" class="textarea textarea-bordered w-full" />
|
||||
</div>
|
||||
<div class="mt-4 mb-4">
|
||||
<div class="mt-4 mb-4 text-center">
|
||||
<button
|
||||
class="btn !btn-yes !border-yes px-4 text-white"
|
||||
class="btn btn-primary px-4 text-white"
|
||||
@click="queryContract()"
|
||||
>
|
||||
Query Contract
|
||||
|
80
src/modules/[chain]/ibc/connection.vue
Normal file
80
src/modules/[chain]/ibc/connection.vue
Normal file
@ -0,0 +1,80 @@
|
||||
<script lang="ts" setup>
|
||||
import PaginationBar from '@/components/PaginationBar.vue';
|
||||
import { useBlockchain, useFormatter } from '@/stores';
|
||||
import { PageRequest, type Connection, type Pagination } from '@/types';
|
||||
import { onMounted } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const props = defineProps(['chain']);
|
||||
const chainStore = useBlockchain();
|
||||
const list = ref([] as Connection[]);
|
||||
const pageRequest = ref(new PageRequest())
|
||||
const pageResponse = ref({} as Pagination)
|
||||
|
||||
onMounted(() => {
|
||||
pageload(1)
|
||||
});
|
||||
|
||||
function pageload(p: number) {
|
||||
pageRequest.value.setPage(p)
|
||||
chainStore.rpc.getIBCConnections(pageRequest.value).then((x) => {
|
||||
list.value = x.connections;
|
||||
pageResponse.value = x.pagination
|
||||
});
|
||||
}
|
||||
|
||||
function color(v: string) {
|
||||
if (v && v.indexOf('_OPEN') > -1) {
|
||||
return 'success';
|
||||
}
|
||||
return 'warning';
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
|
||||
<h2 class="card-title py-4">IBC Connections</h2>
|
||||
<div class="flex">
|
||||
<div class="">
|
||||
<table class="table table-compact w-full table-zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="py-3">Connection Id</th>
|
||||
<th class="py-3">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(v, index) in list" :key="index">
|
||||
<td class="py-2">
|
||||
<RouterLink :to="`/${chain}/ibc/connection/${v.id}`" class="text-primary">
|
||||
{{ v.id }}
|
||||
</RouterLink>
|
||||
</td>
|
||||
<td class="py-2">
|
||||
<div class="text-xs truncate relative py-[2px] px-3 rounded-full w-fit"
|
||||
:class="`text-${color(v.state)}`">
|
||||
<span class="inset-x-0 inset-y-0 opacity-10 absolute" :class="`bg-${color(v.state)}`"></span>
|
||||
{{ String(v.state).replace("STATE_", "") }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="grow overflow-auto">
|
||||
<router-view :key="$route.fullPath"></router-view>
|
||||
</div>
|
||||
</div>
|
||||
<PaginationBar :limit="pageRequest.limit" :total="pageResponse.total" :callback="pageload" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<route>
|
||||
{
|
||||
meta: {
|
||||
i18n: 'ibc',
|
||||
order: 9
|
||||
}
|
||||
}
|
||||
</route>
|
@ -11,6 +11,7 @@ const baseStore = useBaseStore();
|
||||
const conn = ref({} as Connection);
|
||||
const clientState = ref({} as { client_id: string; client_state: ClientState });
|
||||
const channels = ref([] as Channel[]);
|
||||
|
||||
onMounted(() => {
|
||||
if (props.connection_id) {
|
||||
chainStore.rpc.getIBCConnectionsById(props.connection_id).then((x) => {
|
||||
@ -41,15 +42,13 @@ function color(v: string) {
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div class="px-4 pt-3 pb-4 bg-base-100 rounded mb-4 shadow py-24 sm:!py-32">
|
||||
<div class="card card-bordered border-primary ml-4 rounded-t-md">
|
||||
<div class="px-4 pt-3 pb-4 bg-base-100 rounded mb-4 shadow ">
|
||||
<div class="mx-auto max-w-7xl px-6 lg:!px-8">
|
||||
<dl class="grid grid-cols-1 gap-x-8 text-center lg:!grid-cols-3">
|
||||
<dl class="grid grid-cols-1 gap-x-6 text-center lg:!grid-cols-3">
|
||||
<div class="mx-auto flex items-center">
|
||||
<div>
|
||||
<div
|
||||
class="order-first text-3xl font-semibold tracking-tight text-main mb-1"
|
||||
>
|
||||
<div class="order-first text-3xl font-semibold tracking-tight text-main mb-1">
|
||||
{{ baseStore.latest?.block?.header?.chain_id }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||
@ -60,18 +59,13 @@ function color(v: string) {
|
||||
<div class="mx-auto flex items-center">
|
||||
<div>
|
||||
<Icon icon="mdi:arrow-left-right" class="text-4xl mx-auto" />
|
||||
<div
|
||||
class="bg-success w-24 h-1 rounded-sm mt-1 mb-3 opacity-60"
|
||||
></div>
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||
{{ conn.state }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mx-auto">
|
||||
<div
|
||||
class="order-first text-3xl font-semibold tracking-tight text-main mb-2"
|
||||
>
|
||||
<div class="order-first text-3xl font-semibold tracking-tight text-main mb-2">
|
||||
{{ clientState.client_state?.chain_id }}
|
||||
</div>
|
||||
<div class="text-sm text-gray-500 dark:text-gray-400">
|
||||
@ -138,50 +132,45 @@ function color(v: string) {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow">
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded mb-4 shadow overflow-hidden">
|
||||
<h2 class="card-title">Channels</h2>
|
||||
<div class="overflow-x-auto"></div>
|
||||
<table class="table w-full mt-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="position: relative; z-index: 2">Channel Id</th>
|
||||
<th>Port Id</th>
|
||||
<th>Counterparty</th>
|
||||
<th>Hops</th>
|
||||
<th>Version</th>
|
||||
<th>Ordering</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="v in channels">
|
||||
<td>
|
||||
<a href="#" @click="loadChannel(v.channel_id, v.port_id)">{{
|
||||
v.channel_id
|
||||
}}</a>
|
||||
</td>
|
||||
<td>{{ v.port_id }}</td>
|
||||
<td>
|
||||
{{ v.counterparty?.port_id }}/{{ v.counterparty?.channel_id }}
|
||||
</td>
|
||||
<td>{{ v.connection_hops.join(', ') }}</td>
|
||||
<td>{{ v.version }}</td>
|
||||
<td>{{ v.ordering }}</td>
|
||||
<td>
|
||||
<div
|
||||
class="text-xs truncate relative py-2 px-4 rounded-full w-fit"
|
||||
:class="`text-${color(v.state)}`"
|
||||
>
|
||||
<span
|
||||
class="inset-x-0 inset-y-0 opacity-10 absolute"
|
||||
:class="`bg-${color(v.state)}`"
|
||||
></span>
|
||||
{{ v.state }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="overflow-auto">
|
||||
<table class="table w-full mt-4">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="position: relative; z-index: 2">Channel Id</th>
|
||||
<th>Port Id</th>
|
||||
<th>Counterparty</th>
|
||||
<th>Hops</th>
|
||||
<th>Version</th>
|
||||
<th>Ordering</th>
|
||||
<th>State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="v in channels">
|
||||
<td>
|
||||
<a href="#" @click="loadChannel(v.channel_id, v.port_id)">{{
|
||||
v.channel_id
|
||||
}}</a>
|
||||
</td>
|
||||
<td>{{ v.port_id }}</td>
|
||||
<td>
|
||||
{{ v.counterparty?.port_id }}/{{ v.counterparty?.channel_id }}
|
||||
</td>
|
||||
<td>{{ v.connection_hops.join(', ') }}</td>
|
||||
<td>{{ v.version }}</td>
|
||||
<td>{{ v.ordering }}</td>
|
||||
<td>
|
||||
<div class="text-xs truncate relative py-2 px-4 rounded-full w-fit" :class="`text-${color(v.state)}`">
|
||||
<span class="inset-x-0 inset-y-0 opacity-10 absolute" :class="`bg-${color(v.state)}`"></span>
|
||||
{{ v.state }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
6
src/modules/[chain]/ibc/connection/index.vue
Normal file
6
src/modules/[chain]/ibc/connection/index.vue
Normal file
@ -0,0 +1,6 @@
|
||||
<script lang="ts" setup>
|
||||
import router from '@/router'
|
||||
const props = defineProps(['chain']);
|
||||
console.log("props:", props)
|
||||
router.push(`/${props.chain}/ibc/connection/connection-0`)
|
||||
</script>
|
@ -1,88 +0,0 @@
|
||||
<script lang="ts" setup>
|
||||
import PaginationBar from '@/components/PaginationBar.vue';
|
||||
import { useBlockchain, useFormatter } from '@/stores';
|
||||
import { PageRequest, type Connection, type Pagination } from '@/types';
|
||||
import { onMounted } from 'vue';
|
||||
import { ref } from 'vue';
|
||||
|
||||
const props = defineProps(['chain']);
|
||||
const chainStore = useBlockchain();
|
||||
const list = ref([] as Connection[]);
|
||||
const pageRequest = ref(new PageRequest())
|
||||
const pageResponse = ref({} as Pagination)
|
||||
|
||||
onMounted(() => {
|
||||
pageload(1)
|
||||
});
|
||||
|
||||
function pageload(p: number) {
|
||||
pageRequest.value.setPage(p)
|
||||
chainStore.rpc.getIBCConnections(pageRequest.value).then((x) => {
|
||||
list.value = x.connections;
|
||||
pageResponse.value = x.pagination
|
||||
});
|
||||
}
|
||||
|
||||
function color(v: string) {
|
||||
if (v && v.indexOf('_OPEN') > -1) {
|
||||
return 'success';
|
||||
}
|
||||
return 'warning';
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<div>
|
||||
<div class="bg-base-100 px-4 pt-3 pb-4 rounded shadow">
|
||||
<h2 class="card-title">IBC Connections</h2>
|
||||
<div class="overflow-x-auto mt-4">
|
||||
<table class="table table-compact w-full table-zebra">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="py-3">Connection Id</th>
|
||||
<th class="py-3">Connection</th>
|
||||
<th class="py-3">Delay Period</th>
|
||||
<th class="py-3">State</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(v, index) in list" :key="index">
|
||||
<td class="py-2">
|
||||
<RouterLink :to="`/${chain}/ibc/${v.id}`" class="text-primary">
|
||||
{{ v.id }}
|
||||
</RouterLink>
|
||||
</td>
|
||||
<td class="py-2">
|
||||
{{ v.client_id }} {{ v.id }} <br />
|
||||
{{ v.counterparty.client_id }}
|
||||
{{ v.counterparty.connection_id }}
|
||||
</td>
|
||||
<td class="py-2">{{ v.delay_period }}</td>
|
||||
<td class="py-2">
|
||||
<div
|
||||
class="text-xs truncate relative py-[2px] px-3 rounded-full w-fit"
|
||||
:class="`text-${color(v.state)}`"
|
||||
>
|
||||
<span
|
||||
class="inset-x-0 inset-y-0 opacity-10 absolute"
|
||||
:class="`bg-${color(v.state)}`"
|
||||
></span>
|
||||
{{ v.state }}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<PaginationBar :limit="pageRequest.limit" :total="pageResponse.total" :callback="pageload"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<route>
|
||||
{
|
||||
meta: {
|
||||
i18n: 'ibc',
|
||||
order: 9
|
||||
}
|
||||
}
|
||||
</route>
|
@ -95,6 +95,10 @@ const color = computed(() => {
|
||||
return 'text-red-600';
|
||||
}
|
||||
});
|
||||
|
||||
function updateState() {
|
||||
walletStore.loadMyAsset()
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -216,9 +220,8 @@ const color = computed(() => {
|
||||
</div>
|
||||
|
||||
<div class="bg-base-100 rounded mt-4 shadow">
|
||||
<div class="flex items-center px-4 pt-4 pb-2 text-lg font-semibold text-main">
|
||||
<div class="flex justify-between px-4 pt-4 pb-2 text-lg font-semibold text-main">
|
||||
<span class="truncate" >{{ walletStore.currentAddress || 'Not Connected' }}</span>
|
||||
|
||||
<RouterLink v-if="walletStore.currentAddress"
|
||||
class="float-right text-sm cursor-pointert link link-primary no-underline font-medium"
|
||||
:to="`/${chain}/account/${walletStore.currentAddress}`">More</RouterLink>
|
||||
@ -295,11 +298,11 @@ const color = computed(() => {
|
||||
<td>
|
||||
<div>
|
||||
<label for="delegate" class="btn !btn-xs !btn-primary btn-ghost rounded-sm mr-2"
|
||||
@click="dialog.open('delegate', { validator_address: item.delegation.validator_address })">
|
||||
@click="dialog.open('delegate', { validator_address: item.delegation.validator_address }, updateState)">
|
||||
Delegate
|
||||
</label>
|
||||
<label for="withdraw" class="btn !btn-xs !btn-primary btn-ghost rounded-sm"
|
||||
@click="dialog.open('withdraw', { validator_address: item.delegation.validator_address })">
|
||||
@click="dialog.open('withdraw', { validator_address: item.delegation.validator_address }, updateState)">
|
||||
Withdraw Rewards
|
||||
</label>
|
||||
</div>
|
||||
@ -311,9 +314,9 @@ const color = computed(() => {
|
||||
|
||||
<div class="grid grid-cols-3 gap-4 px-4 pb-6 mt-4">
|
||||
<label for="PingTokenConvert" class="btn btn-primary text-white">Swap</label>
|
||||
<label for="send" class="btn !bg-yes !border-yes text-white" @click="dialog.open('send', {})">Send</label>
|
||||
<label for="send" class="btn !bg-yes !border-yes text-white" @click="dialog.open('send', {}, updateState)">Send</label>
|
||||
<label for="delegate" class="btn !bg-info !border-info text-white"
|
||||
@click="dialog.open('delegate', {})">Delegate</label>
|
||||
@click="dialog.open('delegate', {}, updateState)">Delegate</label>
|
||||
<RouterLink to="/wallet/receive" class="btn !bg-info !border-info text-white hidden">Receive</RouterLink>
|
||||
</div>
|
||||
<Teleport to="body">
|
||||
|
@ -9,7 +9,7 @@ import {
|
||||
import { useDistributionStore } from '@/stores/useDistributionStore';
|
||||
import { useMintStore } from '@/stores/useMintStore';
|
||||
import { useStakingStore } from '@/stores/useStakingStore';
|
||||
import type { GovProposal, PaginatedProposals, Tally } from '@/types';
|
||||
import type { Tally } from '@/types';
|
||||
import numeral from 'numeral';
|
||||
import { defineStore } from 'pinia';
|
||||
|
||||
|
@ -1,41 +1,65 @@
|
||||
import { defineStore } from 'pinia';
|
||||
import { useWalletStore } from './useWalletStore';
|
||||
import { useBlockchain } from './useBlockchain';
|
||||
import router from '@/router'
|
||||
|
||||
let CALLBACK: any = null
|
||||
|
||||
export const useTxDialog = defineStore('txDialogStore', {
|
||||
state: () => {
|
||||
return {
|
||||
sender: "",
|
||||
type: "send",
|
||||
endpoint: "",
|
||||
params: "",
|
||||
sender: "",
|
||||
type: "send",
|
||||
endpoint: "",
|
||||
params: "",
|
||||
};
|
||||
},
|
||||
getters: {
|
||||
walletAddress() {
|
||||
return useWalletStore().currentAddress
|
||||
return useWalletStore().currentAddress
|
||||
},
|
||||
currentEndpoint() {
|
||||
return useBlockchain().endpoint?.address
|
||||
return useBlockchain().endpoint?.address
|
||||
},
|
||||
blockchain() {
|
||||
return useBlockchain()
|
||||
}
|
||||
},
|
||||
actions: {
|
||||
setParams(param: any) {
|
||||
this.params = JSON.stringify(param)
|
||||
this.params = JSON.stringify(param)
|
||||
},
|
||||
openWithArgument(type: string, sender: string, endpoint: string, param: any) {
|
||||
this.type = type;
|
||||
this.sender = sender;
|
||||
this.endpoint = endpoint;
|
||||
this.params = JSON.stringify(param)
|
||||
this.type = type;
|
||||
this.sender = sender;
|
||||
this.endpoint = endpoint;
|
||||
this.params = JSON.stringify(param)
|
||||
},
|
||||
open(type: string, param: any) {
|
||||
this.type = type;
|
||||
this.sender = this.walletAddress;
|
||||
this.endpoint = this.currentEndpoint || "";
|
||||
this.params = JSON.stringify(param)
|
||||
|
||||
// console.log("dialog:", this.$state)
|
||||
open(type: string, param: any, callback?: Function) {
|
||||
this.type = type;
|
||||
this.sender = this.walletAddress;
|
||||
this.endpoint = this.currentEndpoint || "";
|
||||
this.params = JSON.stringify(param)
|
||||
if(callback) {
|
||||
CALLBACK = callback
|
||||
}else {
|
||||
CALLBACK = undefined
|
||||
}
|
||||
},
|
||||
view(tx: {
|
||||
detail: {
|
||||
eventType: string,
|
||||
hash: string
|
||||
}
|
||||
}) {
|
||||
console.log(tx.detail)
|
||||
if (tx.detail && tx.detail.hash) router.push({ path: `/${this.blockchain.chainName}/tx/${tx.detail.hash}` })
|
||||
},
|
||||
confirmed(tx: any) {
|
||||
console.log("confirmed:", tx)
|
||||
if(CALLBACK) {
|
||||
CALLBACK()
|
||||
}
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -5476,10 +5476,10 @@ pify@^3.0.0:
|
||||
resolved "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz"
|
||||
integrity sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==
|
||||
|
||||
ping-widget@^0.0.30:
|
||||
version "0.0.30"
|
||||
resolved "https://registry.yarnpkg.com/ping-widget/-/ping-widget-0.0.30.tgz#f417cff47fb8a95e443e953bc5eb3c912801f605"
|
||||
integrity sha512-bKa47dHNqUw/TaRBbjxQkb5+yXMwEq0+EiIs3b9Q5/0HlFcs19rdzH/RDQj4S3tpClOX7N5hTpAFikOInHq20g==
|
||||
ping-widget@^0.0.33:
|
||||
version "0.0.33"
|
||||
resolved "https://registry.yarnpkg.com/ping-widget/-/ping-widget-0.0.33.tgz#ea546499d24e96c6fb407f4707b237f5f5014da4"
|
||||
integrity sha512-bMAgyXleHKK6YWlI7M7VEu0fFH0YKoXRnJo85Umz3AF4EkNEHrRuJG1BUQq6yQK1p0k4Fzkk331zQMLG7jvnLA==
|
||||
dependencies:
|
||||
"@cosmjs/amino" "^0.30.1"
|
||||
"@cosmjs/cosmwasm-stargate" "^0.30.1"
|
||||
|
Loading…
Reference in New Issue
Block a user