Skip to content

Commit

Permalink
ADD: Beaconcha.in Button for Validator Keys (#2048)
Browse files Browse the repository at this point in the history
Fix #2040
  • Loading branch information
mabasian authored Sep 11, 2024
1 parent 4727618 commit 4452f1e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ import { computed } from 'vue';
>{{ props.item.balance }}</span
>

<div class="h-full col-start-18 col-span-full bg-[#151618] rounded-full grid grid-cols-5 items-center" @mousedown.prevent>
<div class="h-full col-start-17 col-span-full bg-[#151618] rounded-full grid grid-cols-6 items-center" @mousedown.prevent>
<div
class="col-start-1 col-span-1 w-full h-full rounded-md justify-self-center flex justify-center items-center"
@mouseenter="footerStore.cursorLocation = `${copyPub}`"
Expand Down Expand Up @@ -136,6 +136,19 @@ import { computed } from 'vue';
@click="withdrawHandler"
/>
</div>
<div
class="col-start-6 col-span-1 w-full h-full rounded-md justify-self-center flex justify-center items-center"
@mouseenter="footerStore.cursorLocation = `Beaconcha.in`"
@mouseleave="footerStore.cursorLocation = ''"
>
<img
class="w-5 h-5 hover:scale-105 active:scale-95 cursor-pointer transition-all duration-150"
src="/img/icon/staking-page-icons/beaconcha.png"
alt="Icon"
@mousedown.prevent
@click="navToBeaconcha(props.item.network)"
/>
</div>
</div>
</div>
</template>
Expand All @@ -145,7 +158,7 @@ import { computed } from "vue";
import { useStakingStore } from "@/store/theStaking";
import { useFooter } from "@/store/theFooter";
import i18n from "@/includes/i18n";
import { useSetups } from "../../../../../../store/setups";
import { useSetups } from "@/store/setups";
const props = defineProps({
item: {
Expand Down Expand Up @@ -288,6 +301,22 @@ const displayText = computed(() => {
});
//Methods
const navToBeaconcha = (network) => {
const urls = {
gnosis: "https://gnosischa.in/",
sepolia: "https://sepolia.beaconcha.in/",
mainnet: "https://beaconcha.in/",
holesky: "https://holesky.beaconcha.in/",
};
const url = urls[network];
if (url) {
window.open(url, "_blank");
} else {
console.error("Invalid network provided");
}
};
const selectKey = (key) => {
if (stakingStore.isGroupingAllowed) {
const updatedKeys = stakingStore.keys.map((item) => {
Expand Down

0 comments on commit 4452f1e

Please sign in to comment.