diff --git a/packages/api/src/web3Middleware/dataFeeds.ts b/packages/api/src/web3Middleware/dataFeeds.ts index 5fe8df73..0cc0d8da 100644 --- a/packages/api/src/web3Middleware/dataFeeds.ts +++ b/packages/api/src/web3Middleware/dataFeeds.ts @@ -87,7 +87,7 @@ export const dataFeeds: Array = [ address: '0x0C4be6AA667df48de54BA174bE7948875fdf152B', abi: WitnetRequestBoardProxy as Array } - }, + } // // Kovan (id. 42) - v0.2.0: // // * BtcUsdPriceFeed: [0x9b3C5A6cB55E027d9ae6f265f6FB6fFA86e7b35E](https://kovan.etherscan.io/address/0x9b3C5A6cB55E027d9ae6f265f6FB6fFA86e7b35E#contracts) // // * EthUsdPriceFeed: [0xA996939e6a07a0D1D6376c59BE515d8441f5E9b8](https://kovan.etherscan.io/address/0xA996939e6a07a0D1D6376c59BE515d8441f5E9b8#contracts) diff --git a/packages/ui/components/DataFeedDetails.vue b/packages/ui/components/DataFeedDetails.vue index 198ed4d4..18b4d1ec 100644 --- a/packages/ui/components/DataFeedDetails.vue +++ b/packages/ui/components/DataFeedDetails.vue @@ -46,7 +46,7 @@ import { getWitnetBlockExplorerLink } from '@/utils/getWitnetBlockExplorerLink' export default { apollo: { feed: { - prefetch: true, + prefetch: false, query: feed, variables() { return { @@ -58,7 +58,7 @@ export default { pollInterval: 60000, }, requests: { - prefetch: true, + prefetch: false, query: requests, variables() { return { diff --git a/packages/ui/components/Main.vue b/packages/ui/components/Main.vue index d8e4d706..b0afda17 100644 --- a/packages/ui/components/Main.vue +++ b/packages/ui/components/Main.vue @@ -28,7 +28,7 @@ import feeds from '@/apollo/queries/feeds.gql' export default { apollo: { feeds: { - prefetch: true, + prefetch: false, query: feeds, variables() { return { @@ -54,25 +54,27 @@ export default { }, computed: { numberOfPages() { - return Math.ceil(this.feeds.total / this.itemsPerPage) + return this.feeds ? Math.ceil(this.feeds.total / this.itemsPerPage) : 1 }, allFeeds() { - return this.feeds.feeds.map((feed) => { - return { - detailsPath: { - name: 'feeds-id', - params: { id: feed.id }, - }, - name: feed.name, - value: feed.lastResult, - label: feed.label, - img: { - name: this.formatSvgName(feed.name), - alt: feed.name, - }, - network: feed.network, - } - }) + return this.feeds + ? this.feeds.feeds.map((feed) => { + return { + detailsPath: { + name: 'feeds-id', + params: { id: feed.id }, + }, + name: feed.name, + value: feed.lastResult, + label: feed.label, + img: { + name: this.formatSvgName(feed.name), + alt: feed.name, + }, + network: feed.network, + } + }) + : [] }, }, methods: {