From 1b782c80b3d28d05a9b490e7ebe12ceab729ae5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mar=C3=ADa=20Gabald=C3=B3n=20Rico?= Date: Mon, 19 Jul 2021 10:21:23 +0200 Subject: [PATCH] fix(ui): add contract link depending on the network --- packages/ui/components/DataFeedDetails.vue | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/ui/components/DataFeedDetails.vue b/packages/ui/components/DataFeedDetails.vue index dc76d6a2..ac288577 100644 --- a/packages/ui/components/DataFeedDetails.vue +++ b/packages/ui/components/DataFeedDetails.vue @@ -12,11 +12,7 @@ :title="$t('data_feed_details.contract_address')" class="contract-container" > - + {{ feedAddress }} @@ -80,6 +76,11 @@ export default { svgIcon() { return this.feed.name.split('/').join('') }, + url() { + return this.feed.network === 'mainnet' + ? `https://etherscan.io/address/${this.feedAddress}#code` + : `https://${this.feed.network}.etherscan.io/address/${this.feedAddress}#code` + }, numberOfPages() { return Math.ceil(this.feed.requests.length / this.itemsPerPage) },