Skip to content

Commit

Permalink
fix(ui): add contract link depending on the network
Browse files Browse the repository at this point in the history
  • Loading branch information
gabaldon committed Jul 19, 2021
1 parent 1980a30 commit 1b782c8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/ui/components/DataFeedDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
:title="$t('data_feed_details.contract_address')"
class="contract-container"
>
<a
:href="`https://rinkeby.etherscan.io/address/${feedAddress}#code`"
target="_blank"
class="contract-address"
>
<a :href="url" target="_blank" class="contract-address">
{{ feedAddress }}
<font-awesome-icon class="icon" icon="external-link-alt" />
</a>
Expand Down Expand Up @@ -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)
},
Expand Down

0 comments on commit 1b782c8

Please # to comment.