Skip to content

Commit

Permalink
Merge pull request #3 from allinbits/rebase-1
Browse files Browse the repository at this point in the history
rebase master branch from origin repository
  • Loading branch information
albttx authored Dec 11, 2024
2 parents 4bdbeda + 0259a30 commit 540d6cd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 29 deletions.
29 changes: 1 addition & 28 deletions src/components/ad/AdBanner.vue
Original file line number Diff line number Diff line change
@@ -1,30 +1,3 @@
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { getClient, getUnit } from './ad';
const props = defineProps({
id: { type: String, required: true},
unit: { type: String, required: true},
width: { type: String },
height: { type: String },
});
const show = ref(false)
onMounted(() => {
const adClient = getClient();
const adUnitId = getUnit(props.unit);
show.value = adClient !== undefined && adUnitId !== undefined;
if(show.value) {
adClient.showBannerAd({
adUnitId,
containerId: props.id,
});
}
});
</script>
<template>
<div v-show="show" :id="id" :unit="unit" class="grid justify-items-center overflow-auto pt-4">
</div>
<div></div>
</template>
4 changes: 3 additions & 1 deletion src/stores/useStakingStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,9 @@ export const useStakingStore = defineStore('stakingStore', {
if(this.blockchain.current?.providerChain?.api && this.blockchain.current.providerChain.api.length > 0) {
const client = CosmosRestClient.newDefault(this.blockchain.current.providerChain.api[0].address)
await client.getStakingValidators('BOND_STATUS_BONDED', 500).then((res) => { this.validators = res.validators });
return client.getInterchainSecurityConsumerValidators(chain_id)
const id_map = {"neutron": "0", "stride": "1"} as Record<string, string>;
const consumer_id = Object.keys(id_map).find((k) => chain_id.startsWith(k)) || 0;
return client.getInterchainSecurityConsumerValidators(id_map[consumer_id])
} else {
return { validators: [] }
}
Expand Down

0 comments on commit 540d6cd

Please sign in to comment.