This repository was archived by the owner on Nov 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change 11'use strict'
22
33module . exports = {
4+ feedItemsPerPage : process . env . FEED_ITEMS_PER_PAGE || 30 ,
45 networkConfig : {
56 network : 'mainnet' ,
67 nftContract : 'KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton' ,
Original file line number Diff line number Diff line change 11'use strict'
22
3- const FEED_ITEMS_PER_PAGE = process . env . FEED_ITEMS_PER_PAGE || 30
4-
53const axios = require ( 'axios' )
64const conseil = require ( 'conseil' )
75const _ = require ( 'lodash' )
86
7+ const { feedItemsPerPage } = require ( 'config' )
8+
99module . exports = {
1010 getIpfsHash,
1111 getObjktById,
@@ -44,26 +44,26 @@ async function getObjktOwners(objkt) {
4444 ) . data
4545 const ownerCountList = _ . values ( owners )
4646
47- let total = 0 ;
47+ let total = 0
4848
4949 if ( ownerCountList . length ) {
5050 total = ownerCountList . reduce ( ( acc , i ) => {
51- const owned = parseInt ( i )
51+ const owned = parseInt ( i )
5252
53- return owned > 0 ? acc + owned : acc
53+ return owned > 0 ? acc + owned : acc
5454 } , 0 )
5555 }
5656
5757 return {
5858 total_amount : total ,
59- owners
59+ owners,
6060 }
6161}
6262
6363function paginateFeed ( feed , cursor ) {
6464 return feed . slice (
65- cursor * FEED_ITEMS_PER_PAGE ,
66- cursor * FEED_ITEMS_PER_PAGE + FEED_ITEMS_PER_PAGE
65+ cursor * feedItemsPerPage ,
66+ cursor * feedItemsPerPage + feedItemsPerPage
6767 )
6868}
6969
You can’t perform that action at this time.
0 commit comments