{"version":3,"sources":["assets/newLogo.svg","assets/images/chevron.svg","assets/eth.png","assets/newDemo.png","assets/images/loader_thin.svg","assets/logo-white.svg","assets/logo.svg","contexts/LocalStorage.js","Theme/index.js","apollo/client.js","constants/index.js","apollo/queries.js","utils/tokenLists.ts","contexts/Application.js","utils/index.js","utils/data.ts","contexts/SecTokens.js","contexts/PairData.js","contexts/GlobalData.js","contexts/TokenData.js","utils/returns.ts","contexts/User.js","components/analytics/GoogleAnalyticsReporter.jsx","components/LocalLoader/index.js","utils/etherscan.ts","components/Link/index.js","components/index.js","components/Row/index.js","components/Column/index.js","components/DropdownSelect/index.js","hooks/wrappedTokenInfo.ts","hooks/lists.ts","hooks/index.ts","components/Popover/index.tsx","components/QuestionHelper/index.tsx","components/FormattedName/index.js","components/TxnList/index.js","components/Panel/index.js","components/ButtonStyled/index.js","components/UserChart/index.js","components/PairReturnsChart/index.js","components/TokenLogo/index.js","components/DoubleLogo/index.js","components/PositionList/index.js","components/MiningPositionList/index.js","components/Search/index.js","pages/AccountPage.js","components/Input/index.tsx","utils/formatAmount.ts","components/PoolCard/index.tsx","Theme/wrappers.tsx","assets/sideBar.svg","utils/filter.ts","assets/close.svg","components/Header/index.tsx","Theme/components.tsx","assets/show-more.svg","components/LoaderThin/index.tsx","components/CryptoCard/index.tsx","pages/AllPairsPage.js","components/Pagination/index.tsx","components/Table/index.tsx","components/PairsTable/index.tsx","components/PairTransactionsTable/index.tsx","pages/AllPoolsPage.js","components/TokenList/index.js","pages/AllTokensPage.js","components/Copy/index.js","components/HoverText/index.tsx","components/PairChart/index.js","components/PoolPage/styleds.js","components/Warning/index.js","pages/PairPage.js","pages/PoolPage.js","components/PairList/index.js","components/CandleChart/index.js","components/TokenChart/index.js","components/Checkbox/index.js","pages/TokenPage.js","App.js","index.js"],"names":["module","exports","UPDATABLE_KEYS","LocalStorageContext","createContext","useLocalStorageContext","useContext","reducer","state","type","payload","key","value","some","k","Error","init","defaultLocalStorage","parsed","JSON","parse","window","localStorage","getItem","Provider","children","useReducer","undefined","dispatch","updateKey","useCallback","useMemo","Updater","useEffect","setItem","stringify","Math","floor","Date","now","useDarkModeManager","isDarkMode","toggleDarkMode","usePathDismissed","path","newPaths","ThemeProvider","darkMode","theme","color","customColor","textColor","panelColor","backgroundColor","ixswapPink","concreteGray","inputBackground","shadowColor","mercuryGray","text1","text2","text3","text4","text5","text6","white","bg1","bg2","bg3","bg4","bg5","bg6","bg7","bg8","bg9","modalBG","advancedBG","onlyLight","divider","primary1","primary2","primary3","primary4","primary5","primaryText1","secondary1","secondary2","secondary3","shadow1","red1","green1","yellow1","yellow2","link","blue","blue1","borderG1","background","background1","bgG1","bgG3","TextWrapper","styled","Text","TYPE","main","props","fontWeight","fontSize","primary","lineHeight","body","small","header","largeHeader","light","lightText","pink","faded","gradient","main1","ThemedBackground","div","css","a","attrs","target","rel","GlobalStyle","createGlobalStyle","client","ApolloClient","HttpLink","uri","cache","InMemoryCache","shouldBatch","healthClient","stakingClient","blockClient","API_URL","timeframeOptions","WEEK","MONTH","YEAR","HALF_YEAR","ALL_TIME","SUPPORTED_LIST_URLS__NO_ENS","TOKEN_BLACKLIST","PAIR_BLACKLIST","BLOCKED_WARNINGS","FEE_WARNING_TOKENS","UNTRACKED_COPY","TRACKED_OVERRIDES","CHAINS","WETH","usedChain","SUBGRAPH_HEALTH","gql","GET_BLOCK","GET_BLOCKS","timestamps","queryString","map","timestamp","PRICES_BY_BLOCK","tokenAddress","blocks","block","number","HOURLY_PAIR_RATES","pairAddress","SHARE_VALUE","ETH_PRICE","USER_MINTS_BUNRS_PER_PAIR","USER_HISTORY","USER_POSITIONS","USER_TRANSACTIONS","PAIR_CHART","PAIR_DAY_DATA_BULK","pairs","startTimestamp","pairsString","pair","GLOBAL_CHART","GLOBAL_DATA","ALL_TOKENS","TOKEN_SEARCH","PAIR_SEARCH","ALL_PAIRS","PairFields","PAIRS_CURRENT","PAIR_DATA","MINING_POSITIONS","account","PAIRS_BULK","PAIRS_HISTORICAL_BULK","TOKEN_CHART","TokenFields","TOKEN_TOP_DAY_DATAS","TOKENS_HISTORICAL_BULK","tokens","tokenString","token","TOKEN_DATA","FILTERED_TRANSACTIONS","uriToHttp","split","toLowerCase","substr","hash","match","name","tokenListValidator","Ajv","allErrors","compile","schema","getTokenList","listUrl","urls","i","length","url","isLast","response","fetch","console","debug","ok","json","validationErrors","errors","reduce","memo","error","add","dataPath","message","dayjs","extend","utc","ApplicationContext","useApplicationContext","currency","newTimeFrame","supportedTokens","INITIAL_STATE","CURRENCY","TIME_KEY","update","updateTimeframe","updateSessionStart","updateSupportedTokens","updateLatestBlock","updateHeadBlock","useLatestBlocks","latestBlock","headBlock","query","then","res","syncedBlock","data","indexingStatusForCurrentVersion","chains","chainHeadBlock","catch","e","log","useTimeframe","toFormat","_Decimal","getTimeframe","timeWindow","utcStartTime","utcEndTime","subtract","endOf","unix","startOf","getPoolLink","token0Address","token1Address","remove","getSwapLink","getIxswapAppLink","linkVariable","BigNumber","set","EXPONENTIAL_AT","toNiceDate","date","format","shortenAddress","address","chars","isAddress","substring","getTimestampsForChanges","utcCurrentTime","splitQuery","localClient","vars","list","skipCount","fetchedData","allFound","skip","end","sliced","slice","fetchPolicy","result","Object","keys","getBlockFromTimestamp","variables","timestampFrom","timestampTo","getBlocksFromTimestamps","t","push","getShareValueOverTime","utcSevenDaysBack","getTimestampRange","row","values","sharePriceUsd","parseFloat","reserveUSD","totalSupply","reserve0","reserve1","token0DerivedETH","token0","derivedETH","token1DerivedETH","token1","roiUsd","ethPrice","token0PriceUSD","token1PriceUSD","brow","index","timestamp_from","period_length","periods","toNiceDateYear","ethers","utils","getAddress","toK","num","Numeral","formatTime","inSeconds","diff","inMinutes","inHours","inDays","formatDollarAmount","digits","Intl","NumberFormat","style","minimumFractionDigits","maximumFractionDigits","formattedNum","usd","isNaN","toFixed","Number","toLocaleString","toString","formattedPercent","percent","fixedPercent","get2DayPercentChange","valueNow","value24HoursAgo","value48HoursAgo","currentChange","previousChange","adjustedPercentChange","isFinite","getPercentChange","TOKEN_OVERRIDES","symbol","updateNameData","id","includes","SAVE","SecTokenContext","useSecTokenContext","objectSecTokens","secTokens","accum","item","save","getSecTokens","axios","get","errorMessage","getData","safeAccess","object","accumulator","currentValue","PairDataContext","usePairDataContext","topPairs","added","transactions","txns","chartData","hourlyData","updateTopPairs","updatePairTxns","updateChartData","updateHourlyData","getBulkPairData","pairList","t1","t2","tWeek","b1","b2","bWeek","allPairs","current","Promise","all","oneDayResult","twoDayResult","oneWeekResult","oneDayData","obj","cur","twoDayData","oneWeekData","oneDayHistory","newData","twoDayHistory","oneWeekHistory","parseData","pairData","oneDayBlock","volumeUSD","oneDayVolumeUSD","volumeChangeUSD","untrackedVolumeUSD","oneDayVolumeUntracked","volumeChangeUntracked","oneWeekVolumeUSD","oneWeekVolumeUntracked","trackedReserveUSD","trackedReserveETH","liquidityChangeUSD","createdAtBlockNumber","getPairTransactions","mints","burns","swaps","getPairChartData","startTime","concat","pairDayDatas","dayIndexSet","Set","dayIndexArray","forEach","dayData","dailyVolumeUSD","latestLiquidityUSD","currentDayIndex","nextDay","has","dayString","sort","b","parseInt","getHourlyRateData","time","filter","rate0","token0Price","rate1","token1Price","formattedHistoryRate0","formattedHistoryRate1","open","close","useEthPrice","formattedPairs","usePairData","fetchData","usePairTransactions","pairTxns","checkForTxns","useAllPairData","shouldFilterOutPair","lowercasedBlacklistTokens","hardcodedSecPairs","usePairs","useSecTokensData","distributedPairs","visiblePairs","adjustedPairs","secPairs","cryptoPairs","offsetVolumes","weekOfYear","GlobalDataContext","useGlobalDataContext","globalData","daily","weekly","oneDayPrice","ethPriceChange","allTokens","topLps","updateTransactions","updateChart","updateEthPrice","updateAllPairsInIxswap","updateAllTokensInIxswap","updateTopLps","getGlobalData","oldEthPrice","utcOneDayBack","utcTwoDaysBack","utcOneWeekBack","utcTwoWeeksBack","twoDayBlock","oneWeekBlock","twoWeekBlock","ixsFactories","twoWeekResult","twoWeekData","totalVolumeUSD","oneWeekVolume","weeklyVolumeChange","txCount","oneDayTxns","txnChange","totalLiquidityUSD","totalLiquidityETH","checked","getChartData","oldestDateToFetch","offsetData","weeklyData","uniswapDayDatas","latestDayDats","mostLiquidTokens","startIndexWeekly","currentWeek","entry","week","weeklyVolumeUSD","getEthPrice","ethPriceOneDay","priceChangeETH","resultOneDay","currentPrice","bundles","oneDayBackPrice","getAllPairsOnIxswap","getAllTokensOnIxswap","useGlobalData","totalValue","totalValueLockedSecurity","totalValueLockedCrypto","secPairKeys","totalValueLocked","useGlobalChartData","useState","oldestDateFetch","setOldestDateFetched","activeWindow","chartDataDaily","chartDataWeekly","combinedData","tokenAddresses","useTokenDataContext","datas","acc","isMissingData","val","formattedByDate","dayDatas","getTokenChartData","fetchDatas","useTokenChartDataCombined","newChartData","newWeeklyData","ethPriceOld","newPrice","priceChange","checkForEthPrice","TokenDataContext","topTokens","combinedVol","interval","updateTopTokens","updateCombinedVolume","updateTokenTxns","updateAllPairs","updatePriceData","getTopTokens","currentDate","tokenids","ids","tokenDayDatas","tradeVolumeUSD","currentLiquidityUSD","totalLiquidity","oldLiquidityUSD","priceChangeUSD","priceUSD","oneDayVolumeETH","tradeVolume","aaveData","bulkResults","getTokenData","oneDayVolumeUT","volumeChangeUT","getTokenTransactions","allPairsFormatted","getTokenPairs","getIntervalTokenData","formattedHistory","tokenAddr","latestPriceUSD","latestPairDatas","mostLiquidPairs","useTokenData","tokenData","useTokenPriceData","currentTime","windowSize","useAllTokenData","priceOverrides","formatPricesForEarlyTimestamps","position","getPrincipalForUserPerPair","user","amount0","amount1","results","mint","mintToken0","mintToken1","amountUSD","burn","burnToken0","burnToken1","getMetricsForPositionWindow","positionT0","positionT1","t0Ownership","liquidityTokenBalance","liquidityTokenTotalSupply","t1Ownership","token0_amount_t0","token1_amount_t0","token0_amount_t1","token1_amount_t1","sqrK_t0","sqrt","priceRatioT1","token0_amount_no_fees","token1_amount_no_fees","no_fees_usd","difference_fees_token1","difference_fees_usd","assetValueT0","assetValueT1","imp_loss_usd","ixswap_return","netValueT0","hodleReturn","netReturn","ixswapReturn","impLoss","fees","getHistoricalPairReturns","startDateTimestamp","currentPairData","pairSnapshots","currentETHPrice","createdAtTimestamp","dayIndex","round","sortedPositions","dayTimestamps","shareValues","shareValuesFormatted","share","netFees","dayTimestamp","timestampCeiling","dailyChanges","snapshot","localReturns","currentLiquidityValue","localFees","usdValue","getLPReturnsOnPair","snapshots","principal","currentPosition","net","return","ixswap","sum","UserContext","useUserContext","positions","miningPositions","historyData","updatePositions","updateMiningPositions","updateUserSnapshots","updateUserPairReturns","useUserSnapshots","allResults","found","liquidityPositionSnapshots","useUserPositionChart","setStartDateTimestamp","useStartTimestamp","currentSnapshot","GoogleAnalyticsReporter","location","pathname","search","ReactGA","pageview","ExplorerDataType","pulse","keyframes","Wrapper","fill","height","AnimatedImg","LocalLoader","src","require","alt","ETHERSCAN_HOSTNAMES","getExplorerLink","chainId","prefix","TRANSACTION","TOKEN","BLOCK","ADDRESS","Link","external","rest","CustomLink","RouterLink","lighten","darken","BasicLink","Divider","Box","BlockedWrapper","BlockedMessageWrapper","Hover","fade","StyledIcon","EmptyCard","PageWrapper","span","ul","li","isActive","ContentWrapper","ContentWrapperLarge","FullWrapper","Row","align","padding","border","borderRadius","justify","RowBetween","RowStart","AutoRow","wrap","gap","RowFixed","Column","AutoColumn","Dropdown","ArrowStyled","Arrow","DropDownRow","DropdownSelect","options","active","setActive","showDropdown","toggleDropdown","onClick","option","WrappedTokenInfo","tokenInfo","isNative","isToken","isSecToken","_checksummedAddress","_tags","this","checksummedAddress","contractAddress","decimals","description","logoURI","tags","listTags","tagId","other","equals","listToTokenMap","map2","transformMap","tokenMap","useColor","setColor","TRANSFORMED_DEFAULT_TOKEN_LIST","DEFAULT_TOKEN_LIST","Vibrant","from","getPalette","err","palette","detectedHex","hex","AAscore","shade","PopoverContainer","show","transparentize","ReferenceElement","Popover","content","placement","referenceElement","setReferenceElement","popperElement","setPopperElement","arrowElement","usePopper","strategy","modifiers","offset","element","styles","attributes","callback","delay","savedCallback","useRef","tick","setInterval","clearInterval","useInterval","ref","popper","QuestionWrapper","TooltipContainer","Tooltip","text","QuestionHelper","disabled","setShow","marginLeft","onMouseEnter","onMouseLeave","size","margin","adjustSize","FormattedName","maxCharacters","showHover","setShowHover","PageButtons","List","DashGrid","ClickableText","DataText","Flex","SortText","button","SORT_FIELD","TXN_TYPE","ALL","SWAP","ADD","REMOVE","getTransactionType","event","symbol0","symbol1","formattedS0","formattedS1","TxnList","symbol0Override","symbol1Override","page","setPage","maxPage","setMaxPage","sortDirection","setSortDirection","sortedColumn","setSortedColumn","filteredItems","setFilteredItems","txFilter","setTxFilter","toggleCurrency","useCurrentCurrency","newTxns","newTxn","transaction","token0Amount","token1Amount","to","token0Symbol","token1Symbol","sender","swap","netToken0","amount0In","amount0Out","netToken1","amount1In","amount1Out","abs","filtered","extraPages","filteredList","below1080","useMedia","below780","ListItem","area","href","valueETH","center","pl","alignItems","justifyContent","p","panelPseudo","Panel","RebassBox","hover","grouped","rounded","last","Base","RebassButton","BaseCustom","ButtonLight","ButtonDropdown","ButtonFaded","ope","display","ButtonDark","PrimaryButton","ButtonIXSGradient","ButtonGradientBorder","ButtonIXSSecondaryGradient","OptionButton","ChartWrapper","UserChart","history","setFormattedHistory","ownershipPerPair","relevantPositions","lpTokenBalance","dailyUSD","dayDatasForThisPair","mostRecent","totalUSD","valueUSD","useUserLiquidityChart","setTimeWindow","below600","domain","dataMin","aspect","mb","top","right","bottom","left","barCategoryGap","x1","y1","x2","y2","stopColor","stopOpacity","tickLine","axisLine","tickMargin","minTickGap","tickFormatter","dataKey","orientation","yAxisId","cursor","formatter","labelFormatter","label","labelStyle","paddingTop","contentStyle","borderColor","wrapperStyle","stackId","strokeWidth","dot","stroke","OptionsRow","CHART_VIEW","PairReturnsChart","chartView","setChartView","flexWrap","strokeDasharray","BAD_IMAGES","Inline","Image","img","StyledEthereumLogo","TokenLogo","setError","NewDemo","width","EthereumLogo","boxShadow","onError","preventDefault","DoubleTokenLogo","a0","a1","TokenWrapper","sizeraw","HigherLogo","CoveredLogo","ListWrapper","VALUE","IXSWAP_RETURN","withRouter","below500","below740","poolOwnership","opacity","focus","whiteSpace","marginRight","positionsSorted","p0","p1","PRINCIPAL","HODL","hodl","miningPosition","pairPercentage","balance","valueFirstPair","valueSecondPair","firstPairName","miningPool","secondPairName","firstPairAddress","secondPairAddress","miningPositionsSorted","Container","Input","input","large","SearchIconLarge","SearchIcon","CloseIcon","X","Menu","hide","MenuItem","Heading","Gray","Blue","Search","useAllTokensInIXSwap","allTokenData","useAllPairsInIXSwap","allPairData","showMenu","toggleMenu","setValue","toggleShadow","toggleBottomShadow","below700","below470","below410","searchedTokens","setSearchedTokens","searchedPairs","setSearchedPairs","escapeRegExp","string","replace","toUpperCase","asSymbol","as0","as1","asAddress","foundTokens","asName","searchedToken","included","uniqueTokens","searchedPair","uniquePairs","pairsFound","filteredTokenList","tokenA","tokenB","tokenEntryKey","RegExp","m","filteredPairList","pairA","pairB","field","tokensShown","setTokensShown","pairsShown","setPairsShown","onDismiss","wrapperRef","menuRef","handleClick","contains","document","addEventListener","removeEventListener","shadow","placeholder","onChange","onFocus","AccountWrapper","Header","DashboardWrapper","DropdownWrapper","Flyout","MenuRow","PanelWrapper","Warning","AccountPage","useUserTransactions","liquidityPositions","positionData","returnData","formattedPositions","useUserPositions","miningPositionData","useMiningPositions","transactionCount","totalSwappedUSD","total","showWarning","setShowWarning","hideLPContent","setShowDropdown","activePosition","setActivePosition","dynamicPositions","aggregateFees","positionValue","scrollTo","behavior","savedAccounts","addAccount","removeAccount","indexOf","useSavedAccounts","isBookmarked","handleBookmarkClick","ml","marginBottom","gridColumn","marginTop","formatAmount","amount","Card","_rect","_rect2","_path","_path2","searchPairs","searchKey","currentPair","name0","name1","_extends","assign","arguments","source","prototype","hasOwnProperty","call","apply","_objectWithoutProperties","excluded","sourceKeys","_objectWithoutPropertiesLoose","getOwnPropertySymbols","sourceSymbolKeys","propertyIsEnumerable","_ref","svgRef","title","createElement","viewBox","x","y","rx","d","strokeLinecap","strokeLinejoin","ForwardRef","forwardRef","MobileHeaderWrapper","flexColumn","isOpen","HeaderWrapper","flexRowNoWrap","MenuIcon","MobileLinksContainer","MobileMenuItem","Title","LinksContainer","DropdownMenu","Spacer","FarmingDropdownMenu","FarmingDropdown","hideButton","setIsOpen","closeMenu","isMobile","as","LogoDark","StyledInternalLink","_circle","_circle2","_circle3","SvgIconWrapper","flexColumnNoWrap","rotate","StyledRotate","LoaderThin","LoadingThin","cx","cy","r","CryptoCard","overflow","textOverflow","Grid","PairTabs","AllPairsPage","searchValue","filteredSecPairs","filteredCryptoPairs","visibleSec","visibleCrypto","showSec","showCrypto","maxWidth","Boolean","poolId","Pagination","onPageChange","totalPages","Button","Prev","arrowIcon","Next","Table","Wrap","rowStyle","HeaderRow","BodyRow","headerCells","StyledHeaderRow","cell","Body","items","pageLimit","StyledBodyRow","PairsTable","ceil","NoData","newPage","ActiveSortItemBottom","sortItems","handleFilterChange","__typename","PairTransactionsTable","setTotalPages","newTxFilter","newFilteredItems","AllPoolsPage","setSearchValue","useHistory","usedPairs","filteredPairs","setFilteredPairs","visiblePools","tvl","goBack","paddingLeft","currentTarget","normalizedSearch","trim","newPairs","itemMax","useTracked","below680","formattedTokens","AllTokensPage","CopyIcon","TransactionStatusText","CopyHelper","toCopy","timeout","isCopied","setIsCopied","staticCopy","didCopy","copy","setTimeout","clearTimeout","useCopyClipboard","setCopied","HoverText","VOLUME","LIQUIDITY","TVL","PRICE","filterItems","timeFrames","PairChart","base0","base1","chartFilter","setChartFilter","isClient","container","clientWidth","setWidth","clientHeight","setHeight","handleResize","checkForChartData","usePairChartData","useHourlyRateData","below1600","latestValue","setLatestValue","body1","selectedKey","initializeLatestvalue","my","Wallet","TokenDetailsLayout","FixedPanel","HoverSpan","WarningIcon","AlertCircle","WarningGrouping","WarningWrapper","StyledWarningIcon","AlertTriangle","below800","textContent","mt","minWidth","querySelector","formattedLiquidity","usingUntrackedLiquidity","liquidityChange","volume","usingUtVolume","volumeChange","showUSDWaning","token0USD","token1USD","token0Rate","token1Rate","formattedSymbol0","formattedSymbol1","below900","dismissed","markAsDismissed","newList","useSavedPairs","savedPairs","addPair","textAlign","flexDirection","mr","gridRow","CardsGrid","StyledPoolCard","below540","FIELD_TO_VALUE","formatDataText","trackedValue","supressWarning","showUntracked","disbaleLinks","maxItems","ITEMS_PER_PAGE","liquidity","apy","weekVolume","addressA","addressB","IconWrapper","CandleStickChart","base","valueFormatter","formattedData","low","high","min","max","chartCreated","setChartCreated","dataPrev","usePrevious","previousTheme","tooltip","getElementById","removeChild","resize","setLastBarText","toolTip","innerHTML","chart","createChart","layout","grid","vertLines","horzLines","crosshair","mode","CrosshairMode","Normal","rightPriceScale","visible","timeScale","localization","priceFormatter","candleSeries","addCandlestickSeries","upColor","downColor","borderDownColor","borderUpColor","wickDownColor","wickUpColor","setData","setAttribute","className","appendChild","subscribeCrosshairMove","param","point","price","seriesPrices","fitContent","scrollToPosition","PriceOption","LINE_PRICE","DATA_FREQUENCY","TokenChart","frequency","setFrequency","addressPrev","useTokenChartData","prevWindow","hourlyWeek","hourlyMonth","hourlyAll","dailyWeek","dailyMonth","dailyAll","priceData","StyleCheckbox","ButtonText","CheckBox","setChecked","fetchedPairsList","stale","setStale","fetched","setFetched","newFetched","unfetched","currentData","newPairData","fetchNewPairData","useDataForList","tokenPairs","useTokenPairs","tokenTxns","TOKEN_PAIRS_KEY","useTokenTransactions","txnChangeFormatted","LENGTH","formattedSymbol","useSavedTokens","savedTokens","addToken","removeToken","listedTokens","fetchedTokens","tokensSoFar","newTokens","resolve","allFetched","formatted","fetchList","useListedTokens","setUseTracked","alingItems","alignSelf","Checkbox","AppWrapper","Center","WarningBanner","LayoutWrapper","savedOpen","setSavedOpen","App","globalChartData","ReactRouterRoute","Route","component","exacts","strict","render","params","accountAddress","ContextProviders","Updaters","initialize","process","gaOptions","storage","storeGac","anonymizeIp","customBrowserType","ReactD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,OACTC,UAAU,KAGdj0B,IAAQjc,IAAI,CACVmwC,aAAa,EACbC,kBAAoB3T,WAEhB,SAAUrtC,QAAU,aAAcA,OAClC,aACA,gBAHA,YAsCRihD,IAASZ,OACP,kBAACG,GAAD,KACE,kBAACC,GAAD,MACA,kBAACh/C,EAAD,KACE,oCACE,kBAACkF,GAAD,MACA,kBAAC,GAAD,SAINggC,SAAS6S,eAAe,W","file":"static/js/main.eaa94f93.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/newLogo.bd6c52fe.svg\";","module.exports = __webpack_public_path__ + \"static/media/chevron.56d4606b.svg\";","module.exports = __webpack_public_path__ + \"static/media/eth.5fc0c9bd.png\";","module.exports = \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAACXBIWXMAABYlAAAWJQFJUiTwAAAAGXRFWHRTb2Z0d2FyZQB3d3cuaW5rc2NhcGUub3Jnm+48GgAABtlJREFUaIHNWluPI0cV/s7p6ptnRr5MPBOyZKWNEh5AkGijTARS/gIIokWAiMQjeQj7W5I8hDckiLKRIojgH0CEILsMShAvSE54CDsbj2N7nbXd9zo82B53t7s9tsezm0/yg6tOVZ1TderUqa+aRARbgNFu+1cdh69rLUeAvADIMwA1J9VyCqAF8B0RfZuZjms15zMAyUUHpgsYwPfvj58F+KYIfg7AWGtgQgLgbUC/XqtVPgagN1FiEwOM+/fDH2it3yLCwSaD5iGCe4bBN6tV6w9Yc1XWMqDb9Y4A/JGZHl9Tx5UgIm1m+nGt5vxl1Ta8ilCrBbvf995lpg9XUV5EkCQ681tloojoUAR/7vfDd1qtlr2KbueuQLeLK4B3h5m+ViajtSCOE0TRcmWJCEoxDINhmgaYacnIcqI1jvb33bsbG9DrDb8FqH8QwSmqj+MEQZAgjjcLJkoxbNuEUqWOEADJUb2+868ygVID+v3w24D+CAVuprWG50WI4/LAQUSg6QSLYKkLKcVwXRPMhYZoIuP5Ws38aGUDPA9XfN//BMCCH4ZhDN+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WZC75tL+ZjSTK5QTIANJuVj7WW07SAUpxJZ3u98VImbluIY41eb1yqBzCh45vNCd04q9EAXs135rrm2VGutaDTGRblI1tD0RhF1Iph8GuYPoikeSGj2/Xu5u/GYRhnLtaOoy6FmdBacHo6zITtYqpRTup19yqmDyHptUksy/xhvmPLUplOfD9Gu/1gq+4Uxxrt9oOM8vlxz9QXvIzUK07Gufb21N8A3Mo3mhG2MwRBgpOTLzEchhfKlUQEw2GIk5Mvc6yckbnMpPBOmpUDSsjdXs/7lGhVctdAtepuQO5GGAyClcldEbnX67nXnn76HHIXALpd7wozldLrRWTTnF43YZqTV5g0va61Rhgm8P24kF4nmlxft0GvA/hKPXAkAD9Xr1v/LhxnWcfDYfjNMNTH5U9MGkGw3JBlUMqAbavLeWKaYTzGE0Hg3QHoiTIZrQVRlCCONbTWpWfF7I5tmgyllj/yichdreWoyG3WMgAAWq2W3Wh8/TdE+Om5wpj5fLbf4ny+tP2tRsP9BYBzGbG1H7qZ8f6y1bgItJZTw6Ab6zx0b/SpQa/n/UgEb2zrxX6ah/1yf9/9Ey7zU4McuNMZP2ua6jVAv5LnV1dATITfRlHy5jQxe2gfeyzgvfdgvPSS/6RpynVmHInI80T0jRnnRCQdEfqPiBwbhnHb9/U/P/jA+ezGjYt/bvN/IHylmfanpf8AAAAASUVORK5CYII=\"","module.exports = __webpack_public_path__ + \"static/media/loader_thin.06fc2cc4.svg\";","module.exports = __webpack_public_path__ + \"static/media/logo-white.d28debf7.svg\";","module.exports = __webpack_public_path__ + \"static/media/logo.9bb8c009.svg\";","import React, { createContext, useContext, useReducer, useMemo, useCallback, useEffect } from 'react'\n\nconst IXSWAP = 'IXSWAP'\n\nconst VERSION = 'VERSION'\nconst CURRENT_VERSION = 0\nconst LAST_SAVED = 'LAST_SAVED'\nconst DISMISSED_PATHS = 'DISMISSED_PATHS'\nconst SAVED_ACCOUNTS = 'SAVED_ACCOUNTS'\nconst SAVED_TOKENS = 'SAVED_TOKENS'\nconst SAVED_PAIRS = 'SAVED_PAIRS'\n\nconst DARK_MODE = 'DARK_MODE'\n\nconst UPDATABLE_KEYS = [DARK_MODE, DISMISSED_PATHS, SAVED_ACCOUNTS, SAVED_PAIRS, SAVED_TOKENS]\n\nconst UPDATE_KEY = 'UPDATE_KEY'\n\nconst LocalStorageContext = createContext()\n\nfunction useLocalStorageContext() {\n return useContext(LocalStorageContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE_KEY: {\n const { key, value } = payload\n if (!UPDATABLE_KEYS.some((k) => k === key)) {\n throw Error(`Unexpected key in LocalStorageContext reducer: '${key}'.`)\n } else {\n return {\n ...state,\n [key]: value,\n }\n }\n }\n default: {\n throw Error(`Unexpected action type in LocalStorageContext reducer: '${type}'.`)\n }\n }\n}\n\nfunction init() {\n const defaultLocalStorage = {\n [VERSION]: CURRENT_VERSION,\n [DARK_MODE]: true,\n [DISMISSED_PATHS]: {},\n [SAVED_ACCOUNTS]: [],\n [SAVED_TOKENS]: {},\n [SAVED_PAIRS]: {},\n }\n\n try {\n const parsed = JSON.parse(window.localStorage.getItem(IXSWAP))\n if (parsed[VERSION] !== CURRENT_VERSION) {\n // this is where we could run migration logic\n return defaultLocalStorage\n } else {\n return { ...defaultLocalStorage, ...parsed }\n }\n } catch {\n return defaultLocalStorage\n }\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, undefined, init)\n\n const updateKey = useCallback((key, value) => {\n dispatch({ type: UPDATE_KEY, payload: { key, value } })\n }, [])\n\n return (\n [state, { updateKey }], [state, updateKey])}>\n {children}\n \n )\n}\n\nexport function Updater() {\n const [state] = useLocalStorageContext()\n\n useEffect(() => {\n window.localStorage.setItem(IXSWAP, JSON.stringify({ ...state, [LAST_SAVED]: Math.floor(Date.now() / 1000) }))\n })\n\n return null\n}\n\nexport function useDarkModeManager() {\n const [state, { updateKey }] = useLocalStorageContext()\n let isDarkMode = state[DARK_MODE]\n const toggleDarkMode = useCallback(\n (value) => {\n updateKey(DARK_MODE, value === false || value === true ? value : !isDarkMode)\n },\n [updateKey, isDarkMode]\n )\n return [isDarkMode, toggleDarkMode]\n}\n\nexport function usePathDismissed(path) {\n const [state, { updateKey }] = useLocalStorageContext()\n const pathDismissed = state?.[DISMISSED_PATHS]?.[path]\n function dismiss() {\n let newPaths = state?.[DISMISSED_PATHS]\n newPaths[path] = true\n updateKey(DISMISSED_PATHS, newPaths)\n }\n\n return [pathDismissed, dismiss]\n}\n\nexport function useSavedAccounts() {\n const [state, { updateKey }] = useLocalStorageContext()\n const savedAccounts = state?.[SAVED_ACCOUNTS]\n\n const addAccount = useCallback(\n (account) => {\n updateKey(SAVED_ACCOUNTS, [...(savedAccounts ?? []), account])\n },\n [savedAccounts, updateKey]\n )\n\n const removeAccount = useCallback(\n (account) => {\n let index = savedAccounts?.indexOf(account) ?? -1\n if (index > -1) {\n updateKey(SAVED_ACCOUNTS, [\n ...savedAccounts.slice(0, index),\n ...savedAccounts.slice(index + 1, savedAccounts.length),\n ])\n }\n },\n [savedAccounts, updateKey]\n )\n\n return [savedAccounts, addAccount, removeAccount]\n}\n\nexport function useSavedPairs() {\n const [state, { updateKey }] = useLocalStorageContext()\n const savedPairs = state?.[SAVED_PAIRS]\n\n function addPair(address, token0Address, token1Address, token0Symbol, token1Symbol) {\n let newList = state?.[SAVED_PAIRS]\n newList[address] = {\n address,\n token0Address,\n token1Address,\n token0Symbol,\n token1Symbol,\n }\n updateKey(SAVED_PAIRS, newList)\n }\n\n function removePair(address) {\n let newList = state?.[SAVED_PAIRS]\n newList[address] = null\n updateKey(SAVED_PAIRS, newList)\n }\n\n return [savedPairs, addPair, removePair]\n}\n\nexport function useSavedTokens() {\n const [state, { updateKey }] = useLocalStorageContext()\n const savedTokens = state?.[SAVED_TOKENS]\n\n function addToken(address, symbol) {\n let newList = state?.[SAVED_TOKENS]\n newList[address] = {\n symbol,\n }\n updateKey(SAVED_TOKENS, newList)\n }\n\n function removeToken(address) {\n let newList = state?.[SAVED_TOKENS]\n newList[address] = null\n updateKey(SAVED_TOKENS, newList)\n }\n\n return [savedTokens, addToken, removeToken]\n}\n","import React from 'react'\nimport { ThemeProvider as StyledComponentsThemeProvider, createGlobalStyle } from 'styled-components'\nimport { useDarkModeManager } from '../contexts/LocalStorage'\nimport styled, { css } from 'styled-components'\nimport { Text } from 'rebass'\n\nexport default function ThemeProvider({ children }) {\n const [darkMode] = useDarkModeManager()\n\n return {children}\n}\n\nconst theme = (darkMode, color) => ({\n customColor: color,\n textColor: darkMode ? color : 'black',\n\n panelColor: darkMode ? 'rgba(255, 255, 255, 0)' : 'rgba(255, 255, 255, 0)',\n backgroundColor: darkMode ? '#212429' : '#F7F8FA',\n\n ixswapPink: darkMode ? '#ff007a' : 'black',\n\n concreteGray: darkMode ? '#292C2F' : '#FAFAFA',\n inputBackground: darkMode ? '#1F1F1F' : '#FAFAFA',\n shadowColor: darkMode ? '#FFFFFF' : '#2F80ED',\n mercuryGray: darkMode ? '#333333' : '#E1E1E1',\n\n text1: darkMode ? '#292933' : '#292933',\n text2: darkMode ? '#B8B8CC' : '#B8B8CC',\n text3: darkMode ? '#666680' : '#666680',\n text4: darkMode ? '#565A69' : '#B8B8CC',\n text5: darkMode ? '#2C2F36' : '#EDEEF2',\n text6: darkMode ? '#EDCEFF' : '#EDCEFF',\n\n // special case text types\n white: '#FFFFFF',\n\n // backgrounds / greys\n bg1: darkMode ? '#212429' : '#FAFAFA',\n bg2: darkMode ? '#2C2F36' : '#F7F8FA',\n bg3: darkMode ? '#40444F' : '#EDEEF2',\n bg4: darkMode ? '#565A69' : '#CED0D9',\n bg5: darkMode ? '#565A69' : '#888D9B',\n bg6: darkMode ? '#FFFFFF' : '#FFFFFF',\n bg7: darkMode ? '#FFFFFF' : '#FFFFFF',\n bg8: darkMode ? '#271F4A' : '#271F4A',\n bg9: darkMode ? '#1A123A' : '#1A123A',\n //specialty colors\n modalBG: darkMode ? 'rgba(0,0,0,0.85)' : 'rgba(0,0,0,0.6)',\n advancedBG: darkMode ? 'rgba(0,0,0,0.1)' : 'rgba(255,255,255,0.4)',\n onlyLight: darkMode ? '#FFFFFF' : 'transparent',\n divider: darkMode ? 'rgba(43, 43, 43, 0.435)' : 'rgba(43, 43, 43, 0.035)',\n\n //primary colors\n primary1: darkMode ? '#2172E5' : '#ff007a',\n primary2: darkMode ? '#3680E7' : '#FF8CC3',\n primary3: darkMode ? '#4D8FEA' : '#FF99C9',\n primary4: darkMode ? '#376bad70' : '#F6DDE8',\n primary5: darkMode ? '#153d6f70' : '#FDEAF1',\n\n // color text\n primaryText1: darkMode ? '#6da8ff' : '#ff007a',\n\n // secondary colors\n secondary1: darkMode ? '#2172E5' : '#ff007a',\n secondary2: darkMode ? '#17000b26' : '#F6DDE8',\n secondary3: darkMode ? '#17000b26' : '#FDEAF1',\n\n shadow1: darkMode ? '#FFFFFF' : '#2F80ED',\n\n // other\n red1: '#FF6871',\n green1: '#27AE60',\n yellow1: '#FFE270',\n yellow2: '#F3841E',\n link: '#2172E5',\n blue: '2f80ed',\n blue1: '#5048E5',\n\n borderG1: darkMode\n ? 'linear-gradient(116.36deg, #7b42a9 33.43%, #ed0376 95.41%);'\n : 'linear-gradient(116.36deg, #7b42a9 33.43%, #ed0376 95.41%);',\n\n background: darkMode ? 'black' : `radial-gradient(50% 50% at 50% 50%, #ff007a30 0%, #fff 0%)`,\n background1: darkMode\n ? 'linear-gradient(116.36deg, rgb(123, 66, 169) 33.43%, rgb(237, 3, 118) 95.41%), rgb(12, 70, 156)'\n : 'linear-gradient(116.36deg, rgb(123, 66, 169) 33.43%, rgb(237, 3, 118) 95.41%), rgb(12, 70, 156)',\n\n bgG1: darkMode\n ? 'radial-gradient(93.65% 93.65% at 58.57% 22.42%, rgba(206, 20, 132, 0.33) 0%, rgba(26, 18, 58, 0) 100%), #2C254A;'\n : 'radial-gradient(93.65% 93.65% at 58.57% 22.42%, rgba(206, 20, 132, 0.33) 0%, rgba(26, 18, 58, 0) 100%), #2C254A;',\n bgG3: darkMode\n ? 'linear-gradient(116.36deg, #7B42A9 33.43%, #ED0376 95.41%), #0C469C;'\n : 'linear-gradient(116.36deg, #7B42A9 33.43%, #ED0376 95.41%), #0C469C;',\n})\n\nconst TextWrapper = styled(Text)`\n color: ${({ color, theme }) => theme[color]};\n`\n\nexport const TYPE = {\n main(props) {\n return \n },\n\n primary(props) {\n return \n },\n\n body(props) {\n return \n },\n\n small(props) {\n return \n },\n\n header(props) {\n return \n },\n\n largeHeader(props) {\n return \n },\n\n light(props) {\n return \n },\n\n lightText(props) {\n return \n },\n\n pink(props) {\n return \n },\n\n gradient(props) {\n return \n },\n main1(props) {\n return \n },\n}\n\nexport const Hover = styled.div`\n :hover {\n cursor: pointer;\n }\n`\n\nexport const gradientBorder = css`\n :before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n border-radius: 45px;\n -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);\n -webkit-mask-composite: destination-out;\n mask-composite: exclude;\n padding: 2px;\n background: ${({ theme }) => theme.borderG1};\n }\n`\n\nexport const Link = styled.a.attrs({\n target: '_blank',\n rel: 'noopener noreferrer',\n})`\n text-decoration: none;\n cursor: pointer;\n color: ${({ theme }) => theme.primary1};\n font-weight: 500;\n :hover {\n text-decoration: underline;\n }\n :focus {\n outline: none;\n text-decoration: underline;\n }\n :active {\n text-decoration: none;\n }\n`\n\nexport const ThemedBackground = styled.div`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n pointer-events: none;\n max-width: 100vw !important;\n height: 200vh;\n mix-blend-mode: color;\n background: ${({ backgroundColor }) =>\n `radial-gradient(50% 50% at 50% 50%, ${backgroundColor} 0%, rgba(255, 255, 255, 0) 100%)`};\n position: absolute;\n top: 0px;\n left: 0px;\n /* z-index: ; */\n\n transform: translateY(-110vh);\n`\n\nexport const GlobalStyle = createGlobalStyle`\n @import url('https://rsms.me/inter/inter.css');\n html { font-family: 'Inter', sans-serif; }\n @supports (font-variation-settings: normal) {\n html { font-family: 'Inter var', sans-serif; }\n }\n \n html,\n body {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n font-size: 14px; \n background-color: ${({ theme }) => theme.bg6};\n }\n\n a {\n text-decoration: none;\n\n :hover {\n text-decoration: none\n }\n }\n\n \n.three-line-legend {\n\twidth: 100%;\n\theight: 70px;\n\tposition: absolute;\n\tpadding: 8px;\n\tfont-size: 12px;\n\tcolor: #20262E;\n\tbackground-color: rgba(255, 255, 255, 0.23);\n\ttext-align: left;\n\tz-index: 10;\n pointer-events: none;\n}\n\n.three-line-legend-dark {\n\twidth: 100%;\n\theight: 70px;\n\tposition: absolute;\n\tpadding: 8px;\n\tfont-size: 12px;\n\tcolor: white;\n\tbackground-color: rgba(255, 255, 255, 0.23);\n\ttext-align: left;\n\tz-index: 10;\n pointer-events: none;\n}\n\n@media screen and (max-width: 800px) {\n .three-line-legend {\n display: none !important;\n }\n}\n\n.tv-lightweight-charts{\n width: 100% !important;\n \n\n & > * {\n width: 100% !important;\n }\n}\n\n\n html {\n font-size: 1rem;\n font-variant: none;\n color: 'black';\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-tap-highlight-color: rgba(0, 0, 0, 0);\n height: 100%;\n }\n`\n","import { ApolloClient } from 'apollo-client'\nimport { InMemoryCache } from 'apollo-cache-inmemory'\nimport { HttpLink } from 'apollo-link-http'\n\nexport const client = new ApolloClient({\n link: new HttpLink({\n uri: 'https://subgraph.satsuma-prod.com/788670ba78ee/ixswap/ixs/api',\n }),\n cache: new InMemoryCache(),\n shouldBatch: true,\n})\n\nexport const healthClient = new ApolloClient({\n link: new HttpLink({\n uri: 'https://api.thegraph.com/index-node/graphql',\n }),\n cache: new InMemoryCache(),\n shouldBatch: true,\n})\n\nexport const stakingClient = new ApolloClient({\n link: new HttpLink({\n uri: 'https://api.thegraph.com/subgraphs/name/way2rach/talisman',\n }),\n cache: new InMemoryCache(),\n shouldBatch: true,\n})\n\nexport const blockClient = new ApolloClient({\n link: new HttpLink({\n uri: 'https://api.studio.thegraph.com/query/71824/maticblocks/version/latest',\n }),\n cache: new InMemoryCache(),\n})\n","export const FACTORY_ADDRESS = '0xc2D0e0bc81494adB71Ce9Aa350cC875DaE12D81D'\n\nexport const BUNDLE_ID = '1'\nexport const API_URL = 'https://api.app.ixswap.io/v1/'\nexport const timeframeOptions = {\n WEEK: '1 week',\n MONTH: '1 month',\n // THREE_MONTHS: '3 months',\n YEAR: '1 year',\n HALF_YEAR: '6 months',\n ALL_TIME: 'All time',\n}\n\n// token list urls to fetch tokens from - use for warnings on tokens and pairs\nexport const SUPPORTED_LIST_URLS__NO_ENS = [\n // 'https://gateway.ipfs.io/ipns/tokens.uniswap.org',\n // 'https://www.coingecko.com/tokens_list/uniswap/defi_100/v_0_0_0.json',\n]\n\n//hide from overview list\nexport const TOKEN_BLACKLIST = [\n '0x495c7f3a713870f68f8b418b355c085dfdc412c3',\n '0xc3761eb917cd790b30dad99f6cc5b4ff93c4f9ea',\n '0xe31debd7abff90b06bca21010dd860d8701fd901',\n '0xfc989fbb6b3024de5ca0144dc23c18a063942ac1',\n '0xf4eda77f0b455a12f3eb44f8653835f377e36b76',\n '0x93b2fff814fcaeffb01406e80b4ecd89ca6a021b',\n '0x495F7c62E2e419aB16978ec0895d6aEeeD2148e5', // wCT1\n\n // rebass tokens\n '0x9ea3b5b4ec044b70375236a281986106457b20ef',\n '0x05934eba98486693aaec2d00b0e9ce918e37dc3f',\n '0x3d7e683fc9c86b4d653c9e47ca12517440fad14e',\n '0xfae9c647ad7d89e738aba720acf09af93dc535f7',\n '0x7296368fe9bcb25d3ecc19af13655b907818cc09',\n]\n\n// pair blacklist\nexport const PAIR_BLACKLIST = [\n '0xb6a741f37d6e455ebcc9f17e2c16d0586c3f57a5',\n '0x97cb8cbe91227ba87fc21aaf52c4212d245da3f8',\n '0x1acba73121d5f63d8ea40bdc64edb594bd88ed09',\n '0x7d7e813082ef6c143277c71786e5be626ec77b20',\n]\n\n// warnings to display if page contains info about blocked token\nexport const BLOCKED_WARNINGS = {\n '0xf4eda77f0b455a12f3eb44f8653835f377e36b76':\n 'TikTok Inc. has asserted this token is violating its trademarks and therefore is not available.',\n}\n\n/**\n * For tokens that cause erros on fee calculations\n */\nexport const FEE_WARNING_TOKENS = ['0xd46ba6d942050d489dbd938a2c909a5d5039a161']\n\nexport const UNTRACKED_COPY = 'Derived USD values may be inaccurate without liquid stablecoin or ETH pairings.'\n\n// tokens that should be tracked but arent due to lag in subgraph\nexport const TRACKED_OVERRIDES = [\n '0x9928e4046d7c6513326ccea028cd3e7a91c7590a',\n '0x87da823b6fc8eb8575a235a824690fda94674c88',\n '0xcd7989894bc033581532d2cd88da5db0a4b12859',\n '0xe1573b9d29e2183b1af0e743dc2754979a40d237',\n '0x45804880de22913dafe09f4980848ece6ecbaf78',\n '0x709f7b10f22eb62b05913b59b92ddd372d4e2152',\n]\n\nexport const CHAINS = {\n MAINET: 1,\n KOVAN: 42,\n POLYGON: 137,\n}\n\nexport const WETH = {\n [CHAINS.MAINET]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [CHAINS.KOVAN]: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',\n [CHAINS.POLYGON]: '0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619',\n}\n\nexport const usedChain = CHAINS.POLYGON\n","import gql from 'graphql-tag'\nimport { FACTORY_ADDRESS, BUNDLE_ID } from '../constants'\n\nexport const SUBGRAPH_HEALTH = gql`\n query health {\n indexingStatusForCurrentVersion(subgraphName: \"ix-swap/ixs\") {\n synced\n health\n chains {\n chainHeadBlock {\n number\n }\n latestBlock {\n number\n }\n }\n }\n }\n`\n\nexport const GET_BLOCK = gql`\n query blocks($timestampFrom: Int!, $timestampTo: Int!) {\n blocks(\n first: 1\n orderBy: timestamp\n orderDirection: asc\n where: { timestamp_gt: $timestampFrom, timestamp_lt: $timestampTo }\n ) {\n id\n number\n timestamp\n }\n }\n`\n\nexport const GET_BLOCKS = (timestamps) => {\n let queryString = 'query blocks {'\n queryString += timestamps.map((timestamp) => {\n return `t${timestamp}:blocks(first: 1, orderBy: timestamp, orderDirection: desc, where: { timestamp_gt: ${timestamp}, timestamp_lt: ${\n timestamp + 600\n } }) {\n number\n }`\n })\n queryString += '}'\n return gql(queryString)\n}\n\nexport const POSITIONS_BY_BLOCK = (account, blocks) => {\n let queryString = 'query blocks {'\n queryString += blocks.map(\n (block) => `\n t${block.timestamp}:liquidityPositions(where: {user: \"${account}\"}, block: { number: ${block.number} }) { \n liquidityTokenBalance\n pair {\n id\n totalSupply\n reserveUSD\n }\n }\n `\n )\n queryString += '}'\n return gql(queryString)\n}\n\nexport const PRICES_BY_BLOCK = (tokenAddress, blocks) => {\n let queryString = 'query blocks {'\n queryString += blocks.map(\n (block) => `\n t${block.timestamp}:token(id:\"${tokenAddress}\", block: { number: ${block.number} }) { \n derivedETH\n }\n `\n )\n queryString += ','\n queryString += blocks.map(\n (block) => `\n b${block.timestamp}: bundle(id:\"1\", block: { number: ${block.number} }) { \n ethPrice\n }\n `\n )\n\n queryString += '}'\n return gql(queryString)\n}\n\nexport const TOP_LPS_PER_PAIRS = gql`\n query lps($pair: Bytes!) {\n liquidityPositions(where: { pair: $pair }, orderBy: liquidityTokenBalance, orderDirection: desc, first: 10) {\n user {\n id\n }\n pair {\n id\n }\n liquidityTokenBalance\n }\n }\n`\n\nexport const HOURLY_PAIR_RATES = (pairAddress, blocks) => {\n let queryString = 'query blocks {'\n queryString += blocks.map(\n (block) => `\n t${block.timestamp}: pair(id:\"${pairAddress}\", block: { number: ${block.number} }) { \n token0Price\n token1Price\n }\n `\n )\n\n queryString += '}'\n return gql(queryString)\n}\n\nexport const SHARE_VALUE = (pairAddress, blocks) => {\n let queryString = 'query blocks {'\n queryString += blocks.map(\n (block) => `\n t${block.timestamp}:pair(id:\"${pairAddress}\", block: { number: ${block.number} }) { \n reserve0\n reserve1\n reserveUSD\n totalSupply \n token0{\n derivedETH\n }\n token1{\n derivedETH\n }\n }\n `\n )\n queryString += ','\n queryString += blocks.map(\n (block) => `\n b${block.timestamp}: bundle(id:\"1\", block: { number: ${block.number} }) { \n ethPrice\n }\n `\n )\n\n queryString += '}'\n return gql(queryString)\n}\n\nexport const ETH_PRICE = (block) => {\n const queryString = block\n ? `\n query bundles {\n bundles(where: { id: ${BUNDLE_ID} } block: {number: ${block}}) {\n id\n ethPrice\n }\n }\n `\n : ` query bundles {\n bundles(where: { id: ${BUNDLE_ID} }) {\n id\n ethPrice\n }\n }\n `\n return gql(queryString)\n}\n\nexport const USER = (block, account) => {\n const queryString = `\n query users {\n user(id: \"${account}\", block: {number: ${block}}) {\n liquidityPositions\n }\n }\n`\n return gql(queryString)\n}\n\nexport const USER_MINTS_BUNRS_PER_PAIR = gql`\n query events($user: Bytes!, $pair: Bytes!) {\n mints(where: { to: $user, pair: $pair }) {\n amountUSD\n amount0\n amount1\n timestamp\n pair {\n token0 {\n id\n }\n token1 {\n id\n }\n }\n }\n burns(where: { sender: $user, pair: $pair }) {\n amountUSD\n amount0\n amount1\n timestamp\n pair {\n token0 {\n id\n }\n token1 {\n id\n }\n }\n }\n }\n`\n\nexport const FIRST_SNAPSHOT = gql`\n query snapshots($user: Bytes!) {\n liquidityPositionSnapshots(first: 1, where: { user: $user }, orderBy: timestamp, orderDirection: asc) {\n timestamp\n }\n }\n`\n\nexport const USER_HISTORY = gql`\n query snapshots($user: Bytes!, $skip: Int!) {\n liquidityPositionSnapshots(first: 1000, skip: $skip, where: { user: $user }) {\n timestamp\n reserveUSD\n liquidityTokenBalance\n liquidityTokenTotalSupply\n reserve0\n reserve1\n token0PriceUSD\n token1PriceUSD\n pair {\n id\n reserve0\n reserve1\n reserveUSD\n token0 {\n id\n }\n token1 {\n id\n }\n }\n }\n }\n`\n\nexport const USER_POSITIONS = gql`\n query liquidityPositions($user: Bytes!) {\n liquidityPositions(where: { user: $user }) {\n pair {\n id\n reserve0\n reserve1\n reserveUSD\n token0 {\n id\n symbol\n derivedETH\n }\n token1 {\n id\n symbol\n derivedETH\n }\n totalSupply\n }\n liquidityTokenBalance\n }\n }\n`\n\nexport const USER_TRANSACTIONS = gql`\n query transactions($user: Bytes!) {\n mints(orderBy: timestamp, orderDirection: desc, where: { to: $user }) {\n id\n transaction {\n id\n timestamp\n }\n pair {\n id\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n to\n liquidity\n amount0\n amount1\n amountUSD\n }\n burns(orderBy: timestamp, orderDirection: desc, where: { sender: $user }) {\n id\n transaction {\n id\n timestamp\n }\n pair {\n id\n token0 {\n symbol\n }\n token1 {\n symbol\n }\n }\n sender\n to\n liquidity\n amount0\n amount1\n amountUSD\n }\n swaps(orderBy: timestamp, orderDirection: desc, where: { to: $user }) {\n id\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n symbol\n }\n token1 {\n symbol\n }\n }\n amount0In\n amount0Out\n amount1In\n amount1Out\n amountUSD\n to\n }\n }\n`\n\nexport const PAIR_CHART = gql`\n query pairDayDatas($pairAddress: Bytes!, $skip: Int!) {\n pairDayDatas(first: 1000, skip: $skip, orderBy: date, orderDirection: asc, where: { pairAddress: $pairAddress }) {\n id\n date\n dailyVolumeToken0\n dailyVolumeToken1\n dailyVolumeUSD\n reserveUSD\n }\n }\n`\n\nexport const PAIR_DAY_DATA = gql`\n query pairDayDatas($pairAddress: Bytes!, $date: Int!) {\n pairDayDatas(first: 1, orderBy: date, orderDirection: desc, where: { pairAddress: $pairAddress, date_lt: $date }) {\n id\n date\n dailyVolumeToken0\n dailyVolumeToken1\n dailyVolumeUSD\n totalSupply\n reserveUSD\n }\n }\n`\n\nexport const PAIR_DAY_DATA_BULK = (pairs, startTimestamp) => {\n let pairsString = `[`\n pairs.map((pair) => {\n return (pairsString += `\"${pair}\"`)\n })\n pairsString += ']'\n const queryString = `\n query days {\n pairDayDatas(first: 1000, orderBy: date, orderDirection: asc, where: { pairAddress_in: ${pairsString}, date_gt: ${startTimestamp} }) {\n id\n pairAddress\n date\n dailyVolumeToken0\n dailyVolumeToken1\n dailyVolumeUSD\n totalSupply\n reserveUSD\n }\n } \n`\n return gql(queryString)\n}\n\nexport const GLOBAL_CHART = gql`\n query uniswapDayDatas($startTime: Int!, $skip: Int!) {\n uniswapDayDatas(first: 1000, skip: $skip, where: { date_gt: $startTime }, orderBy: date, orderDirection: asc) {\n id\n date\n totalVolumeUSD\n dailyVolumeUSD\n dailyVolumeETH\n totalLiquidityUSD\n totalLiquidityETH\n }\n }\n`\n\nexport const GLOBAL_DATA = (block) => {\n const queryString = ` query IxsFactory {\n uniswapFactories(\n ${block ? `block: { number: ${block}}` : ``} \n where: { id: \"${FACTORY_ADDRESS}\" }) {\n id\n totalVolumeUSD\n totalVolumeETH\n untrackedVolumeUSD\n totalLiquidityUSD\n totalLiquidityETH\n txCount\n pairCount\n }\n }`\n return gql(queryString)\n}\n\nexport const GLOBAL_TXNS = gql`\n query transactions {\n transactions(first: 100, orderBy: timestamp, orderDirection: desc) {\n mints(orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n to\n liquidity\n amount0\n amount1\n amountUSD\n }\n burns(orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n sender\n liquidity\n amount0\n amount1\n amountUSD\n }\n swaps(orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n amount0In\n amount0Out\n amount1In\n amount1Out\n amountUSD\n to\n }\n }\n }\n`\n\nexport const ALL_TOKENS = gql`\n query tokens($skip: Int!) {\n tokens(first: 500, skip: $skip) {\n id\n name\n symbol\n totalLiquidity\n }\n }\n`\n\nexport const TOKEN_SEARCH = gql`\n query tokens($value: String, $id: String) {\n asSymbol: tokens(where: { symbol_contains: $value }, orderBy: totalLiquidity, orderDirection: desc) {\n id\n symbol\n name\n totalLiquidity\n }\n asName: tokens(where: { name_contains: $value }, orderBy: totalLiquidity, orderDirection: desc) {\n id\n symbol\n name\n totalLiquidity\n }\n asAddress: tokens(where: { id: $id }, orderBy: totalLiquidity, orderDirection: desc) {\n id\n symbol\n name\n totalLiquidity\n }\n }\n`\n\nexport const PAIR_SEARCH = gql`\n query pairs($tokens: [Bytes]!, $id: String) {\n as0: pairs(where: { token0_in: $tokens }) {\n id\n token0 {\n id\n symbol\n name\n }\n token1 {\n id\n symbol\n name\n }\n }\n as1: pairs(where: { token1_in: $tokens }) {\n id\n token0 {\n id\n symbol\n name\n }\n token1 {\n id\n symbol\n name\n }\n }\n asAddress: pairs(where: { id: $id }) {\n id\n token0 {\n id\n symbol\n name\n }\n token1 {\n id\n symbol\n name\n }\n }\n }\n`\n\nexport const ALL_PAIRS = gql`\n query pairs($skip: Int!) {\n pairs(first: 500, skip: $skip, orderBy: trackedReserveETH, orderDirection: desc) {\n id\n token0 {\n id\n symbol\n name\n }\n token1 {\n id\n symbol\n name\n }\n }\n }\n`\n\nconst PairFields = `\n fragment PairFields on Pair {\n id\n txCount\n token0 {\n id\n symbol\n name\n totalLiquidity\n derivedETH\n }\n token1 {\n id\n symbol\n name\n totalLiquidity\n derivedETH\n }\n reserve0\n reserve1\n reserveUSD\n totalSupply\n trackedReserveETH\n reserveETH\n volumeUSD\n untrackedVolumeUSD\n token0Price\n token1Price\n createdAtTimestamp\n }\n`\n\nexport const PAIRS_CURRENT = gql`\n query pairs {\n pairs(where: { txCount_gt: 1, reserve0_gt: 0.00000001, reserve1_gt: 0.00000001 }) {\n id\n }\n }\n`\n\nexport const PAIR_DATA = (pairAddress, block) => {\n const queryString = `\n ${PairFields}\n query pairs {\n pairs(${block ? `block: {number: ${block}}` : ``} where: { id: \"${pairAddress}\"} ) {\n ...PairFields\n }\n }`\n return gql(queryString)\n}\n\nexport const MINING_POSITIONS = (account) => {\n const queryString = `\n query users {\n user(id: \"${account}\") {\n miningPosition {\n id\n user {\n id\n }\n miningPool {\n pair {\n id\n token0\n token1\n }\n }\n balance\n }\n }\n }\n`\n return gql(queryString)\n}\n\nexport const PAIRS_BULK = gql`\n ${PairFields}\n query pairs($allPairs: [Bytes]!) {\n pairs(first: 500, where: { id_in: $allPairs }, orderBy: trackedReserveETH, orderDirection: desc) {\n ...PairFields\n }\n }\n`\n\nexport const PAIRS_HISTORICAL_BULK = (block, pairs) => {\n let pairsString = `[`\n pairs.map((pair) => {\n return (pairsString += `\"${pair}\"`)\n })\n pairsString += ']'\n let queryString = `\n query pairs {\n pairs(first: 200, where: {id_in: ${pairsString}}, block: {number: ${block}}, orderBy: trackedReserveETH, orderDirection: desc) {\n id\n reserveUSD\n trackedReserveETH\n volumeUSD\n untrackedVolumeUSD\n }\n }\n `\n return gql(queryString)\n}\n\nexport const TOKEN_CHART = gql`\n query tokenDayDatas($tokenAddr: String!, $skip: Int!) {\n tokenDayDatas(first: 1000, skip: $skip, orderBy: date, orderDirection: asc, where: { token: $tokenAddr }) {\n id\n date\n priceUSD\n totalLiquidityToken\n totalLiquidityUSD\n totalLiquidityETH\n dailyVolumeETH\n dailyVolumeToken\n dailyVolumeUSD\n }\n }\n`\n\nconst TokenFields = `\n fragment TokenFields on Token {\n id\n name\n symbol\n derivedETH\n tradeVolume\n tradeVolumeUSD\n untrackedVolumeUSD\n totalLiquidity\n txCount\n }\n`\n\n// used for getting top tokens by daily volume\nexport const TOKEN_TOP_DAY_DATAS = gql`\n query tokenDayDatas($date: Int) {\n tokenDayDatas(first: 50, orderBy: totalLiquidityUSD, orderDirection: desc, where: { date_gt: $date }) {\n id\n date\n }\n }\n`\n\nexport const TOKENS_BULK = gql`\n ${TokenFields}\n query tokens($tokenAddresses: [Bytes]!) {\n pairs(where: { id_in: $tokenAddresses }) {\n ...TokenFields\n }\n }\n`\nexport const TOKENS_HISTORICAL_BULK = (tokens, block) => {\n let tokenString = `[`\n tokens.map((token) => {\n return (tokenString += `\"${token}\",`)\n })\n tokenString += ']'\n let queryString = `\n query tokens {\n tokens(first: 50, where: {id_in: ${tokenString}}, ${block ? 'block: {number: ' + block + '}' : ''} ) {\n id\n name\n symbol\n derivedETH\n tradeVolume\n tradeVolumeUSD\n untrackedVolumeUSD\n totalLiquidity\n txCount\n }\n }\n `\n return gql(queryString)\n}\n\nexport const TOKENS_CURRENT = gql`\n ${TokenFields}\n query tokens {\n tokens(first: 200, orderBy: tradeVolumeUSD, orderDirection: desc) {\n ...TokenFields\n }\n }\n`\n\nexport const TOKENS_DYNAMIC = (block) => {\n const queryString = `\n ${TokenFields}\n query tokens {\n tokens(block: {number: ${block}} first: 200, orderBy: tradeVolumeUSD, orderDirection: desc) {\n ...TokenFields\n }\n }\n `\n return gql(queryString)\n}\n\nexport const TOKEN_DATA = (tokenAddress, block) => {\n const queryString = `\n ${TokenFields}\n query tokens {\n tokens(${block ? `block : {number: ${block}}` : ``} where: {id:\"${tokenAddress}\"}) {\n ...TokenFields\n }\n pairs0: pairs(where: {token0: \"${tokenAddress}\"}, first: 50, orderBy: reserveUSD, orderDirection: desc){\n id\n }\n pairs1: pairs(where: {token1: \"${tokenAddress}\"}, first: 50, orderBy: reserveUSD, orderDirection: desc){\n id\n }\n }\n `\n return gql(queryString)\n}\n\nexport const FILTERED_TRANSACTIONS = gql`\n query ($allPairs: [Bytes]!) {\n mints(first: 20, where: { pair_in: $allPairs }, orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n to\n liquidity\n amount0\n amount1\n amountUSD\n }\n burns(first: 20, where: { pair_in: $allPairs }, orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n sender\n liquidity\n amount0\n amount1\n amountUSD\n }\n swaps(first: 30, where: { pair_in: $allPairs }, orderBy: timestamp, orderDirection: desc) {\n transaction {\n id\n timestamp\n }\n id\n pair {\n token0 {\n id\n symbol\n }\n token1 {\n id\n symbol\n }\n }\n amount0In\n amount0Out\n amount1In\n amount1Out\n amountUSD\n to\n }\n }\n`\n","import { TokenList } from '@uniswap/token-lists'\nimport schema from '@uniswap/token-lists/src/tokenlist.schema.json'\nimport Ajv from 'ajv'\n\n/**\n * Given a URI that may be ipfs, ipns, http, or https protocol, return the fetch-able http(s) URLs for the same content\n * @param uri to convert to fetch-able http url\n */\nfunction uriToHttp(uri: string): string[] {\n const protocol = uri.split(':')[0]?.toLowerCase()\n switch (protocol) {\n case 'https':\n return [uri]\n case 'http':\n return ['https' + uri.substr(4), uri]\n case 'ipfs':\n const hash = uri.match(/^ipfs:(\\/\\/)?(.*)$/i)?.[2]\n return [`https://cloudflare-ipfs.com/ipfs/${hash}/`, `https://ipfs.io/ipfs/${hash}/`]\n case 'ipns':\n const name = uri.match(/^ipns:(\\/\\/)?(.*)$/i)?.[2]\n return [`https://cloudflare-ipfs.com/ipns/${name}/`, `https://ipfs.io/ipns/${name}/`]\n default:\n return []\n }\n}\n\nconst tokenListValidator = new Ajv({ allErrors: true }).compile(schema)\n\n/**\n * Contains the logic for resolving a list URL to a validated token list\n * @param listUrl list url\n */\nexport default async function getTokenList(listUrl: string): Promise {\n const urls = uriToHttp(listUrl)\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i]\n const isLast = i === urls.length - 1\n let response\n try {\n response = await fetch(url)\n } catch (error) {\n console.debug('Failed to fetch list', listUrl, error)\n if (isLast) throw new Error(`Failed to download list ${listUrl}`)\n continue\n }\n\n if (!response.ok) {\n if (isLast) throw new Error(`Failed to download list ${listUrl}`)\n continue\n }\n\n const json = await response.json()\n if (!tokenListValidator(json)) {\n const validationErrors: string =\n tokenListValidator.errors?.reduce((memo, error) => {\n const add = `${error.dataPath} ${error.message ?? ''}`\n return memo.length > 0 ? `${memo}; ${add}` : `${add}`\n }, '') ?? 'unknown error'\n throw new Error(`Token list failed validation: ${validationErrors}`)\n }\n return json\n }\n throw new Error('Unrecognized list URL protocol.')\n}\n","import React, { createContext, useContext, useReducer, useMemo, useCallback, useState, useEffect } from 'react'\nimport { timeframeOptions, SUPPORTED_LIST_URLS__NO_ENS } from '../constants'\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport getTokenList from '../utils/tokenLists'\nimport { healthClient } from '../apollo/client'\nimport { SUBGRAPH_HEALTH } from '../apollo/queries'\ndayjs.extend(utc)\n\nconst UPDATE = 'UPDATE'\nconst UPDATE_TIMEFRAME = 'UPDATE_TIMEFRAME'\nconst UPDATE_SESSION_START = 'UPDATE_SESSION_START'\nconst UPDATED_SUPPORTED_TOKENS = 'UPDATED_SUPPORTED_TOKENS'\nconst UPDATE_LATEST_BLOCK = 'UPDATE_LATEST_BLOCK'\nconst UPDATE_HEAD_BLOCK = 'UPDATE_HEAD_BLOCK'\n\nconst SUPPORTED_TOKENS = 'SUPPORTED_TOKENS'\nconst TIME_KEY = 'TIME_KEY'\nconst CURRENCY = 'CURRENCY'\nconst SESSION_START = 'SESSION_START'\nconst LATEST_BLOCK = 'LATEST_BLOCK'\nconst HEAD_BLOCK = 'HEAD_BLOCK'\n\nconst ApplicationContext = createContext()\n\nfunction useApplicationContext() {\n return useContext(ApplicationContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE: {\n const { currency } = payload\n return {\n ...state,\n [CURRENCY]: currency,\n }\n }\n case UPDATE_TIMEFRAME: {\n const { newTimeFrame } = payload\n return {\n ...state,\n [TIME_KEY]: newTimeFrame,\n }\n }\n case UPDATE_SESSION_START: {\n const { timestamp } = payload\n return {\n ...state,\n [SESSION_START]: timestamp,\n }\n }\n\n case UPDATE_LATEST_BLOCK: {\n const { block } = payload\n return {\n ...state,\n [LATEST_BLOCK]: block,\n }\n }\n\n case UPDATE_HEAD_BLOCK: {\n const { block } = payload\n return {\n ...state,\n [HEAD_BLOCK]: block,\n }\n }\n\n case UPDATED_SUPPORTED_TOKENS: {\n const { supportedTokens } = payload\n return {\n ...state,\n [SUPPORTED_TOKENS]: supportedTokens,\n }\n }\n\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nconst INITIAL_STATE = {\n CURRENCY: 'USD',\n TIME_KEY: timeframeOptions.ALL_TIME,\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, INITIAL_STATE)\n const update = useCallback((currency) => {\n dispatch({\n type: UPDATE,\n payload: {\n currency,\n },\n })\n }, [])\n\n // global time window for charts - see timeframe options in constants\n const updateTimeframe = useCallback((newTimeFrame) => {\n dispatch({\n type: UPDATE_TIMEFRAME,\n payload: {\n newTimeFrame,\n },\n })\n }, [])\n\n // used for refresh button\n const updateSessionStart = useCallback((timestamp) => {\n dispatch({\n type: UPDATE_SESSION_START,\n payload: {\n timestamp,\n },\n })\n }, [])\n\n const updateSupportedTokens = useCallback((supportedTokens) => {\n dispatch({\n type: UPDATED_SUPPORTED_TOKENS,\n payload: {\n supportedTokens,\n },\n })\n }, [])\n\n const updateLatestBlock = useCallback((block) => {\n dispatch({\n type: UPDATE_LATEST_BLOCK,\n payload: {\n block,\n },\n })\n }, [])\n\n const updateHeadBlock = useCallback((block) => {\n dispatch({\n type: UPDATE_HEAD_BLOCK,\n payload: {\n block,\n },\n })\n }, [])\n\n return (\n [\n state,\n {\n update,\n updateSessionStart,\n updateTimeframe,\n updateSupportedTokens,\n updateLatestBlock,\n updateHeadBlock,\n },\n ],\n [state, update, updateTimeframe, updateSessionStart, updateSupportedTokens, updateLatestBlock, updateHeadBlock]\n )}\n >\n {children}\n \n )\n}\n\nexport function useLatestBlocks() {\n const [state, { updateLatestBlock, updateHeadBlock }] = useApplicationContext()\n\n const latestBlock = state?.[LATEST_BLOCK]\n const headBlock = state?.[HEAD_BLOCK]\n\n useEffect(() => {\n async function fetch() {\n healthClient\n .query({\n query: SUBGRAPH_HEALTH,\n })\n .then((res) => {\n const syncedBlock = res.data.indexingStatusForCurrentVersion.chains[0].latestBlock.number\n const headBlock = res.data.indexingStatusForCurrentVersion.chains[0].chainHeadBlock.number\n if (syncedBlock && headBlock) {\n updateLatestBlock(syncedBlock)\n updateHeadBlock(headBlock)\n }\n })\n .catch((e) => {\n console.log(e)\n })\n }\n if (!latestBlock) {\n fetch()\n }\n }, [latestBlock, updateHeadBlock, updateLatestBlock])\n\n return [latestBlock, headBlock]\n}\n\nexport function useCurrentCurrency() {\n const [state, { update }] = useApplicationContext()\n const toggleCurrency = useCallback(() => {\n if (state.currency === 'ETH') {\n update('USD')\n } else {\n update('ETH')\n }\n }, [state, update])\n return [state[CURRENCY], toggleCurrency]\n}\n\nexport function useTimeframe() {\n const [state, { updateTimeframe }] = useApplicationContext()\n const activeTimeframe = state?.[`TIME_KEY`]\n return [activeTimeframe, updateTimeframe]\n}\n\nexport function useStartTimestamp() {\n const [activeWindow] = useTimeframe()\n const [startDateTimestamp, setStartDateTimestamp] = useState()\n\n // monitor the old date fetched\n useEffect(() => {\n let startTime =\n dayjs\n .utc()\n .subtract(\n 1,\n activeWindow === timeframeOptions.week ? 'week' : activeWindow === timeframeOptions.ALL_TIME ? 'year' : 'year'\n )\n .startOf('day')\n .unix() - 1\n // if we find a new start time less than the current startrtime - update oldest pooint to fetch\n setStartDateTimestamp(startTime)\n }, [activeWindow, startDateTimestamp])\n\n return startDateTimestamp\n}\n\n// keep track of session length for refresh ticker\nexport function useSessionStart() {\n const [state, { updateSessionStart }] = useApplicationContext()\n const sessionStart = state?.[SESSION_START]\n\n useEffect(() => {\n if (!sessionStart) {\n updateSessionStart(Date.now())\n }\n })\n\n const [seconds, setSeconds] = useState(0)\n\n useEffect(() => {\n let interval = null\n interval = setInterval(() => {\n setSeconds(Date.now() - sessionStart ?? Date.now())\n }, 1000)\n\n return () => clearInterval(interval)\n }, [seconds, sessionStart])\n\n return parseInt(seconds / 1000)\n}\n\nexport function useListedTokens() {\n const [state, { updateSupportedTokens }] = useApplicationContext()\n const supportedTokens = state?.[SUPPORTED_TOKENS]\n\n useEffect(() => {\n async function fetchList() {\n const allFetched = await SUPPORTED_LIST_URLS__NO_ENS.reduce(async (fetchedTokens, url) => {\n const tokensSoFar = await fetchedTokens\n const newTokens = await getTokenList(url)\n return Promise.resolve([...tokensSoFar, ...newTokens.tokens])\n }, Promise.resolve([]))\n let formatted = allFetched?.map((t) => t.address?.toLowerCase())\n updateSupportedTokens(formatted)\n }\n if (!supportedTokens) {\n fetchList()\n }\n }, [updateSupportedTokens, supportedTokens])\n\n return supportedTokens\n}\n","import React from 'react'\nimport { BigNumber } from 'bignumber.js'\nimport dayjs from 'dayjs'\nimport { ethers } from 'ethers'\nimport utc from 'dayjs/plugin/utc'\nimport { client, blockClient } from '../apollo/client'\nimport { GET_BLOCK, GET_BLOCKS, SHARE_VALUE } from '../apollo/queries'\nimport { Text } from 'rebass'\nimport _Decimal from 'decimal.js-light'\nimport toFormat from 'toformat'\nimport { timeframeOptions, usedChain, WETH } from '../constants'\nimport Numeral from 'numeral'\n\n// format libraries\nconst Decimal = toFormat(_Decimal)\nBigNumber.set({ EXPONENTIAL_AT: 50 })\ndayjs.extend(utc)\n\nexport function getTimeframe(timeWindow) {\n const utcEndTime = dayjs.utc()\n // based on window, get starttime\n let utcStartTime\n switch (timeWindow) {\n case timeframeOptions.WEEK:\n utcStartTime = utcEndTime.subtract(1, 'week').endOf('day').unix() - 1\n break\n case timeframeOptions.MONTH:\n utcStartTime = utcEndTime.subtract(1, 'month').endOf('day').unix() - 1\n break\n case timeframeOptions.ALL_TIME:\n utcStartTime = utcEndTime.subtract(1, 'year').endOf('day').unix() - 1\n break\n default:\n utcStartTime = utcEndTime.subtract(1, 'year').startOf('year').unix() - 1\n break\n }\n return utcStartTime\n}\n\nexport function getPoolLink(token0Address, token1Address = null, remove = false) {\n if (!token1Address) {\n return (\n `https://app.ixswap.io/#/` +\n (remove ? `remove` : `add`) +\n `/${token0Address === WETH[usedChain] ? 'ETH' : token0Address}/${'ETH'}`\n )\n } else {\n return (\n `https://app.ixswap.io/#/` +\n (remove ? `remove` : `add`) +\n `/${token0Address === WETH[usedChain] ? 'ETH' : token0Address}/${\n token1Address === WETH[usedChain] ? 'ETH' : token1Address\n }`\n )\n }\n}\n\nexport function getSwapLink(token0Address, token1Address = null) {\n if (!token1Address) {\n return `https://app.ixswap.io/#/swap?inputCurrency=${token0Address}`\n } else {\n return `https://app.ixswap.io/#/swap?inputCurrency=${\n token0Address === WETH[usedChain] ? 'ETH' : token0Address\n }&outputCurrency=${token1Address === WETH[usedChain] ? 'ETH' : token1Address}`\n }\n}\n\nexport function getIxswapAppLink(linkVariable) {\n let baseIxswapUrl = 'http://prime.ixswap.io'\n if (!linkVariable) {\n return baseIxswapUrl\n }\n\n return `${baseIxswapUrl}/ETH/${linkVariable}`\n}\n\nexport function localNumber(val) {\n return Numeral(val).format('0,0')\n}\n\nexport const toNiceDate = (date) => {\n let x = dayjs.utc(dayjs.unix(date)).format('MMM DD')\n return x\n}\n\n// shorten the checksummed version of the input address to have 0x + 4 characters at start and end\nexport function shortenAddress(address, chars = 4) {\n const parsed = isAddress(address)\n if (!parsed) {\n throw Error(`Invalid 'address' parameter '${address}'.`)\n }\n return `${parsed.substring(0, chars + 2)}...${parsed.substring(42 - chars)}`\n}\n\nexport const toWeeklyDate = (date) => {\n const formatted = dayjs.utc(dayjs.unix(date))\n date = new Date(formatted)\n const day = new Date(formatted).getDay()\n var lessDays = day === 6 ? 0 : day + 1\n var wkStart = new Date(new Date(date).setDate(date.getDate() - lessDays))\n var wkEnd = new Date(new Date(wkStart).setDate(wkStart.getDate() + 6))\n return dayjs.utc(wkStart).format('MMM DD') + ' - ' + dayjs.utc(wkEnd).format('MMM DD')\n}\n\nexport function getTimestampsForChanges() {\n const utcCurrentTime = dayjs()\n const t1 = utcCurrentTime.subtract(1, 'day').startOf('minute').unix()\n const t2 = utcCurrentTime.subtract(2, 'day').startOf('minute').unix()\n const tWeek = utcCurrentTime.subtract(1, 'week').startOf('minute').unix()\n return [t1, t2, tWeek]\n}\n\nexport async function splitQuery(query, localClient, vars, list, skipCount = 100) {\n let fetchedData = {}\n let allFound = false\n let skip = 0\n\n while (!allFound) {\n let end = list.length\n if (skip + skipCount < list.length) {\n end = skip + skipCount\n }\n let sliced = list.slice(skip, end)\n let result = await localClient.query({\n query: query(...vars, sliced),\n fetchPolicy: 'cache-first',\n })\n fetchedData = {\n ...fetchedData,\n ...result.data,\n }\n if (Object.keys(result.data).length < skipCount || skip + skipCount > list.length) {\n allFound = true\n } else {\n skip += skipCount\n }\n }\n\n return fetchedData\n}\n\n/**\n * @notice Fetches first block after a given timestamp\n * @dev Query speed is optimized by limiting to a 600-second period\n * @param {Int} timestamp in seconds\n */\nexport async function getBlockFromTimestamp(timestamp) {\n let result = await blockClient.query({\n query: GET_BLOCK,\n variables: {\n timestampFrom: timestamp,\n timestampTo: timestamp + 600,\n },\n fetchPolicy: 'cache-first',\n })\n return result?.data?.blocks?.[0]?.number\n}\n\n/**\n * @notice Fetches block objects for an array of timestamps.\n * @dev blocks are returned in chronological order (ASC) regardless of input.\n * @dev blocks are returned at string representations of Int\n * @dev timestamps are returns as they were provided; not the block time.\n * @param {Array} timestamps\n */\nexport async function getBlocksFromTimestamps(timestamps, skipCount = 500) {\n if (timestamps?.length === 0) {\n return []\n }\n\n let fetchedData = await splitQuery(GET_BLOCKS, blockClient, [], timestamps, skipCount)\n\n let blocks = []\n if (fetchedData) {\n for (var t in fetchedData) {\n if (fetchedData[t].length > 0) {\n blocks.push({\n timestamp: t.split('t')[1],\n number: fetchedData[t][0]['number'],\n })\n }\n }\n }\n return blocks\n}\n\n// export async function getLiquidityTokenBalanceOvertime(account, timestamps) {\n// // get blocks based on timestamps\n// const blocks = await getBlocksFromTimestamps(timestamps)\n\n// // get historical share values with time travel queries\n// let result = await client.query({\n// query: SHARE_VALUE(account, blocks),\n// fetchPolicy: 'cache-first',\n// })\n\n// let values = []\n// for (var row in result?.data) {\n// let timestamp = row.split('t')[1]\n// if (timestamp) {\n// values.push({\n// timestamp,\n// balance: 0,\n// })\n// }\n// }\n// }\n\n/**\n * @notice Example query using time travel queries\n * @dev TODO - handle scenario where blocks are not available for a timestamps (e.g. current time)\n * @param {String} pairAddress\n * @param {Array} timestamps\n */\nexport async function getShareValueOverTime(pairAddress, timestamps) {\n if (!timestamps) {\n const utcCurrentTime = dayjs()\n const utcSevenDaysBack = utcCurrentTime.subtract(8, 'day').unix()\n timestamps = getTimestampRange(utcSevenDaysBack, 86400, 7)\n }\n\n // get blocks based on timestamps\n const blocks = await getBlocksFromTimestamps(timestamps)\n\n // get historical share values with time travel queries\n let result = await client.query({\n query: SHARE_VALUE(pairAddress, blocks),\n fetchPolicy: 'cache-first',\n })\n\n let values = []\n for (var row in result?.data) {\n let timestamp = row.split('t')[1]\n let sharePriceUsd = parseFloat(result.data[row]?.reserveUSD) / parseFloat(result.data[row]?.totalSupply)\n if (timestamp) {\n values.push({\n timestamp,\n sharePriceUsd,\n totalSupply: result.data[row].totalSupply,\n reserve0: result.data[row].reserve0,\n reserve1: result.data[row].reserve1,\n reserveUSD: result.data[row].reserveUSD,\n token0DerivedETH: result.data[row].token0.derivedETH,\n token1DerivedETH: result.data[row].token1.derivedETH,\n roiUsd: values && values[0] ? sharePriceUsd / values[0]['sharePriceUsd'] : 1,\n ethPrice: 0,\n token0PriceUSD: 0,\n token1PriceUSD: 0,\n })\n }\n }\n\n // add eth prices\n let index = 0\n for (var brow in result?.data) {\n let timestamp = brow.split('b')[1]\n if (timestamp) {\n values[index].ethPrice = result.data[brow].ethPrice\n values[index].token0PriceUSD = result.data[brow].ethPrice * values[index].token0DerivedETH\n values[index].token1PriceUSD = result.data[brow].ethPrice * values[index].token1DerivedETH\n index += 1\n }\n }\n\n return values\n}\n\n/**\n * @notice Creates an evenly-spaced array of timestamps\n * @dev Periods include a start and end timestamp. For example, n periods are defined by n+1 timestamps.\n * @param {Int} timestamp_from in seconds\n * @param {Int} period_length in seconds\n * @param {Int} periods\n */\nexport function getTimestampRange(timestamp_from, period_length, periods) {\n let timestamps = []\n for (let i = 0; i <= periods; i++) {\n timestamps.push(timestamp_from + i * period_length)\n }\n return timestamps\n}\n\nexport const toNiceDateYear = (date) => dayjs.utc(dayjs.unix(date)).format('MMMM DD, YYYY')\n\nexport const isAddress = (value) => {\n try {\n return ethers.utils.getAddress(value?.toLowerCase())\n } catch {\n return false\n }\n}\n\nexport const toK = (num) => {\n return Numeral(num).format('0.[00]a')\n}\n\nexport const setThemeColor = (theme) => document.documentElement.style.setProperty('--c-token', theme || '#333333')\n\nexport const Big = (number) => new BigNumber(number)\n\nexport const formatTime = (unix) => {\n const now = dayjs()\n const timestamp = dayjs.unix(unix)\n\n const inSeconds = now.diff(timestamp, 'second')\n const inMinutes = now.diff(timestamp, 'minute')\n const inHours = now.diff(timestamp, 'hour')\n const inDays = now.diff(timestamp, 'day')\n\n if (inHours >= 24) {\n return `${inDays} ${inDays === 1 ? 'day' : 'days'} ago`\n } else if (inMinutes >= 60) {\n return `${inHours} ${inHours === 1 ? 'hour' : 'hours'} ago`\n } else if (inSeconds >= 60) {\n return `${inMinutes} ${inMinutes === 1 ? 'minute' : 'minutes'} ago`\n } else {\n return `${inSeconds} ${inSeconds === 1 ? 'second' : 'seconds'} ago`\n }\n}\n\nexport const formatNumber = (num) => {\n return num.toString().replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1,')\n}\n\n// using a currency library here in case we want to add more in future\nexport const formatDollarAmount = (num, digits) => {\n const formatter = new Intl.NumberFormat([], {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: digits,\n maximumFractionDigits: digits,\n })\n return formatter.format(num)\n}\n\nexport const toSignificant = (number, significantDigits) => {\n Decimal.set({ precision: significantDigits + 1, rounding: Decimal.ROUND_UP })\n const updated = new Decimal(number).toSignificantDigits(significantDigits)\n return updated.toFormat(updated.decimalPlaces(), { groupSeparator: '' })\n}\n\nexport const formattedNum = (number, usd = false, acceptNegatives = false) => {\n if (isNaN(number) || number === '' || number === undefined) {\n return usd ? '$0' : 0\n }\n let num = parseFloat(number)\n\n if (num > 500000000) {\n return (usd ? '$' : '') + toK(num.toFixed(0), true)\n }\n\n if (num === 0) {\n if (usd) {\n return '$0'\n }\n return 0\n }\n\n if (num < 0.0001 && num > 0) {\n return usd ? '< $0.0001' : '< 0.0001'\n }\n\n if (num > 1000) {\n return usd ? formatDollarAmount(num, 0) : Number(parseFloat(num).toFixed(0)).toLocaleString()\n }\n\n if (usd) {\n if (num < 0.1) {\n return formatDollarAmount(num, 4)\n } else {\n return formatDollarAmount(num, 2)\n }\n }\n\n return Number(parseFloat(num).toFixed(4)).toString()\n}\n\nexport function rawPercent(percentRaw) {\n let percent = parseFloat(percentRaw * 100)\n if (!percent || percent === 0) {\n return '0%'\n }\n if (percent < 1 && percent > 0) {\n return '< 1%'\n }\n return percent.toFixed(0) + '%'\n}\n\nexport function formattedPercent(percent, useBrackets = false) {\n percent = parseFloat(percent)\n if (!percent || percent === 0) {\n return 0%\n }\n\n if (percent < 0.0001 && percent > 0) {\n return (\n \n {'< 0.0001%'}\n \n )\n }\n\n if (percent < 0 && percent > -0.0001) {\n return (\n \n {'< 0.0001%'}\n \n )\n }\n\n let fixedPercent = percent.toFixed(2)\n if (fixedPercent === '0.00') {\n return '0%'\n }\n if (fixedPercent > 0) {\n if (fixedPercent > 100) {\n return {`+${percent?.toFixed(0).toLocaleString()}%`}\n } else {\n return {`+${fixedPercent}%`}\n }\n } else {\n return {`${fixedPercent}%`}\n }\n}\n\n/**\n * gets the amoutn difference plus the % change in change itself (second order change)\n * @param {*} valueNow\n * @param {*} value24HoursAgo\n * @param {*} value48HoursAgo\n */\nexport const get2DayPercentChange = (valueNow, value24HoursAgo, value48HoursAgo) => {\n // get volume info for both 24 hour periods\n let currentChange = parseFloat(valueNow) - parseFloat(value24HoursAgo)\n let previousChange = parseFloat(value24HoursAgo) - parseFloat(value48HoursAgo)\n\n const adjustedPercentChange = (parseFloat(currentChange - previousChange) / parseFloat(previousChange)) * 100\n\n if (isNaN(adjustedPercentChange) || !isFinite(adjustedPercentChange)) {\n return [currentChange, 0]\n }\n return [currentChange, adjustedPercentChange]\n}\n\n/**\n * get standard percent change between two values\n * @param {*} valueNow\n * @param {*} value24HoursAgo\n */\nexport const getPercentChange = (valueNow, value24HoursAgo) => {\n const adjustedPercentChange =\n ((parseFloat(valueNow) - parseFloat(value24HoursAgo)) / parseFloat(value24HoursAgo)) * 100\n if (isNaN(adjustedPercentChange) || !isFinite(adjustedPercentChange)) {\n return 0\n }\n return adjustedPercentChange\n}\n\nexport function isEquivalent(a, b) {\n var aProps = Object.getOwnPropertyNames(a)\n var bProps = Object.getOwnPropertyNames(b)\n if (aProps.length !== bProps.length) {\n return false\n }\n for (var i = 0; i < aProps.length; i++) {\n var propName = aProps[i]\n if (a[propName] !== b[propName]) {\n return false\n }\n }\n return true\n}\n\nexport function capitalize(word) {\n return word.charAt(0).toUpperCase() + word.slice(1)\n}\n","import { usedChain, WETH } from '../constants'\n\ninterface BasicData {\n token0?: {\n id: string\n name: string\n symbol: string\n }\n token1?: {\n id: string\n name: string\n symbol: string\n }\n}\n\n// Override data return from graph - usually because proxy token has changed\n// names since entitiy was created in subgraph\n// keys are lowercase token addresses <--------\nconst TOKEN_OVERRIDES: { [address: string]: { name: string; symbol: string } } = {\n [WETH[usedChain]]: {\n name: 'Ether (Wrapped)',\n symbol: 'ETH',\n },\n '0x1416946162b1c2c871a73b07e932d2fb6c932069': {\n name: 'Energi',\n symbol: 'NRGE',\n },\n}\n\n// override tokens with incorrect symbol or names\nexport function updateNameData(data: BasicData): BasicData | undefined {\n if (data?.token0?.id && Object.keys(TOKEN_OVERRIDES).includes(data.token0.id)) {\n data.token0.name = TOKEN_OVERRIDES[data.token0.id].name\n data.token0.symbol = TOKEN_OVERRIDES[data.token0.id].symbol\n }\n\n if (data?.token1?.id && Object.keys(TOKEN_OVERRIDES).includes(data.token1.id)) {\n data.token1.name = TOKEN_OVERRIDES[data.token1.id].name\n data.token1.symbol = TOKEN_OVERRIDES[data.token1.id].symbol\n }\n\n return data\n}\n\nexport const getAppLink = (chainId = 42): string => {\n if (chainId === 42) {\n return 'https://app.ixswap.io/#'\n }\n\n return 'https://app.ixswap.io/#'\n}\n","import axios from 'axios'\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer } from 'react'\nimport { API_URL } from '../constants'\n\nconst SAVE = 'SAVE_SEC_TOKENS'\n\ndayjs.extend(utc)\n\nconst SecTokenContext = createContext()\n\nfunction useSecTokenContext() {\n return useContext(SecTokenContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case SAVE: {\n const { secTokens } = payload\n const objectSecTokens = secTokens.reduce((accum, item) => {\n const address = item.address?.toLowerCase()\n return {\n ...accum,\n [address]: item,\n }\n }, {})\n return {\n ...state,\n ...objectSecTokens,\n }\n }\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, {})\n\n const save = useCallback((secTokens) => {\n dispatch({\n type: SAVE,\n payload: {\n secTokens,\n },\n })\n }, [])\n\n return (\n [\n state,\n {\n save,\n },\n ],\n [state, save]\n )}\n >\n {children}\n \n )\n}\nasync function getSecTokens() {\n try {\n const response = await axios.get(`${API_URL}token/list/all`)\n return response.data\n } catch (e) {\n return {\n errorMessage: e?.message,\n }\n }\n}\n\nexport function Updater() {\n const [, { save }] = useSecTokenContext()\n useEffect(() => {\n async function getData() {\n const result = await getSecTokens()\n if (result?.errorMessage) {\n return\n }\n save(result)\n }\n getData()\n }, [save])\n return null\n}\n\n/**\n * Get list of sec tokens in IXSwap\n */\nexport function useSecTokensData() {\n const [state] = useSecTokenContext()\n return state || {}\n}\n","import dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState } from 'react'\nimport { client } from '../apollo/client'\nimport {\n FILTERED_TRANSACTIONS,\n HOURLY_PAIR_RATES,\n PAIRS_BULK,\n PAIRS_CURRENT,\n PAIRS_HISTORICAL_BULK,\n PAIR_CHART,\n PAIR_DATA,\n} from '../apollo/queries'\nimport { timeframeOptions, TOKEN_BLACKLIST, TRACKED_OVERRIDES } from '../constants'\nimport {\n get2DayPercentChange,\n getBlocksFromTimestamps,\n getPercentChange,\n getTimestampsForChanges,\n isAddress,\n splitQuery,\n} from '../utils'\nimport { updateNameData } from '../utils/data'\nimport { useLatestBlocks } from './Application'\nimport { useEthPrice } from './GlobalData'\nimport { useSecTokensData } from './SecTokens'\n\nconst UPDATE = 'UPDATE'\nconst UPDATE_PAIR_TXNS = 'UPDATE_PAIR_TXNS'\nconst UPDATE_CHART_DATA = 'UPDATE_CHART_DATA'\nconst UPDATE_TOP_PAIRS = 'UPDATE_TOP_PAIRS'\nconst UPDATE_HOURLY_DATA = 'UPDATE_HOURLY_DATA'\n\ndayjs.extend(utc)\n\nexport function safeAccess(object, path) {\n return object\n ? path.reduce(\n (accumulator, currentValue) => (accumulator && accumulator[currentValue] ? accumulator[currentValue] : null),\n object\n )\n : null\n}\n\nconst PairDataContext = createContext()\n\nfunction usePairDataContext() {\n return useContext(PairDataContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE: {\n const { pairAddress, data } = payload\n return {\n ...state,\n [pairAddress]: {\n ...state?.[pairAddress],\n ...data,\n },\n }\n }\n\n case UPDATE_TOP_PAIRS: {\n const { topPairs } = payload\n let added = {}\n topPairs.map((pair) => {\n return (added[pair.id] = pair)\n })\n return {\n ...state,\n ...added,\n }\n }\n\n case UPDATE_PAIR_TXNS: {\n const { address, transactions } = payload\n return {\n ...state,\n [address]: {\n ...(safeAccess(state, [address]) || {}),\n txns: transactions,\n },\n }\n }\n case UPDATE_CHART_DATA: {\n const { address, chartData } = payload\n return {\n ...state,\n [address]: {\n ...(safeAccess(state, [address]) || {}),\n chartData,\n },\n }\n }\n\n case UPDATE_HOURLY_DATA: {\n const { address, hourlyData, timeWindow } = payload\n return {\n ...state,\n [address]: {\n ...state?.[address],\n hourlyData: {\n ...state?.[address]?.hourlyData,\n [timeWindow]: hourlyData,\n },\n },\n }\n }\n\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, {})\n\n // update pair specific data\n const update = useCallback((pairAddress, data) => {\n dispatch({\n type: UPDATE,\n payload: {\n pairAddress,\n data,\n },\n })\n }, [])\n\n const updateTopPairs = useCallback((topPairs) => {\n dispatch({\n type: UPDATE_TOP_PAIRS,\n payload: {\n topPairs,\n },\n })\n }, [])\n\n const updatePairTxns = useCallback((address, transactions) => {\n dispatch({\n type: UPDATE_PAIR_TXNS,\n payload: { address, transactions },\n })\n }, [])\n\n const updateChartData = useCallback((address, chartData) => {\n dispatch({\n type: UPDATE_CHART_DATA,\n payload: { address, chartData },\n })\n }, [])\n\n const updateHourlyData = useCallback((address, hourlyData, timeWindow) => {\n dispatch({\n type: UPDATE_HOURLY_DATA,\n payload: { address, hourlyData, timeWindow },\n })\n }, [])\n\n return (\n [\n state,\n {\n update,\n updatePairTxns,\n updateChartData,\n updateTopPairs,\n updateHourlyData,\n },\n ],\n [state, update, updatePairTxns, updateChartData, updateTopPairs, updateHourlyData]\n )}\n >\n {children}\n \n )\n}\n\nasync function getBulkPairData(pairList, ethPrice) {\n const [t1, t2, tWeek] = getTimestampsForChanges()\n let [{ number: b1 }, { number: b2 }, { number: bWeek }] = await getBlocksFromTimestamps([t1, t2, tWeek])\n\n try {\n let current = await client.query({\n query: PAIRS_BULK,\n variables: {\n allPairs: pairList,\n },\n fetchPolicy: 'cache-first',\n })\n\n let [oneDayResult, twoDayResult, oneWeekResult] = await Promise.all(\n [b1, b2, bWeek].map(async (block) => {\n let result = client.query({\n query: PAIRS_HISTORICAL_BULK(block, pairList),\n fetchPolicy: 'cache-first',\n })\n return result\n })\n )\n\n let oneDayData = oneDayResult?.data?.pairs.reduce((obj, cur, i) => {\n return { ...obj, [cur.id]: cur }\n }, {})\n\n let twoDayData = twoDayResult?.data?.pairs.reduce((obj, cur, i) => {\n return { ...obj, [cur.id]: cur }\n }, {})\n\n let oneWeekData = oneWeekResult?.data?.pairs.reduce((obj, cur, i) => {\n return { ...obj, [cur.id]: cur }\n }, {})\n\n let pairData = await Promise.all(\n current &&\n current.data.pairs.map(async (pair) => {\n let data = pair\n let oneDayHistory = oneDayData?.[pair.id]\n if (!oneDayHistory) {\n let newData = await client.query({\n query: PAIR_DATA(pair.id, b1),\n fetchPolicy: 'cache-first',\n })\n oneDayHistory = newData.data.pairs[0]\n }\n let twoDayHistory = twoDayData?.[pair.id]\n if (!twoDayHistory) {\n let newData = await client.query({\n query: PAIR_DATA(pair.id, b2),\n fetchPolicy: 'cache-first',\n })\n twoDayHistory = newData.data.pairs[0]\n }\n let oneWeekHistory = oneWeekData?.[pair.id]\n if (!oneWeekHistory) {\n let newData = await client.query({\n query: PAIR_DATA(pair.id, bWeek),\n fetchPolicy: 'cache-first',\n })\n oneWeekHistory = newData.data.pairs[0]\n }\n data = parseData(data, oneDayHistory, twoDayHistory, oneWeekHistory, ethPrice, b1)\n return data\n })\n )\n return pairData\n } catch (e) {\n console.log(e)\n }\n}\n\nfunction parseData(data, oneDayData, twoDayData, oneWeekData, ethPrice, oneDayBlock) {\n const pairAddress = data.id\n\n // get volume changes\n const [oneDayVolumeUSD, volumeChangeUSD] = get2DayPercentChange(\n data?.volumeUSD,\n oneDayData?.volumeUSD ? oneDayData.volumeUSD : 0,\n twoDayData?.volumeUSD ? twoDayData.volumeUSD : 0\n )\n const [oneDayVolumeUntracked, volumeChangeUntracked] = get2DayPercentChange(\n data?.untrackedVolumeUSD,\n oneDayData?.untrackedVolumeUSD ? parseFloat(oneDayData?.untrackedVolumeUSD) : 0,\n twoDayData?.untrackedVolumeUSD ? twoDayData?.untrackedVolumeUSD : 0\n )\n\n const oneWeekVolumeUSD = parseFloat(oneWeekData ? data?.volumeUSD - oneWeekData?.volumeUSD : data.volumeUSD)\n\n const oneWeekVolumeUntracked = parseFloat(\n oneWeekData ? data?.untrackedVolumeUSD - oneWeekData?.untrackedVolumeUSD : data.untrackedVolumeUSD\n )\n\n // set volume properties\n data.oneDayVolumeUSD = parseFloat(oneDayVolumeUSD)\n data.oneWeekVolumeUSD = oneWeekVolumeUSD\n data.volumeChangeUSD = volumeChangeUSD\n data.oneDayVolumeUntracked = oneDayVolumeUntracked\n data.oneWeekVolumeUntracked = oneWeekVolumeUntracked\n data.volumeChangeUntracked = volumeChangeUntracked\n\n // set liquidity properties\n data.trackedReserveUSD = data.trackedReserveETH * ethPrice\n data.liquidityChangeUSD = getPercentChange(data.reserveUSD, oneDayData?.reserveUSD)\n\n // format if pair hasnt existed for a day or a week\n if (!oneDayData && data && data.createdAtBlockNumber > oneDayBlock) {\n data.oneDayVolumeUSD = parseFloat(data.volumeUSD)\n }\n if (!oneDayData && data) {\n data.oneDayVolumeUSD = parseFloat(data.volumeUSD)\n }\n if (!oneWeekData && data) {\n data.oneWeekVolumeUSD = parseFloat(data.volumeUSD)\n }\n\n if (TRACKED_OVERRIDES.includes(pairAddress)) {\n data.oneDayVolumeUSD = oneDayVolumeUntracked\n data.oneWeekVolumeUSD = oneWeekVolumeUntracked\n data.volumeChangeUSD = volumeChangeUntracked\n data.trackedReserveUSD = data.reserveUSD\n }\n\n // format incorrect names\n updateNameData(data)\n\n return data\n}\n\nconst getPairTransactions = async (pairAddress) => {\n const transactions = {}\n\n try {\n let result = await client.query({\n query: FILTERED_TRANSACTIONS,\n variables: {\n allPairs: [pairAddress],\n },\n fetchPolicy: 'no-cache',\n })\n transactions.mints = result.data.mints\n transactions.burns = result.data.burns\n transactions.swaps = result.data.swaps\n } catch (e) {\n console.log(e)\n }\n\n return transactions\n}\n\nconst getPairChartData = async (pairAddress) => {\n let data = []\n const utcEndTime = dayjs.utc()\n let utcStartTime = utcEndTime.subtract(1, 'year').startOf('minute')\n let startTime = utcStartTime.unix() - 1\n\n try {\n let allFound = false\n let skip = 0\n while (!allFound) {\n let result = await client.query({\n query: PAIR_CHART,\n variables: {\n pairAddress: pairAddress,\n skip,\n },\n fetchPolicy: 'cache-first',\n })\n skip += 1000\n data = data.concat(result.data.pairDayDatas)\n if (result.data.pairDayDatas.length < 1000) {\n allFound = true\n }\n }\n\n let dayIndexSet = new Set()\n let dayIndexArray = []\n const oneDay = 24 * 60 * 60\n data.forEach((dayData, i) => {\n // add the day index to the set of days\n dayIndexSet.add((data[i].date / oneDay).toFixed(0))\n dayIndexArray.push(data[i])\n dayData.dailyVolumeUSD = parseFloat(dayData.dailyVolumeUSD)\n dayData.reserveUSD = parseFloat(dayData.reserveUSD)\n })\n\n if (data[0]) {\n // fill in empty days\n let timestamp = data[0].date ? data[0].date : startTime\n let latestLiquidityUSD = data[0].reserveUSD\n let index = 1\n while (timestamp < utcEndTime.unix() - oneDay) {\n const nextDay = timestamp + oneDay\n let currentDayIndex = (nextDay / oneDay).toFixed(0)\n if (!dayIndexSet.has(currentDayIndex)) {\n data.push({\n date: nextDay,\n dayString: nextDay,\n dailyVolumeUSD: 0,\n reserveUSD: latestLiquidityUSD,\n })\n } else {\n latestLiquidityUSD = dayIndexArray[index].reserveUSD\n index = index + 1\n }\n timestamp = nextDay\n }\n }\n\n data = data.sort((a, b) => (parseInt(a.date) > parseInt(b.date) ? 1 : -1))\n } catch (e) {\n console.log(e)\n }\n\n return data\n}\n\nconst getHourlyRateData = async (pairAddress, startTime, latestBlock) => {\n try {\n const utcEndTime = dayjs.utc()\n let time = startTime\n\n // create an array of hour start times until we reach current hour\n const timestamps = []\n while (time <= utcEndTime.unix() - 3600) {\n timestamps.push(time)\n time += 3600\n }\n\n // backout if invalid timestamp format\n if (timestamps.length === 0) {\n return []\n }\n\n // once you have all the timestamps, get the blocks for each timestamp in a bulk query\n let blocks\n\n blocks = await getBlocksFromTimestamps(timestamps, 100)\n\n // catch failing case\n if (!blocks || blocks?.length === 0) {\n return []\n }\n\n if (latestBlock) {\n blocks = blocks.filter((b) => {\n return parseFloat(b.number) <= parseFloat(latestBlock)\n })\n }\n\n const result = await splitQuery(HOURLY_PAIR_RATES, client, [pairAddress], blocks, 100)\n\n // format token ETH price results\n let values = []\n for (var row in result) {\n let timestamp = row.split('t')[1]\n if (timestamp) {\n values.push({\n timestamp,\n rate0: parseFloat(result[row]?.token0Price),\n rate1: parseFloat(result[row]?.token1Price),\n })\n }\n }\n\n let formattedHistoryRate0 = []\n let formattedHistoryRate1 = []\n\n // for each hour, construct the open and close price\n for (let i = 0; i < values.length - 1; i++) {\n formattedHistoryRate0.push({\n timestamp: values[i].timestamp,\n open: parseFloat(values[i].rate0),\n close: parseFloat(values[i + 1].rate0),\n })\n formattedHistoryRate1.push({\n timestamp: values[i].timestamp,\n open: parseFloat(values[i].rate1),\n close: parseFloat(values[i + 1].rate1),\n })\n }\n\n return [formattedHistoryRate0, formattedHistoryRate1]\n } catch (e) {\n console.log(e)\n return [[], []]\n }\n}\n\nexport function Updater() {\n const [, { updateTopPairs }] = usePairDataContext()\n const [ethPrice] = useEthPrice()\n useEffect(() => {\n async function getData() {\n // get top pairs by reserves\n let {\n data: { pairs },\n } = await client.query({\n query: PAIRS_CURRENT,\n fetchPolicy: 'cache-first',\n })\n\n // format as array of addresses\n const formattedPairs = pairs.map((pair) => {\n return pair.id\n })\n\n // get data for every pair in list\n let topPairs = await getBulkPairData(formattedPairs, ethPrice)\n topPairs && updateTopPairs(topPairs)\n }\n ethPrice && getData()\n }, [ethPrice, updateTopPairs])\n return null\n}\n\nexport function useHourlyRateData(pairAddress, timeWindow) {\n const [state, { updateHourlyData }] = usePairDataContext()\n const chartData = state?.[pairAddress]?.hourlyData?.[timeWindow]\n const [latestBlock] = useLatestBlocks()\n\n useEffect(() => {\n const currentTime = dayjs.utc()\n const windowSize = timeWindow === timeframeOptions.MONTH ? 'month' : 'week'\n const startTime =\n timeWindow === timeframeOptions.ALL_TIME ? 1589760000 : currentTime.subtract(1, windowSize).startOf('hour').unix()\n\n async function fetch() {\n let data = await getHourlyRateData(pairAddress, startTime, latestBlock)\n updateHourlyData(pairAddress, data, timeWindow)\n }\n if (!chartData) {\n fetch()\n }\n }, [chartData, timeWindow, pairAddress, updateHourlyData, latestBlock])\n\n return chartData\n}\n\n/**\n * @todo\n * store these updates to reduce future redundant calls\n */\nexport function useDataForList(pairList) {\n const [state] = usePairDataContext()\n const [ethPrice] = useEthPrice()\n\n const [stale, setStale] = useState(false)\n const [fetched, setFetched] = useState([])\n\n // reset\n useEffect(() => {\n if (pairList) {\n setStale(false)\n setFetched()\n }\n }, [pairList])\n\n useEffect(() => {\n async function fetchNewPairData() {\n let newFetched = []\n let unfetched = []\n\n pairList.map(async (pair) => {\n let currentData = state?.[pair.id]\n if (!currentData) {\n unfetched.push(pair.id)\n } else {\n newFetched.push(currentData)\n }\n })\n\n let newPairData = await getBulkPairData(\n unfetched.map((pair) => {\n return pair\n }),\n ethPrice\n )\n setFetched(newFetched.concat(newPairData))\n }\n if (ethPrice && pairList && pairList.length > 0 && !fetched && !stale) {\n setStale(true)\n fetchNewPairData()\n }\n }, [ethPrice, state, pairList, stale, fetched])\n\n let formattedFetch =\n fetched &&\n fetched.reduce((obj, cur) => {\n return { ...obj, [cur?.id]: cur }\n }, {})\n\n return formattedFetch\n}\n\n/**\n * Get all the current and 24hr changes for a pair\n */\nexport function usePairData(pairAddress) {\n const [state, { update }] = usePairDataContext()\n const [ethPrice] = useEthPrice()\n const pairData = state?.[pairAddress]\n\n useEffect(() => {\n async function fetchData() {\n if (!pairData && pairAddress) {\n let data = await getBulkPairData([pairAddress], ethPrice)\n data && update(pairAddress, data[0])\n }\n }\n if (!pairData && pairAddress && ethPrice && isAddress(pairAddress)) {\n fetchData()\n }\n }, [pairAddress, pairData, update, ethPrice])\n\n return pairData || {}\n}\n\n/**\n * Get most recent txns for a pair\n */\nexport function usePairTransactions(pairAddress) {\n const [state, { updatePairTxns }] = usePairDataContext()\n const pairTxns = state?.[pairAddress]?.txns\n useEffect(() => {\n async function checkForTxns() {\n if (!pairTxns) {\n let transactions = await getPairTransactions(pairAddress)\n updatePairTxns(pairAddress, transactions)\n }\n }\n checkForTxns()\n }, [pairTxns, pairAddress, updatePairTxns])\n return pairTxns\n}\n\nexport function usePairChartData(pairAddress) {\n const [state, { updateChartData }] = usePairDataContext()\n const chartData = state?.[pairAddress]?.chartData\n\n useEffect(() => {\n async function checkForChartData() {\n if (!chartData) {\n let data = await getPairChartData(pairAddress)\n updateChartData(pairAddress, data)\n }\n }\n checkForChartData()\n }, [chartData, pairAddress, updateChartData])\n return chartData\n}\n\n/**\n * Get list of all pairs in IXSwap\n */\nexport function useAllPairData() {\n const [state] = usePairDataContext()\n return state || {}\n}\n\nexport function shouldFilterOutPair(pair) {\n if (!pair.reserveUSD || !pair.token0 || !pair.token1) {\n return true\n }\n\n if (parseFloat(pair.reserveUSD) < 100) {\n return true\n }\n\n const lowercasedBlacklistTokens = TOKEN_BLACKLIST.map((token) => token.toLowerCase())\n if (lowercasedBlacklistTokens.includes(pair.token0.id) || lowercasedBlacklistTokens.includes(pair.token1.id)) {\n return true\n }\n\n return false\n}\n\nconst hardcodedSecPairs = [\n '0x47d47ba1defed568f60ac3cb121b05dedf058576', // WTAU\n '0xdf9e9d884815dfd9910ea95b97be472498d21f19', // MSTO\n]\n\nexport function usePairs() {\n const pairs = useAllPairData()\n const secTokens = useSecTokensData()\n\n const distributedPairs = useMemo(() => {\n const pairKeys = Object.keys(pairs)\n const visiblePairs = pairKeys.reduce((accum, item) => {\n if (pairs[item].trackedReserveUSD > 0) {\n return { ...accum, [item]: pairs[item] }\n }\n return { ...accum }\n }, {})\n const visibleKeys = Object.keys(pairs)\n const adjustedPairs = visibleKeys.reduce((accum, item) => {\n const token0Address = pairs[item]?.token0?.id\n const token1Address = pairs[item]?.token1?.id\n const isSecPair =\n secTokens[token0Address] || secTokens[token1Address] || hardcodedSecPairs.includes(pairs[item]?.id)\n if (!isSecPair) {\n return {\n ...accum,\n secPairs: { ...accum.secPairs },\n cryptoPairs: { ...accum.cryptoPairs, [item]: pairs[item] },\n }\n }\n return {\n ...accum,\n secPairs: { ...accum.secPairs, [item]: pairs[item] },\n cryptoPairs: { ...accum.cryptoPairs },\n }\n }, {})\n return { ...adjustedPairs, visiblePairs: { ...visiblePairs } }\n }, [pairs, secTokens])\n const { visiblePairs, secPairs, cryptoPairs } = distributedPairs\n return { allPairs: pairs, secPairs, cryptoPairs }\n}\n","import React, { createContext, useContext, useReducer, useMemo, useCallback, useEffect, useState } from 'react'\nimport { client } from '../apollo/client'\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport { useTimeframe } from './Application'\nimport {\n getPercentChange,\n getBlockFromTimestamp,\n getBlocksFromTimestamps,\n get2DayPercentChange,\n getTimeframe,\n} from '../utils'\nimport {\n GLOBAL_DATA,\n GLOBAL_TXNS,\n GLOBAL_CHART,\n ETH_PRICE,\n ALL_PAIRS,\n ALL_TOKENS,\n TOP_LPS_PER_PAIRS,\n} from '../apollo/queries'\nimport weekOfYear from 'dayjs/plugin/weekOfYear'\nimport { shouldFilterOutPair, useAllPairData, usePairs } from './PairData'\nimport { useTokenChartDataCombined } from './TokenData'\nconst UPDATE = 'UPDATE'\nconst UPDATE_TXNS = 'UPDATE_TXNS'\nconst UPDATE_CHART = 'UPDATE_CHART'\nconst UPDATE_ETH_PRICE = 'UPDATE_ETH_PRICE'\nconst ETH_PRICE_KEY = 'ETH_PRICE_KEY'\nconst UPDATE_ALL_PAIRS_IN_IXSWAP = 'UPDATE_ALL_PAIRS_IN_IXSWAP'\nconst UPDATE_ALL_TOKENS_IN_IXSWAP = 'UPDATE_ALL_TOKENS_IN_IXSWAP'\nconst UPDATE_TOP_LPS = 'UPDATE_TOP_LPS'\n\nconst offsetVolumes = [\n '0x9ea3b5b4ec044b70375236a281986106457b20ef',\n '0x05934eba98486693aaec2d00b0e9ce918e37dc3f',\n '0x3d7e683fc9c86b4d653c9e47ca12517440fad14e',\n '0xfae9c647ad7d89e738aba720acf09af93dc535f7',\n '0x7296368fe9bcb25d3ecc19af13655b907818cc09',\n]\n\n// format dayjs with the libraries that we need\ndayjs.extend(utc)\ndayjs.extend(weekOfYear)\n\nconst GlobalDataContext = createContext()\n\nfunction useGlobalDataContext() {\n return useContext(GlobalDataContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE: {\n const { data } = payload\n return {\n ...state,\n globalData: data,\n }\n }\n case UPDATE_TXNS: {\n const { transactions } = payload\n return {\n ...state,\n transactions,\n }\n }\n case UPDATE_CHART: {\n const { daily, weekly } = payload\n return {\n ...state,\n chartData: {\n daily,\n weekly,\n },\n }\n }\n case UPDATE_ETH_PRICE: {\n const { ethPrice, oneDayPrice, ethPriceChange } = payload\n return {\n [ETH_PRICE_KEY]: ethPrice,\n oneDayPrice,\n ethPriceChange,\n }\n }\n\n case UPDATE_ALL_PAIRS_IN_IXSWAP: {\n const { allPairs } = payload\n return {\n ...state,\n allPairs,\n }\n }\n\n case UPDATE_ALL_TOKENS_IN_IXSWAP: {\n const { allTokens } = payload\n return {\n ...state,\n allTokens,\n }\n }\n\n case UPDATE_TOP_LPS: {\n const { topLps } = payload\n return {\n ...state,\n topLps,\n }\n }\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, {})\n const update = useCallback((data) => {\n dispatch({\n type: UPDATE,\n payload: {\n data,\n },\n })\n }, [])\n\n const updateTransactions = useCallback((transactions) => {\n dispatch({\n type: UPDATE_TXNS,\n payload: {\n transactions,\n },\n })\n }, [])\n\n const updateChart = useCallback((daily, weekly) => {\n dispatch({\n type: UPDATE_CHART,\n payload: {\n daily,\n weekly,\n },\n })\n }, [])\n\n const updateEthPrice = useCallback((ethPrice, oneDayPrice, ethPriceChange) => {\n dispatch({\n type: UPDATE_ETH_PRICE,\n payload: {\n ethPrice,\n oneDayPrice,\n ethPriceChange,\n },\n })\n }, [])\n\n const updateAllPairsInIxswap = useCallback((allPairs) => {\n dispatch({\n type: UPDATE_ALL_PAIRS_IN_IXSWAP,\n payload: {\n allPairs,\n },\n })\n }, [])\n\n const updateAllTokensInIxswap = useCallback((allTokens) => {\n dispatch({\n type: UPDATE_ALL_TOKENS_IN_IXSWAP,\n payload: {\n allTokens,\n },\n })\n }, [])\n\n const updateTopLps = useCallback((topLps) => {\n dispatch({\n type: UPDATE_TOP_LPS,\n payload: {\n topLps,\n },\n })\n }, [])\n return (\n [\n state,\n {\n update,\n updateTransactions,\n updateChart,\n updateEthPrice,\n updateTopLps,\n updateAllPairsInIxswap: updateAllPairsInIxswap,\n updateAllTokensInIxswap: updateAllTokensInIxswap,\n },\n ],\n [\n state,\n update,\n updateTransactions,\n updateTopLps,\n updateChart,\n updateEthPrice,\n updateAllPairsInIxswap,\n updateAllTokensInIxswap,\n ]\n )}\n >\n {children}\n \n )\n}\n\n/**\n * Gets all the global data for the overview page.\n * Needs current eth price and the old eth price to get\n * 24 hour USD changes.\n * @param {*} ethPrice\n * @param {*} oldEthPrice\n */\n\nasync function getGlobalData(ethPrice, oldEthPrice) {\n // data for each day , historic data used for % changes\n let data = {}\n let oneDayData = {}\n let twoDayData = {}\n\n try {\n // get timestamps for the days\n const utcCurrentTime = dayjs()\n const utcOneDayBack = utcCurrentTime.subtract(1, 'day').unix()\n const utcTwoDaysBack = utcCurrentTime.subtract(2, 'day').unix()\n const utcOneWeekBack = utcCurrentTime.subtract(1, 'week').unix()\n const utcTwoWeeksBack = utcCurrentTime.subtract(2, 'week').unix()\n\n // get the blocks needed for time travel queries\n let [oneDayBlock, twoDayBlock, oneWeekBlock, twoWeekBlock] = await getBlocksFromTimestamps([\n utcOneDayBack,\n utcTwoDaysBack,\n utcOneWeekBack,\n utcTwoWeeksBack,\n ])\n\n // fetch the global data\n let result = await client.query({\n query: GLOBAL_DATA(),\n fetchPolicy: 'cache-first',\n })\n data = result.data.ixsFactories[0]\n\n // fetch the historical data\n let oneDayResult = await client.query({\n query: GLOBAL_DATA(oneDayBlock?.number),\n fetchPolicy: 'cache-first',\n })\n oneDayData = oneDayResult.data.ixsFactories[0]\n\n let twoDayResult = await client.query({\n query: GLOBAL_DATA(twoDayBlock?.number),\n fetchPolicy: 'cache-first',\n })\n twoDayData = twoDayResult.data.ixsFactories[0]\n\n let oneWeekResult = await client.query({\n query: GLOBAL_DATA(oneWeekBlock?.number),\n fetchPolicy: 'cache-first',\n })\n const oneWeekData = oneWeekResult.data.ixsFactories[0]\n\n let twoWeekResult = await client.query({\n query: GLOBAL_DATA(twoWeekBlock?.number),\n fetchPolicy: 'cache-first',\n })\n const twoWeekData = twoWeekResult.data.ixsFactories[0]\n\n if (data && oneDayData && twoDayData && twoWeekData) {\n let [oneDayVolumeUSD, volumeChangeUSD] = get2DayPercentChange(\n data.totalVolumeUSD,\n oneDayData.totalVolumeUSD,\n twoDayData.totalVolumeUSD\n )\n\n const [oneWeekVolume, weeklyVolumeChange] = get2DayPercentChange(\n data.totalVolumeUSD,\n oneWeekData.totalVolumeUSD,\n twoWeekData.totalVolumeUSD\n )\n\n const [oneDayTxns, txnChange] = get2DayPercentChange(\n data.txCount,\n oneDayData.txCount ? oneDayData.txCount : 0,\n twoDayData.txCount ? twoDayData.txCount : 0\n )\n\n // format the total liquidity in USD\n data.totalLiquidityUSD = data.totalLiquidityETH * ethPrice\n const liquidityChangeUSD = getPercentChange(\n data.totalLiquidityETH * ethPrice,\n oneDayData.totalLiquidityETH * oldEthPrice\n )\n\n // add relevant fields with the calculated amounts\n data.oneDayVolumeUSD = oneDayVolumeUSD\n data.oneWeekVolume = oneWeekVolume\n data.weeklyVolumeChange = weeklyVolumeChange\n data.volumeChangeUSD = volumeChangeUSD\n data.liquidityChangeUSD = liquidityChangeUSD\n data.oneDayTxns = oneDayTxns\n data.txnChange = txnChange\n }\n } catch (e) {\n console.log(e)\n }\n\n return data\n}\n\n/**\n * Get historical data for volume and liquidity used in global charts\n * on main page\n * @param {*} oldestDateToFetch // start of window to fetch from\n */\n\nlet checked = false\n\nconst getChartData = async (oldestDateToFetch, offsetData) => {\n let data = []\n let weeklyData = []\n const utcEndTime = dayjs.utc()\n let skip = 0\n let allFound = false\n\n try {\n while (!allFound) {\n let result = await client.query({\n query: GLOBAL_CHART,\n variables: {\n startTime: oldestDateToFetch,\n skip,\n },\n fetchPolicy: 'cache-first',\n })\n skip += 1000\n data = data.concat(result.data.uniswapDayDatas)\n if (result.data.uniswapDayDatas.length < 1000) {\n allFound = true\n }\n }\n\n if (data) {\n let dayIndexSet = new Set()\n let dayIndexArray = []\n const oneDay = 24 * 60 * 60\n\n // for each day, parse the daily volume and format for chart array\n data.forEach((dayData, i) => {\n // add the day index to the set of days\n dayIndexSet.add((data[i].date / oneDay).toFixed(0))\n dayIndexArray.push(data[i])\n dayData.dailyVolumeUSD = parseFloat(dayData.dailyVolumeUSD)\n })\n\n // fill in empty days ( there will be no day datas if no trades made that day )\n let timestamp = data[0].date ? data[0].date : oldestDateToFetch\n let latestLiquidityUSD = data[0].totalLiquidityUSD\n let latestDayDats = data[0].mostLiquidTokens\n let index = 1\n while (timestamp < utcEndTime.unix() - oneDay) {\n const nextDay = timestamp + oneDay\n let currentDayIndex = (nextDay / oneDay).toFixed(0)\n\n if (!dayIndexSet.has(currentDayIndex)) {\n data.push({\n date: nextDay,\n dailyVolumeUSD: 0,\n totalLiquidityUSD: latestLiquidityUSD,\n mostLiquidTokens: latestDayDats,\n })\n } else {\n latestLiquidityUSD = dayIndexArray[index].totalLiquidityUSD\n latestDayDats = dayIndexArray[index].mostLiquidTokens\n index = index + 1\n }\n timestamp = nextDay\n }\n }\n\n // format weekly data for weekly sized chunks\n data = data.sort((a, b) => (parseInt(a.date) > parseInt(b.date) ? 1 : -1))\n let startIndexWeekly = -1\n let currentWeek = -1\n\n data.forEach((entry, i) => {\n const date = data[i].date\n\n // hardcoded fix for offset volume\n offsetData &&\n !checked &&\n offsetData.map((dayData) => {\n if (dayData[date]) {\n data[i].dailyVolumeUSD = parseFloat(data[i].dailyVolumeUSD) - parseFloat(dayData[date].dailyVolumeUSD)\n }\n return true\n })\n\n const week = dayjs.utc(dayjs.unix(data[i].date)).week()\n if (week !== currentWeek) {\n currentWeek = week\n startIndexWeekly++\n }\n weeklyData[startIndexWeekly] = weeklyData[startIndexWeekly] || {}\n weeklyData[startIndexWeekly].date = data[i].date\n weeklyData[startIndexWeekly].weeklyVolumeUSD =\n (weeklyData[startIndexWeekly].weeklyVolumeUSD ?? 0) + data[i].dailyVolumeUSD\n })\n\n if (!checked) {\n checked = true\n }\n } catch (e) {\n console.log(e)\n }\n return [data, weeklyData]\n}\n\n/**\n * Get and format transactions for global page\n */\nconst getGlobalTransactions = async () => {\n let transactions = {}\n\n try {\n let result = await client.query({\n query: GLOBAL_TXNS,\n fetchPolicy: 'cache-first',\n })\n transactions.mints = []\n transactions.burns = []\n transactions.swaps = []\n result?.data?.transactions &&\n result.data.transactions.map((transaction) => {\n if (transaction.mints.length > 0) {\n transaction.mints.map((mint) => {\n return transactions.mints.push(mint)\n })\n }\n if (transaction.burns.length > 0) {\n transaction.burns.map((burn) => {\n return transactions.burns.push(burn)\n })\n }\n if (transaction.swaps.length > 0) {\n transaction.swaps.map((swap) => {\n return transactions.swaps.push(swap)\n })\n }\n return true\n })\n } catch (e) {\n console.log(e)\n }\n\n return transactions\n}\n\n/**\n * Gets the current price of ETH, 24 hour price, and % change between them\n */\nconst getEthPrice = async () => {\n const utcCurrentTime = dayjs()\n const utcOneDayBack = utcCurrentTime.subtract(1, 'day').startOf('minute').unix()\n\n let ethPrice = 0\n let ethPriceOneDay = 0\n let priceChangeETH = 0\n\n try {\n let oneDayBlock = await getBlockFromTimestamp(utcOneDayBack)\n let result = await client.query({\n query: ETH_PRICE(),\n fetchPolicy: 'cache-first',\n })\n let resultOneDay = await client.query({\n query: ETH_PRICE(oneDayBlock),\n fetchPolicy: 'cache-first',\n })\n const currentPrice = result?.data?.bundles[0]?.ethPrice\n const oneDayBackPrice = resultOneDay?.data?.bundles[0]?.ethPrice\n priceChangeETH = getPercentChange(currentPrice, oneDayBackPrice)\n ethPrice = currentPrice\n ethPriceOneDay = oneDayBackPrice\n } catch (e) {\n console.log(e)\n }\n\n return [ethPrice, ethPriceOneDay, priceChangeETH]\n}\n\nconst PAIRS_TO_FETCH = 500\nconst TOKENS_TO_FETCH = 500\n\n/**\n * Loop through every pair on ixswap, used for search\n */\nasync function getAllPairsOnIxswap() {\n try {\n let allFound = false\n let pairs = []\n let skipCount = 0\n while (!allFound) {\n let result = await client.query({\n query: ALL_PAIRS,\n variables: {\n skip: skipCount,\n },\n fetchPolicy: 'cache-first',\n })\n skipCount = skipCount + PAIRS_TO_FETCH\n pairs = pairs.concat(result?.data?.pairs)\n if (result?.data?.pairs.length < PAIRS_TO_FETCH || pairs.length > PAIRS_TO_FETCH) {\n allFound = true\n }\n }\n return pairs\n } catch (e) {\n console.log(e)\n }\n}\n\n/**\n * Loop through every token on ixswap, used for search\n */\nasync function getAllTokensOnIxswap() {\n try {\n let allFound = false\n let skipCount = 0\n let tokens = []\n while (!allFound) {\n let result = await client.query({\n query: ALL_TOKENS,\n variables: {\n skip: skipCount,\n },\n fetchPolicy: 'cache-first',\n })\n tokens = tokens.concat(result?.data?.tokens)\n if (result?.data?.tokens?.length < TOKENS_TO_FETCH || tokens.length > TOKENS_TO_FETCH) {\n allFound = true\n }\n skipCount = skipCount += TOKENS_TO_FETCH\n }\n return tokens\n } catch (e) {\n console.log(e)\n }\n}\n\n/**\n * Hook that fetches overview data, plus all tokens and pairs for search\n */\nexport function useGlobalData() {\n const [state, { update, updateAllPairsInIxswap, updateAllTokensInIxswap }] = useGlobalDataContext()\n const [ethPrice, oldEthPrice] = useEthPrice()\n const { allPairs: pairs = {}, secPairs = {} } = usePairs()\n const totalValue = useMemo(() => {\n const keys = Object.keys(pairs)\n const total = keys.reduce((accum, current) => {\n return accum + pairs[current].trackedReserveUSD\n }, 0)\n return total\n }, [pairs])\n const totalValueLockedSecurity = useMemo(() => {\n const keys = Object.keys(secPairs)\n const total = keys.reduce((accum, current) => {\n return accum + secPairs[current].trackedReserveUSD\n }, 0)\n return total\n }, [secPairs])\n\n const totalValueLockedCrypto = useMemo(() => {\n const secPairKeys = Object.keys(secPairs)\n const filteredPairs = Object.keys(pairs).filter(\n (key) => !secPairKeys.includes(key) && !shouldFilterOutPair(pairs[key])\n )\n\n const total = filteredPairs.reduce((accum, current) => {\n const accumulated = accum + parseFloat(pairs[current]?.reserveUSD || 0)\n return accumulated\n }, 0)\n\n return total\n }, [pairs, secPairs])\n\n const data = useMemo(\n () => ({ ...state?.globalData, totalValueLocked: totalValue, totalValueLockedSecurity, totalValueLockedCrypto }),\n [totalValue, state?.globalData, totalValueLockedCrypto, totalValueLockedSecurity]\n )\n\n // const combinedVolume = useTokenDataCombined(offsetVolumes)\n\n useEffect(() => {\n async function fetchData() {\n let globalData = await getGlobalData(ethPrice, oldEthPrice)\n\n globalData && update(globalData)\n\n let allPairs = await getAllPairsOnIxswap()\n updateAllPairsInIxswap(allPairs)\n\n let allTokens = await getAllTokensOnIxswap()\n updateAllTokensInIxswap(allTokens)\n }\n if (!data && ethPrice && oldEthPrice) {\n fetchData()\n }\n }, [ethPrice, oldEthPrice, update, data, updateAllPairsInIxswap, updateAllTokensInIxswap])\n\n return data || {}\n}\n\nexport function useGlobalChartData() {\n const [state, { updateChart }] = useGlobalDataContext()\n const [oldestDateFetch, setOldestDateFetched] = useState()\n const [activeWindow] = useTimeframe()\n\n const chartDataDaily = state?.chartData?.daily\n const chartDataWeekly = state?.chartData?.weekly\n\n /**\n * Keep track of oldest date fetched. Used to\n * limit data fetched until its actually needed.\n * (dont fetch year long stuff unless year option selected)\n */\n useEffect(() => {\n // based on window, get starttime\n let startTime = getTimeframe(activeWindow)\n\n if ((activeWindow && startTime < oldestDateFetch) || !oldestDateFetch) {\n setOldestDateFetched(startTime)\n }\n }, [activeWindow, oldestDateFetch])\n\n // fix for rebass tokens\n\n const combinedData = useTokenChartDataCombined(offsetVolumes)\n\n /**\n * Fetch data if none fetched or older data is needed\n */\n useEffect(() => {\n async function fetchData() {\n // historical stuff for chart\n let [newChartData, newWeeklyData] = await getChartData(oldestDateFetch, combinedData)\n updateChart(newChartData, newWeeklyData)\n }\n if (oldestDateFetch && !(chartDataDaily && chartDataWeekly) && combinedData) {\n fetchData()\n }\n }, [chartDataDaily, chartDataWeekly, combinedData, oldestDateFetch, updateChart])\n\n return [chartDataDaily, chartDataWeekly]\n}\n\nexport function useGlobalTransactions() {\n const [state, { updateTransactions }] = useGlobalDataContext()\n const transactions = state?.transactions\n useEffect(() => {\n async function fetchData() {\n if (!transactions) {\n let txns = await getGlobalTransactions()\n updateTransactions(txns)\n }\n }\n fetchData()\n }, [updateTransactions, transactions])\n return transactions\n}\n\nexport function useEthPrice() {\n const [state, { updateEthPrice }] = useGlobalDataContext()\n const ethPrice = state?.[ETH_PRICE_KEY]\n const ethPriceOld = state?.['oneDayPrice']\n useEffect(() => {\n async function checkForEthPrice() {\n if (!ethPrice) {\n let [newPrice, oneDayPrice, priceChange] = await getEthPrice()\n updateEthPrice(newPrice, oneDayPrice, priceChange)\n }\n }\n checkForEthPrice()\n }, [ethPrice, updateEthPrice])\n\n return [ethPrice, ethPriceOld]\n}\n\nexport function useAllPairsInIXSwap() {\n const [state] = useGlobalDataContext()\n let allPairs = state?.allPairs\n\n return allPairs || []\n}\n\nexport function useAllTokensInIXSwap() {\n const [state] = useGlobalDataContext()\n let allTokens = state?.allTokens\n\n return allTokens || []\n}\n\n/**\n * Get the top liquidity positions based on USD size\n * @TODO Not a perfect lookup needs improvement\n */\nexport function useTopLps() {\n const [state, { updateTopLps }] = useGlobalDataContext()\n let topLps = state?.topLps\n\n const allPairs = useAllPairData()\n\n useEffect(() => {\n async function fetchData() {\n // get top 20 by reserves\n let topPairs = Object.keys(allPairs)\n ?.sort((a, b) => parseFloat(allPairs[a].reserveUSD > allPairs[b].reserveUSD ? -1 : 1))\n ?.slice(0, 99)\n .map((pair) => pair)\n\n let topLpLists = await Promise.all(\n topPairs.map(async (pair) => {\n // for each one, fetch top LPs\n try {\n const { data: results } = await client.query({\n query: TOP_LPS_PER_PAIRS,\n variables: {\n pair: pair.toString(),\n },\n fetchPolicy: 'cache-first',\n })\n if (results) {\n return results.liquidityPositions\n }\n } catch (e) {}\n })\n )\n\n // get the top lps from the results formatted\n const topLps = []\n topLpLists\n .filter((i) => !!i) // check for ones not fetched correctly\n .map((list) => {\n return list.map((entry) => {\n const pairData = allPairs[entry.pair.id]\n return topLps.push({\n user: entry.user,\n pairName: pairData.token0.symbol + '-' + pairData.token1.symbol,\n pairAddress: entry.pair.id,\n token0: pairData.token0.id,\n token1: pairData.token1.id,\n usd:\n (parseFloat(entry.liquidityTokenBalance) / parseFloat(pairData.totalSupply)) *\n parseFloat(pairData.reserveUSD),\n })\n })\n })\n\n const sorted = topLps.sort((a, b) => (a.usd > b.usd ? -1 : 1))\n const shorter = sorted.splice(0, 100)\n updateTopLps(shorter)\n }\n\n if (!topLps && allPairs && Object.keys(allPairs).length > 0) {\n fetchData()\n }\n })\n\n return topLps\n}\n","import React, { createContext, useContext, useReducer, useMemo, useCallback, useEffect } from 'react'\n\nimport { client } from '../apollo/client'\nimport {\n TOKEN_DATA,\n FILTERED_TRANSACTIONS,\n TOKEN_CHART,\n TOKEN_TOP_DAY_DATAS,\n PRICES_BY_BLOCK,\n PAIR_DATA,\n TOKENS_HISTORICAL_BULK,\n} from '../apollo/queries'\n\nimport { useEthPrice } from './GlobalData'\n\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\n\nimport {\n get2DayPercentChange,\n getPercentChange,\n getBlockFromTimestamp,\n isAddress,\n getBlocksFromTimestamps,\n splitQuery,\n} from '../utils'\nimport { timeframeOptions } from '../constants'\nimport { useLatestBlocks } from './Application'\nimport { updateNameData } from '../utils/data'\n\nconst UPDATE = 'UPDATE'\nconst UPDATE_TOKEN_TXNS = 'UPDATE_TOKEN_TXNS'\nconst UPDATE_CHART_DATA = 'UPDATE_CHART_DATA'\nconst UPDATE_PRICE_DATA = 'UPDATE_PRICE_DATA'\nconst UPDATE_TOP_TOKENS = ' UPDATE_TOP_TOKENS'\nconst UPDATE_ALL_PAIRS = 'UPDATE_ALL_PAIRS'\nconst UPDATE_COMBINED = 'UPDATE_COMBINED'\n\nconst TOKEN_PAIRS_KEY = 'TOKEN_PAIRS_KEY'\n\ndayjs.extend(utc)\n\nconst TokenDataContext = createContext()\n\nexport function useTokenDataContext() {\n return useContext(TokenDataContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE: {\n const { tokenAddress, data } = payload\n return {\n ...state,\n [tokenAddress]: {\n ...state?.[tokenAddress],\n ...data,\n },\n }\n }\n case UPDATE_TOP_TOKENS: {\n const { topTokens } = payload\n let added = {}\n topTokens &&\n topTokens.map((token) => {\n return (added[token.id] = token)\n })\n return {\n ...state,\n ...added,\n }\n }\n\n case UPDATE_COMBINED: {\n const { combinedVol } = payload\n return {\n ...state,\n combinedVol,\n }\n }\n\n case UPDATE_TOKEN_TXNS: {\n const { address, transactions } = payload\n return {\n ...state,\n [address]: {\n ...state?.[address],\n txns: transactions,\n },\n }\n }\n case UPDATE_CHART_DATA: {\n const { address, chartData } = payload\n return {\n ...state,\n [address]: {\n ...state?.[address],\n chartData,\n },\n }\n }\n\n case UPDATE_PRICE_DATA: {\n const { address, data, timeWindow, interval } = payload\n return {\n ...state,\n [address]: {\n ...state?.[address],\n [timeWindow]: {\n ...state?.[address]?.[timeWindow],\n [interval]: data,\n },\n },\n }\n }\n\n case UPDATE_ALL_PAIRS: {\n const { address, allPairs } = payload\n return {\n ...state,\n [address]: {\n ...state?.[address],\n [TOKEN_PAIRS_KEY]: allPairs,\n },\n }\n }\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, {})\n const update = useCallback((tokenAddress, data) => {\n dispatch({\n type: UPDATE,\n payload: {\n tokenAddress,\n data,\n },\n })\n }, [])\n\n const updateTopTokens = useCallback((topTokens) => {\n dispatch({\n type: UPDATE_TOP_TOKENS,\n payload: {\n topTokens,\n },\n })\n }, [])\n\n const updateCombinedVolume = useCallback((combinedVol) => {\n dispatch({\n type: UPDATE_COMBINED,\n payload: {\n combinedVol,\n },\n })\n }, [])\n\n const updateTokenTxns = useCallback((address, transactions) => {\n dispatch({\n type: UPDATE_TOKEN_TXNS,\n payload: { address, transactions },\n })\n }, [])\n\n const updateChartData = useCallback((address, chartData) => {\n dispatch({\n type: UPDATE_CHART_DATA,\n payload: { address, chartData },\n })\n }, [])\n\n const updateAllPairs = useCallback((address, allPairs) => {\n dispatch({\n type: UPDATE_ALL_PAIRS,\n payload: { address, allPairs },\n })\n }, [])\n\n const updatePriceData = useCallback((address, data, timeWindow, interval) => {\n dispatch({\n type: UPDATE_PRICE_DATA,\n payload: { address, data, timeWindow, interval },\n })\n }, [])\n\n return (\n [\n state,\n {\n update,\n updateTokenTxns,\n updateChartData,\n updateTopTokens,\n updateAllPairs,\n updatePriceData,\n updateCombinedVolume,\n },\n ],\n [\n state,\n update,\n updateTokenTxns,\n updateCombinedVolume,\n updateChartData,\n updateTopTokens,\n updateAllPairs,\n updatePriceData,\n ]\n )}\n >\n {children}\n \n )\n}\n\nconst getTopTokens = async (ethPrice, ethPriceOld) => {\n const utcCurrentTime = dayjs()\n const utcOneDayBack = utcCurrentTime.subtract(1, 'day').unix()\n const utcTwoDaysBack = utcCurrentTime.subtract(2, 'day').unix()\n let oneDayBlock = await getBlockFromTimestamp(utcOneDayBack)\n let twoDayBlock = await getBlockFromTimestamp(utcTwoDaysBack)\n\n try {\n // need to get the top tokens by liquidity by need token day datas\n const currentDate = parseInt(Date.now() / 86400 / 1000) * 86400 - 86400\n\n let tokenids = await client.query({\n query: TOKEN_TOP_DAY_DATAS,\n fetchPolicy: 'network-only',\n variables: { date: currentDate },\n })\n\n const ids = tokenids?.data?.tokenDayDatas?.reduce((accum, entry) => {\n accum.push(entry.id.slice(0, 42))\n return accum\n }, [])\n\n let current = await client.query({\n query: TOKENS_HISTORICAL_BULK(ids),\n fetchPolicy: 'cache-first',\n })\n\n let oneDayResult = await client.query({\n query: TOKENS_HISTORICAL_BULK(ids, oneDayBlock),\n fetchPolicy: 'cache-first',\n })\n\n let twoDayResult = await client.query({\n query: TOKENS_HISTORICAL_BULK(ids, twoDayBlock),\n fetchPolicy: 'cache-first',\n })\n\n let oneDayData = oneDayResult?.data?.tokens.reduce((obj, cur, i) => {\n return { ...obj, [cur.id]: cur }\n }, {})\n\n let twoDayData = twoDayResult?.data?.tokens.reduce((obj, cur, i) => {\n return { ...obj, [cur.id]: cur }\n }, {})\n\n let bulkResults = await Promise.all(\n current &&\n oneDayData &&\n twoDayData &&\n current?.data?.tokens.map(async (token) => {\n let data = token\n\n // let liquidityDataThisToken = liquidityData?.[token.id]\n let oneDayHistory = oneDayData?.[token.id]\n let twoDayHistory = twoDayData?.[token.id]\n\n // catch the case where token wasnt in top list in previous days\n if (!oneDayHistory) {\n let oneDayResult = await client.query({\n query: TOKEN_DATA(token.id, oneDayBlock),\n fetchPolicy: 'cache-first',\n })\n oneDayHistory = oneDayResult.data.tokens[0]\n }\n if (!twoDayHistory) {\n let twoDayResult = await client.query({\n query: TOKEN_DATA(token.id, twoDayBlock),\n fetchPolicy: 'cache-first',\n })\n twoDayHistory = twoDayResult.data.tokens[0]\n }\n\n // calculate percentage changes and daily changes\n const [oneDayVolumeUSD, volumeChangeUSD] = get2DayPercentChange(\n data.tradeVolumeUSD,\n oneDayHistory?.tradeVolumeUSD ?? 0,\n twoDayHistory?.tradeVolumeUSD ?? 0\n )\n const [oneDayTxns, txnChange] = get2DayPercentChange(\n data.txCount,\n oneDayHistory?.txCount ?? 0,\n twoDayHistory?.txCount ?? 0\n )\n\n const currentLiquidityUSD = data?.totalLiquidity * ethPrice * data?.derivedETH\n const oldLiquidityUSD = oneDayHistory?.totalLiquidity * ethPriceOld * oneDayHistory?.derivedETH\n\n // percent changes\n const priceChangeUSD = getPercentChange(\n data?.derivedETH * ethPrice,\n oneDayHistory?.derivedETH ? oneDayHistory?.derivedETH * ethPriceOld : 0\n )\n\n // set data\n data.priceUSD = data?.derivedETH * ethPrice\n data.totalLiquidityUSD = currentLiquidityUSD\n data.oneDayVolumeUSD = parseFloat(oneDayVolumeUSD)\n data.volumeChangeUSD = volumeChangeUSD\n data.priceChangeUSD = priceChangeUSD\n data.liquidityChangeUSD = getPercentChange(currentLiquidityUSD ?? 0, oldLiquidityUSD ?? 0)\n data.oneDayTxns = oneDayTxns\n data.txnChange = txnChange\n\n // new tokens\n if (!oneDayHistory && data) {\n data.oneDayVolumeUSD = data.tradeVolumeUSD\n data.oneDayVolumeETH = data.tradeVolume * data.derivedETH\n data.oneDayTxns = data.txCount\n }\n\n // update name data for\n updateNameData({\n token0: data,\n })\n\n // HOTFIX for Aave\n if (data.id === '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9') {\n const aaveData = await client.query({\n query: PAIR_DATA('0xdfc14d2af169b0d36c4eff567ada9b2e0cae044f'),\n fetchPolicy: 'cache-first',\n })\n const result = aaveData.data.pairs[0]\n data.totalLiquidityUSD = parseFloat(result.reserveUSD) / 2\n data.liquidityChangeUSD = 0\n data.priceChangeUSD = 0\n }\n\n // used for custom adjustments\n data.oneDayData = oneDayHistory\n data.twoDayData = twoDayHistory\n\n return data\n })\n )\n\n return bulkResults\n\n // calculate percentage changes and daily changes\n } catch (e) {\n console.log(e)\n }\n}\n\nconst getTokenData = async (address, ethPrice, ethPriceOld) => {\n const utcCurrentTime = dayjs()\n const utcOneDayBack = utcCurrentTime.subtract(1, 'day').startOf('minute').unix()\n const utcTwoDaysBack = utcCurrentTime.subtract(2, 'day').startOf('minute').unix()\n let oneDayBlock = await getBlockFromTimestamp(utcOneDayBack)\n let twoDayBlock = await getBlockFromTimestamp(utcTwoDaysBack)\n\n // initialize data arrays\n let data = {}\n let oneDayData = {}\n let twoDayData = {}\n\n try {\n // fetch all current and historical data\n let result = await client.query({\n query: TOKEN_DATA(address),\n fetchPolicy: 'cache-first',\n })\n data = result?.data?.tokens?.[0]\n\n // get results from 24 hours in past\n let oneDayResult = await client.query({\n query: TOKEN_DATA(address, oneDayBlock),\n fetchPolicy: 'cache-first',\n })\n oneDayData = oneDayResult.data.tokens[0]\n\n // get results from 48 hours in past\n let twoDayResult = await client.query({\n query: TOKEN_DATA(address, twoDayBlock),\n fetchPolicy: 'cache-first',\n })\n twoDayData = twoDayResult.data.tokens[0]\n\n // catch the case where token wasnt in top list in previous days\n if (!oneDayData) {\n let oneDayResult = await client.query({\n query: TOKEN_DATA(address, oneDayBlock),\n fetchPolicy: 'cache-first',\n })\n oneDayData = oneDayResult.data.tokens[0]\n }\n if (!twoDayData) {\n let twoDayResult = await client.query({\n query: TOKEN_DATA(address, twoDayBlock),\n fetchPolicy: 'cache-first',\n })\n twoDayData = twoDayResult.data.tokens[0]\n }\n\n // calculate percentage changes and daily changes\n const [oneDayVolumeUSD, volumeChangeUSD] = get2DayPercentChange(\n data.tradeVolumeUSD,\n oneDayData?.tradeVolumeUSD ?? 0,\n twoDayData?.tradeVolumeUSD ?? 0\n )\n\n // calculate percentage changes and daily changes\n const [oneDayVolumeUT, volumeChangeUT] = get2DayPercentChange(\n data.untrackedVolumeUSD,\n oneDayData?.untrackedVolumeUSD ?? 0,\n twoDayData?.untrackedVolumeUSD ?? 0\n )\n\n // calculate percentage changes and daily changes\n const [oneDayTxns, txnChange] = get2DayPercentChange(\n data.txCount,\n oneDayData?.txCount ?? 0,\n twoDayData?.txCount ?? 0\n )\n\n const priceChangeUSD = getPercentChange(\n data?.derivedETH * ethPrice,\n parseFloat(oneDayData?.derivedETH ?? 0) * ethPriceOld\n )\n\n const currentLiquidityUSD = data?.totalLiquidity * ethPrice * data?.derivedETH\n const oldLiquidityUSD = oneDayData?.totalLiquidity * ethPriceOld * oneDayData?.derivedETH\n\n // set data\n data.priceUSD = data?.derivedETH * ethPrice\n data.totalLiquidityUSD = currentLiquidityUSD\n data.oneDayVolumeUSD = oneDayVolumeUSD\n data.volumeChangeUSD = volumeChangeUSD\n data.priceChangeUSD = priceChangeUSD\n data.oneDayVolumeUT = oneDayVolumeUT\n data.volumeChangeUT = volumeChangeUT\n const liquidityChangeUSD = getPercentChange(currentLiquidityUSD ?? 0, oldLiquidityUSD ?? 0)\n data.liquidityChangeUSD = liquidityChangeUSD\n data.oneDayTxns = oneDayTxns\n data.txnChange = txnChange\n\n // used for custom adjustments\n data.oneDayData = oneDayData?.[address]\n data.twoDayData = twoDayData?.[address]\n\n // new tokens\n if (!oneDayData && data) {\n data.oneDayVolumeUSD = data.tradeVolumeUSD\n data.oneDayVolumeETH = data.tradeVolume * data.derivedETH\n data.oneDayTxns = data.txCount\n }\n\n // update name data for\n updateNameData({\n token0: data,\n })\n\n // HOTFIX for Aave\n if (data.id === '0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9') {\n const aaveData = await client.query({\n query: PAIR_DATA('0xdfc14d2af169b0d36c4eff567ada9b2e0cae044f'),\n fetchPolicy: 'cache-first',\n })\n const result = aaveData.data.pairs[0]\n data.totalLiquidityUSD = parseFloat(result.reserveUSD) / 2\n data.liquidityChangeUSD = 0\n data.priceChangeUSD = 0\n }\n } catch (e) {\n console.log(e)\n }\n return data\n}\n\nconst getTokenTransactions = async (allPairsFormatted) => {\n const transactions = {}\n try {\n let result = await client.query({\n query: FILTERED_TRANSACTIONS,\n variables: {\n allPairs: allPairsFormatted,\n },\n fetchPolicy: 'cache-first',\n })\n transactions.mints = result.data.mints\n transactions.burns = result.data.burns\n transactions.swaps = result.data.swaps\n } catch (e) {\n console.log(e)\n }\n return transactions\n}\n\nconst getTokenPairs = async (tokenAddress) => {\n try {\n // fetch all current and historical data\n let result = await client.query({\n query: TOKEN_DATA(tokenAddress),\n fetchPolicy: 'cache-first',\n })\n return result.data?.['pairs0'].concat(result.data?.['pairs1'])\n } catch (e) {\n console.log(e)\n }\n}\n\nconst getIntervalTokenData = async (tokenAddress, startTime, interval = 3600, latestBlock) => {\n const utcEndTime = dayjs.utc()\n let time = startTime\n\n // create an array of hour start times until we reach current hour\n // buffer by half hour to catch case where graph isnt synced to latest block\n const timestamps = []\n while (time < utcEndTime.unix()) {\n timestamps.push(time)\n time += interval\n }\n\n // backout if invalid timestamp format\n if (timestamps.length === 0) {\n return []\n }\n\n // once you have all the timestamps, get the blocks for each timestamp in a bulk query\n let blocks\n try {\n blocks = await getBlocksFromTimestamps(timestamps, 100)\n\n // catch failing case\n if (!blocks || blocks.length === 0) {\n return []\n }\n\n if (latestBlock) {\n blocks = blocks.filter((b) => {\n return parseFloat(b.number) <= parseFloat(latestBlock)\n })\n }\n\n let result = await splitQuery(PRICES_BY_BLOCK, client, [tokenAddress], blocks, 50)\n\n // format token ETH price results\n let values = []\n for (var row in result) {\n let timestamp = row.split('t')[1]\n let derivedETH = parseFloat(result[row]?.derivedETH)\n if (timestamp) {\n values.push({\n timestamp,\n derivedETH,\n })\n }\n }\n\n // go through eth usd prices and assign to original values array\n let index = 0\n for (var brow in result) {\n let timestamp = brow.split('b')[1]\n if (timestamp) {\n values[index].priceUSD = result[brow].ethPrice * values[index].derivedETH\n index += 1\n }\n }\n\n let formattedHistory = []\n\n // for each hour, construct the open and close price\n for (let i = 0; i < values.length - 1; i++) {\n formattedHistory.push({\n timestamp: values[i].timestamp,\n open: parseFloat(values[i].priceUSD),\n close: parseFloat(values[i + 1].priceUSD),\n })\n }\n\n return formattedHistory\n } catch (e) {\n console.log(e)\n console.log('error fetching blocks')\n return []\n }\n}\n\nconst getTokenChartData = async (tokenAddress) => {\n let data = []\n const utcEndTime = dayjs.utc()\n let utcStartTime = utcEndTime.subtract(1, 'year')\n let startTime = utcStartTime.startOf('minute').unix() - 1\n\n try {\n let allFound = false\n let skip = 0\n while (!allFound) {\n let result = await client.query({\n query: TOKEN_CHART,\n variables: {\n tokenAddr: tokenAddress,\n skip,\n },\n fetchPolicy: 'cache-first',\n })\n if (result.data.tokenDayDatas.length < 1000) {\n allFound = true\n }\n skip += 1000\n data = data.concat(result.data.tokenDayDatas)\n }\n\n let dayIndexSet = new Set()\n let dayIndexArray = []\n const oneDay = 24 * 60 * 60\n data.forEach((dayData, i) => {\n // add the day index to the set of days\n dayIndexSet.add((data[i].date / oneDay).toFixed(0))\n dayIndexArray.push(data[i])\n dayData.dailyVolumeUSD = parseFloat(dayData.dailyVolumeUSD)\n })\n\n // fill in empty days\n let timestamp = data[0] && data[0].date ? data[0].date : startTime\n let latestLiquidityUSD = data[0] && data[0].totalLiquidityUSD\n let latestPriceUSD = data[0] && data[0].priceUSD\n let latestPairDatas = data[0] && data[0].mostLiquidPairs\n let index = 1\n while (timestamp < utcEndTime.startOf('minute').unix() - oneDay) {\n const nextDay = timestamp + oneDay\n let currentDayIndex = (nextDay / oneDay).toFixed(0)\n if (!dayIndexSet.has(currentDayIndex)) {\n data.push({\n date: nextDay,\n dayString: nextDay,\n dailyVolumeUSD: 0,\n priceUSD: latestPriceUSD,\n totalLiquidityUSD: latestLiquidityUSD,\n mostLiquidPairs: latestPairDatas,\n })\n } else {\n latestLiquidityUSD = dayIndexArray[index].totalLiquidityUSD\n latestPriceUSD = dayIndexArray[index].priceUSD\n latestPairDatas = dayIndexArray[index].mostLiquidPairs\n index = index + 1\n }\n timestamp = nextDay\n }\n data = data.sort((a, b) => (parseInt(a.date) > parseInt(b.date) ? 1 : -1))\n } catch (e) {\n console.log(e)\n }\n return data\n}\n\nexport function Updater() {\n const [, { updateTopTokens }] = useTokenDataContext()\n const [ethPrice, ethPriceOld] = useEthPrice()\n useEffect(() => {\n async function getData() {\n // get top pairs for overview list\n let topTokens = await getTopTokens(ethPrice, ethPriceOld)\n topTokens && updateTopTokens(topTokens)\n }\n ethPrice && ethPriceOld && getData()\n }, [ethPrice, ethPriceOld, updateTopTokens])\n return null\n}\n\nexport function useTokenData(tokenAddress) {\n const [state, { update }] = useTokenDataContext()\n const [ethPrice, ethPriceOld] = useEthPrice()\n const tokenData = state?.[tokenAddress]\n\n useEffect(() => {\n if (!tokenData && ethPrice && ethPriceOld && isAddress(tokenAddress)) {\n getTokenData(tokenAddress, ethPrice, ethPriceOld).then((data) => {\n update(tokenAddress, data)\n })\n }\n }, [ethPrice, ethPriceOld, tokenAddress, tokenData, update])\n\n return tokenData || {}\n}\n\nexport function useTokenTransactions(tokenAddress) {\n const [state, { updateTokenTxns }] = useTokenDataContext()\n const tokenTxns = state?.[tokenAddress]?.txns\n\n const allPairsFormatted =\n state[tokenAddress] &&\n state[tokenAddress].TOKEN_PAIRS_KEY &&\n state[tokenAddress].TOKEN_PAIRS_KEY.map((pair) => {\n return pair.id\n })\n\n useEffect(() => {\n async function checkForTxns() {\n if (!tokenTxns && allPairsFormatted) {\n let transactions = await getTokenTransactions(allPairsFormatted)\n updateTokenTxns(tokenAddress, transactions)\n }\n }\n checkForTxns()\n }, [tokenTxns, tokenAddress, updateTokenTxns, allPairsFormatted])\n\n return tokenTxns || []\n}\n\nexport function useTokenPairs(tokenAddress) {\n const [state, { updateAllPairs }] = useTokenDataContext()\n const tokenPairs = state?.[tokenAddress]?.[TOKEN_PAIRS_KEY]\n\n useEffect(() => {\n async function fetchData() {\n let allPairs = await getTokenPairs(tokenAddress)\n updateAllPairs(tokenAddress, allPairs)\n }\n if (!tokenPairs && isAddress(tokenAddress)) {\n fetchData()\n }\n }, [tokenAddress, tokenPairs, updateAllPairs])\n\n return tokenPairs || []\n}\n\nexport function useTokenDataCombined(tokenAddresses) {\n const [state, { updateCombinedVolume }] = useTokenDataContext()\n const [ethPrice, ethPriceOld] = useEthPrice()\n\n const volume = state?.combinedVol\n\n useEffect(() => {\n async function fetchDatas() {\n Promise.all(\n tokenAddresses.map(async (address) => {\n return await getTokenData(address, ethPrice, ethPriceOld)\n })\n )\n .then((res) => {\n if (res) {\n const newVolume = res\n ? res?.reduce(function (acc, entry) {\n acc = acc + parseFloat(entry.oneDayVolumeUSD)\n return acc\n }, 0)\n : 0\n updateCombinedVolume(newVolume)\n }\n })\n .catch(() => {\n console.log('error fetching combined data')\n })\n }\n if (!volume && ethPrice && ethPriceOld) {\n fetchDatas()\n }\n }, [tokenAddresses, ethPrice, ethPriceOld, volume, updateCombinedVolume])\n\n return volume\n}\n\nexport function useTokenChartDataCombined(tokenAddresses) {\n const [state, { updateChartData }] = useTokenDataContext()\n\n const datas = useMemo(() => {\n return (\n tokenAddresses &&\n tokenAddresses.reduce(function (acc, address) {\n acc[address] = state?.[address]?.chartData\n return acc\n }, {})\n )\n }, [state, tokenAddresses])\n\n const isMissingData = useMemo(() => Object.values(datas).filter((val) => !val).length > 0, [datas])\n\n const formattedByDate = useMemo(() => {\n return (\n datas &&\n !isMissingData &&\n Object.keys(datas).map(function (address) {\n const dayDatas = datas[address]\n return dayDatas?.reduce(function (acc, dayData) {\n acc[dayData.date] = dayData\n return acc\n }, {})\n }, {})\n )\n }, [datas, isMissingData])\n\n useEffect(() => {\n async function fetchDatas() {\n Promise.all(\n tokenAddresses.map(async (address) => {\n return await getTokenChartData(address)\n })\n )\n .then((res) => {\n res &&\n res.map((result, i) => {\n const tokenAddress = tokenAddresses[i]\n updateChartData(tokenAddress, result)\n return true\n })\n })\n .catch(() => {\n console.log('error fetching combined data')\n })\n }\n if (isMissingData) {\n fetchDatas()\n }\n }, [isMissingData, tokenAddresses, updateChartData])\n\n return formattedByDate\n}\n\nexport function useTokenChartData(tokenAddress) {\n const [state, { updateChartData }] = useTokenDataContext()\n const chartData = state?.[tokenAddress]?.chartData\n console.log(chartData, 'chartDtatatata')\n useEffect(() => {\n async function checkForChartData() {\n if (!chartData) {\n let data = await getTokenChartData(tokenAddress)\n updateChartData(tokenAddress, data)\n }\n }\n checkForChartData()\n }, [chartData, tokenAddress, updateChartData])\n return chartData\n}\n\n/**\n * get candlestick data for a token - saves in context based on the window and the\n * interval size\n * @param {*} tokenAddress\n * @param {*} timeWindow // a preset time window from constant - how far back to look\n * @param {*} interval // the chunk size in seconds - default is 1 hour of 3600s\n */\nexport function useTokenPriceData(tokenAddress, timeWindow, interval = 3600) {\n const [state, { updatePriceData }] = useTokenDataContext()\n const chartData = state?.[tokenAddress]?.[timeWindow]?.[interval]\n const [latestBlock] = useLatestBlocks()\n\n useEffect(() => {\n const currentTime = dayjs.utc()\n const windowSize = timeWindow === timeframeOptions.MONTH ? 'month' : 'week'\n const startTime =\n timeWindow === timeframeOptions.ALL_TIME ? 1589760000 : currentTime.subtract(1, windowSize).startOf('hour').unix()\n\n async function fetch() {\n let data = await getIntervalTokenData(tokenAddress, startTime, interval, latestBlock)\n updatePriceData(tokenAddress, data, timeWindow, interval)\n }\n if (!chartData) {\n fetch()\n }\n }, [chartData, interval, timeWindow, tokenAddress, updatePriceData, latestBlock])\n\n return chartData\n}\n\nexport function useAllTokenData() {\n const [state] = useTokenDataContext()\n\n // filter out for only addresses\n return Object.keys(state)\n .filter((key) => key !== 'combinedVol')\n .reduce((res, key) => {\n res[key] = state[key]\n return res\n }, {})\n}\n","import { USER_MINTS_BUNRS_PER_PAIR } from '../apollo/queries'\nimport { client } from '../apollo/client'\nimport dayjs from 'dayjs'\nimport { getShareValueOverTime } from '.'\nimport { usedChain, WETH } from '../constants'\n\nexport const priceOverrides = [\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48', // USDC\n '0x6b175474e89094c44da98b954eedeac495271d0f', // DAI\n]\n\ninterface ReturnMetrics {\n hodleReturn: number // difference in asset values t0 -> t1 with t0 deposit amounts\n netReturn: number // net return from t0 -> t1\n ixswapReturn: number // netReturn - hodlReturn\n impLoss: number\n fees: number\n}\n\n// used to calculate returns within a given window bounded by two positions\ninterface Position {\n pair: any\n liquidityTokenBalance: number\n liquidityTokenTotalSupply: number\n reserve0: number\n reserve1: number\n reserveUSD: number\n token0PriceUSD: number\n token1PriceUSD: number\n}\n\nconst PRICE_DISCOVERY_START_TIMESTAMP = 1589747086\n\nfunction formatPricesForEarlyTimestamps(position): Position {\n if (position.timestamp < PRICE_DISCOVERY_START_TIMESTAMP) {\n if (priceOverrides.includes(position?.pair?.token0.id)) {\n position.token0PriceUSD = 1\n }\n if (priceOverrides.includes(position?.pair?.token1.id)) {\n position.token1PriceUSD = 1\n }\n // WETH price\n if (position.pair?.token0.id === WETH[usedChain]) {\n position.token0PriceUSD = 203\n }\n if (position.pair?.token1.id === WETH[usedChain]) {\n position.token1PriceUSD = 203\n }\n }\n return position\n}\n\nasync function getPrincipalForUserPerPair(user: string, pairAddress: string) {\n let usd = 0\n let amount0 = 0\n let amount1 = 0\n // get all minst and burns to get principal amounts\n const results = await client.query({\n query: USER_MINTS_BUNRS_PER_PAIR,\n variables: {\n user,\n pair: pairAddress,\n },\n })\n for (const index in results.data.mints) {\n const mint = results.data.mints[index]\n const mintToken0 = mint.pair.token0.id\n const mintToken1 = mint.pair.token1.id\n\n // if trackign before prices were discovered (pre-launch days), hardcode stablecoins\n if (priceOverrides.includes(mintToken0) && mint.timestamp < PRICE_DISCOVERY_START_TIMESTAMP) {\n usd += parseFloat(mint.amount0) * 2\n } else if (priceOverrides.includes(mintToken1) && mint.timestamp < PRICE_DISCOVERY_START_TIMESTAMP) {\n usd += parseFloat(mint.amount1) * 2\n } else {\n usd += parseFloat(mint.amountUSD)\n }\n amount0 += parseFloat(mint.amount0)\n amount1 += parseFloat(mint.amount1)\n }\n\n for (const index in results.data.burns) {\n const burn = results.data.burns[index]\n const burnToken0 = burn.pair.token0.id\n const burnToken1 = burn.pair.token1.id\n\n // if trackign before prices were discovered (pre-launch days), hardcode stablecoins\n if (priceOverrides.includes(burnToken0) && burn.timestamp < PRICE_DISCOVERY_START_TIMESTAMP) {\n usd += parseFloat(burn.amount0) * 2\n } else if (priceOverrides.includes(burnToken1) && burn.timestamp < PRICE_DISCOVERY_START_TIMESTAMP) {\n usd += parseFloat(burn.amount1) * 2\n } else {\n usd -= parseFloat(burn.amountUSD)\n }\n\n amount0 -= parseFloat(burn.amount0)\n amount1 -= parseFloat(burn.amount1)\n }\n\n return { usd, amount0, amount1 }\n}\n\n/**\n * Core algorithm for calculating retursn within one time window.\n * @param positionT0 // users liquidity info and token rates at beginning of window\n * @param positionT1 // '' at the end of the window\n */\nexport function getMetricsForPositionWindow(positionT0: Position, positionT1: Position): ReturnMetrics {\n positionT0 = formatPricesForEarlyTimestamps(positionT0)\n positionT1 = formatPricesForEarlyTimestamps(positionT1)\n\n // calculate ownership at ends of window, for end of window we need original LP token balance / new total supply\n const t0Ownership = positionT0.liquidityTokenBalance / positionT0.liquidityTokenTotalSupply\n const t1Ownership = positionT0.liquidityTokenBalance / positionT1.liquidityTokenTotalSupply\n\n // get starting amounts of token0 and token1 deposited by LP\n const token0_amount_t0 = t0Ownership * positionT0.reserve0\n const token1_amount_t0 = t0Ownership * positionT0.reserve1\n\n // get current token values\n const token0_amount_t1 = t1Ownership * positionT1.reserve0\n const token1_amount_t1 = t1Ownership * positionT1.reserve1\n\n // calculate squares to find imp loss and fee differences\n const sqrK_t0 = Math.sqrt(token0_amount_t0 * token1_amount_t0)\n // eslint-disable-next-line eqeqeq\n const priceRatioT1 = positionT1.token0PriceUSD != 0 ? positionT1.token1PriceUSD / positionT1.token0PriceUSD : 0\n\n const token0_amount_no_fees = positionT1.token1PriceUSD && priceRatioT1 ? sqrK_t0 * Math.sqrt(priceRatioT1) : 0\n const token1_amount_no_fees =\n Number(positionT1.token1PriceUSD) && priceRatioT1 ? sqrK_t0 / Math.sqrt(priceRatioT1) : 0\n const no_fees_usd =\n token0_amount_no_fees * positionT1.token0PriceUSD + token1_amount_no_fees * positionT1.token1PriceUSD\n\n const difference_fees_token0 = token0_amount_t1 - token0_amount_no_fees\n const difference_fees_token1 = token1_amount_t1 - token1_amount_no_fees\n const difference_fees_usd =\n difference_fees_token0 * positionT1.token0PriceUSD + difference_fees_token1 * positionT1.token1PriceUSD\n\n // calculate USD value at t0 and t1 using initial token deposit amounts for asset return\n const assetValueT0 = token0_amount_t0 * positionT0.token0PriceUSD + token1_amount_t0 * positionT0.token1PriceUSD\n const assetValueT1 = token0_amount_t0 * positionT1.token0PriceUSD + token1_amount_t0 * positionT1.token1PriceUSD\n\n const imp_loss_usd = no_fees_usd - assetValueT1\n const ixswap_return = difference_fees_usd + imp_loss_usd\n\n // get net value change for combined data\n const netValueT0 = t0Ownership * positionT0.reserveUSD\n const netValueT1 = t1Ownership * positionT1.reserveUSD\n\n return {\n hodleReturn: assetValueT1 - assetValueT0,\n netReturn: netValueT1 - netValueT0,\n ixswapReturn: ixswap_return,\n impLoss: imp_loss_usd,\n fees: difference_fees_usd,\n }\n}\n\n/**\n * formats data for historical chart for an LPs position in 1 pair over time\n * @param startDateTimestamp // day to start tracking at\n * @param currentPairData // current stat of the pair\n * @param pairSnapshots // history of entries and exits for lp on this pair\n * @param currentETHPrice // current price of eth used for usd conversions\n */\nexport async function getHistoricalPairReturns(startDateTimestamp, currentPairData, pairSnapshots, currentETHPrice) {\n // catch case where data not puplated yet\n if (!currentPairData.createdAtTimestamp) {\n return []\n }\n let dayIndex: number = Math.round(startDateTimestamp / 86400) // get unique day bucket unix\n const currentDayIndex: number = Math.round(dayjs.utc().unix() / 86400)\n const sortedPositions = pairSnapshots.sort((a, b) => {\n return parseInt(a.timestamp) > parseInt(b.timestamp) ? 1 : -1\n })\n if (sortedPositions[0].timestamp > startDateTimestamp) {\n dayIndex = Math.round(sortedPositions[0].timestamp / 86400)\n }\n\n const dayTimestamps = []\n while (dayIndex < currentDayIndex) {\n // only account for days where this pair existed\n if (dayIndex * 86400 >= parseInt(currentPairData.createdAtTimestamp)) {\n dayTimestamps.push(dayIndex * 86400)\n }\n dayIndex = dayIndex + 1\n }\n\n const shareValues = await getShareValueOverTime(currentPairData.id, dayTimestamps)\n const shareValuesFormatted = {}\n shareValues.map((share) => {\n return (shareValuesFormatted[share.timestamp] = share)\n })\n\n // set the default position and data\n let positionT0 = pairSnapshots[0]\n const formattedHistory = []\n let netFees = 0\n\n // keep track of up to date metrics as we parse each day\n for (const index in dayTimestamps) {\n // get the bounds on the day\n const dayTimestamp = dayTimestamps[index]\n const timestampCeiling = dayTimestamp + 86400\n\n // for each change in position value that day, create a window and update\n const dailyChanges = pairSnapshots.filter((snapshot) => {\n return snapshot.timestamp < timestampCeiling && snapshot.timestamp > dayTimestamp\n })\n for (let i = 0; i < dailyChanges.length; i++) {\n const positionT1 = dailyChanges[i]\n const localReturns = getMetricsForPositionWindow(positionT0, positionT1)\n netFees = netFees + localReturns.fees\n positionT0 = positionT1\n }\n\n // now treat the end of the day as a hypothetical position\n let positionT1 = shareValuesFormatted[dayTimestamp + 86400]\n if (!positionT1) {\n positionT1 = {\n pair: currentPairData.id,\n liquidityTokenBalance: positionT0.liquidityTokenBalance,\n totalSupply: currentPairData.totalSupply,\n reserve0: currentPairData.reserve0,\n reserve1: currentPairData.reserve1,\n reserveUSD: currentPairData.reserveUSD,\n token0PriceUSD: currentPairData.token0.derivedETH * currentETHPrice,\n token1PriceUSD: currentPairData.token1.derivedETH * currentETHPrice,\n }\n }\n\n if (positionT1) {\n positionT1.liquidityTokenTotalSupply = positionT1.totalSupply\n positionT1.liquidityTokenBalance = positionT0.liquidityTokenBalance\n const currentLiquidityValue =\n (parseFloat(positionT1.liquidityTokenBalance) / parseFloat(positionT1.liquidityTokenTotalSupply)) *\n parseFloat(positionT1.reserveUSD)\n const localReturns = getMetricsForPositionWindow(positionT0, positionT1)\n const localFees = netFees + localReturns.fees\n\n formattedHistory.push({\n date: dayTimestamp,\n usdValue: currentLiquidityValue,\n fees: localFees,\n })\n }\n }\n\n return formattedHistory\n}\n\n/**\n * For a given pair and user, get the return metrics\n * @param user\n * @param pair\n * @param ethPrice\n */\nexport async function getLPReturnsOnPair(user: string, pair, ethPrice: number, snapshots) {\n // initialize values\n const principal = await getPrincipalForUserPerPair(user, pair.id)\n let hodlReturn = 0\n let netReturn = 0\n let ixswapReturn = 0\n let fees = 0\n\n snapshots = snapshots.filter((entry) => {\n return entry.pair.id === pair.id\n })\n\n // get data about the current position\n const currentPosition: Position = {\n pair,\n liquidityTokenBalance: snapshots[snapshots.length - 1]?.liquidityTokenBalance,\n liquidityTokenTotalSupply: pair.totalSupply,\n reserve0: pair.reserve0,\n reserve1: pair.reserve1,\n reserveUSD: pair.reserveUSD,\n token0PriceUSD: pair.token0.derivedETH * ethPrice,\n token1PriceUSD: pair.token1.derivedETH * ethPrice,\n }\n\n for (const index in snapshots) {\n // get positions at both bounds of the window\n const positionT0 = snapshots[index]\n const positionT1 = parseInt(index) === snapshots.length - 1 ? currentPosition : snapshots[parseInt(index) + 1]\n\n const results = getMetricsForPositionWindow(positionT0, positionT1)\n hodlReturn = hodlReturn + results.hodleReturn\n netReturn = netReturn + results.netReturn\n ixswapReturn = ixswapReturn + results.ixswapReturn\n fees = fees + results.fees\n }\n\n return {\n principal,\n net: {\n return: netReturn,\n },\n ixswap: {\n return: ixswapReturn,\n },\n fees: {\n sum: fees,\n },\n }\n}\n","import dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport React, { createContext, useCallback, useContext, useEffect, useMemo, useReducer, useState } from 'react'\nimport { client, stakingClient } from '../apollo/client'\nimport {\n PAIR_DAY_DATA_BULK,\n USER_HISTORY,\n USER_POSITIONS,\n USER_TRANSACTIONS,\n MINING_POSITIONS,\n} from '../apollo/queries'\nimport { timeframeOptions } from '../constants'\nimport { getHistoricalPairReturns, getLPReturnsOnPair } from '../utils/returns'\nimport { useStartTimestamp, useTimeframe } from './Application'\nimport { useEthPrice } from './GlobalData'\nimport { usePairData, useAllPairData } from './PairData'\n\ndayjs.extend(utc)\n\nconst UPDATE_TRANSACTIONS = 'UPDATE_TRANSACTIONS'\nconst UPDATE_POSITIONS = 'UPDATE_POSITIONS '\nconst UPDATE_MINING_POSITIONS = 'UPDATE_MINING_POSITIONS'\nconst UPDATE_USER_POSITION_HISTORY = 'UPDATE_USER_POSITION_HISTORY'\nconst UPDATE_USER_PAIR_RETURNS = 'UPDATE_USER_PAIR_RETURNS'\n\nconst TRANSACTIONS_KEY = 'TRANSACTIONS_KEY'\nconst POSITIONS_KEY = 'POSITIONS_KEY'\nconst MINING_POSITIONS_KEY = 'MINING_POSITIONS_KEY'\nconst USER_SNAPSHOTS = 'USER_SNAPSHOTS'\nconst USER_PAIR_RETURNS_KEY = 'USER_PAIR_RETURNS_KEY'\n\nconst UserContext = createContext()\n\nfunction useUserContext() {\n return useContext(UserContext)\n}\n\nfunction reducer(state, { type, payload }) {\n switch (type) {\n case UPDATE_TRANSACTIONS: {\n const { account, transactions } = payload\n return {\n ...state,\n [account]: {\n ...state?.[account],\n [TRANSACTIONS_KEY]: transactions,\n },\n }\n }\n case UPDATE_POSITIONS: {\n const { account, positions } = payload\n return {\n ...state,\n [account]: { ...state?.[account], [POSITIONS_KEY]: positions },\n }\n }\n case UPDATE_MINING_POSITIONS: {\n const { account, miningPositions } = payload\n return {\n ...state,\n [account]: { ...state?.[account], [MINING_POSITIONS_KEY]: miningPositions },\n }\n }\n case UPDATE_USER_POSITION_HISTORY: {\n const { account, historyData } = payload\n return {\n ...state,\n [account]: { ...state?.[account], [USER_SNAPSHOTS]: historyData },\n }\n }\n\n case UPDATE_USER_PAIR_RETURNS: {\n const { account, pairAddress, data } = payload\n return {\n ...state,\n [account]: {\n ...state?.[account],\n [USER_PAIR_RETURNS_KEY]: {\n ...state?.[account]?.[USER_PAIR_RETURNS_KEY],\n [pairAddress]: data,\n },\n },\n }\n }\n\n default: {\n throw Error(`Unexpected action type in DataContext reducer: '${type}'.`)\n }\n }\n}\n\nconst INITIAL_STATE = {}\n\nexport default function Provider({ children }) {\n const [state, dispatch] = useReducer(reducer, INITIAL_STATE)\n\n const updateTransactions = useCallback((account, transactions) => {\n dispatch({\n type: UPDATE_TRANSACTIONS,\n payload: {\n account,\n transactions,\n },\n })\n }, [])\n\n const updatePositions = useCallback((account, positions) => {\n dispatch({\n type: UPDATE_POSITIONS,\n payload: {\n account,\n positions,\n },\n })\n }, [])\n\n const updateMiningPositions = useCallback((account, miningPositions) => {\n dispatch({\n type: UPDATE_MINING_POSITIONS,\n payload: {\n account,\n miningPositions,\n },\n })\n }, [])\n\n const updateUserSnapshots = useCallback((account, historyData) => {\n dispatch({\n type: UPDATE_USER_POSITION_HISTORY,\n payload: {\n account,\n historyData,\n },\n })\n }, [])\n\n const updateUserPairReturns = useCallback((account, pairAddress, data) => {\n dispatch({\n type: UPDATE_USER_PAIR_RETURNS,\n payload: {\n account,\n pairAddress,\n data,\n },\n })\n }, [])\n\n return (\n [\n state,\n { updateTransactions, updatePositions, updateMiningPositions, updateUserSnapshots, updateUserPairReturns },\n ],\n [state, updateTransactions, updatePositions, updateMiningPositions, updateUserSnapshots, updateUserPairReturns]\n )}\n >\n {children}\n \n )\n}\n\nexport function useUserTransactions(account) {\n const [state, { updateTransactions }] = useUserContext()\n const transactions = state?.[account]?.[TRANSACTIONS_KEY]\n useEffect(() => {\n async function fetchData(account) {\n try {\n let result = await client.query({\n query: USER_TRANSACTIONS,\n variables: {\n user: account,\n },\n fetchPolicy: 'no-cache',\n })\n if (result?.data) {\n updateTransactions(account, result?.data)\n }\n } catch (e) {\n console.log(e)\n }\n }\n if (!transactions && account) {\n fetchData(account)\n }\n }, [account, transactions, updateTransactions])\n\n return transactions || {}\n}\n\n/**\n * Store all the snapshots of liquidity activity for this account.\n * Each snapshot is a moment when an LP position was created or updated.\n * @param {*} account\n */\nexport function useUserSnapshots(account) {\n const [state, { updateUserSnapshots }] = useUserContext()\n const snapshots = state?.[account]?.[USER_SNAPSHOTS]\n\n useEffect(() => {\n async function fetchData() {\n try {\n let skip = 0\n let allResults = []\n let found = false\n while (!found) {\n let result = await client.query({\n query: USER_HISTORY,\n variables: {\n skip: skip,\n user: account,\n },\n fetchPolicy: 'cache-first',\n })\n allResults = allResults.concat(result.data.liquidityPositionSnapshots)\n if (result.data.liquidityPositionSnapshots.length < 1000) {\n found = true\n } else {\n skip += 1000\n }\n }\n if (allResults) {\n updateUserSnapshots(account, allResults)\n }\n } catch (e) {\n console.log(e)\n }\n }\n if (!snapshots && account) {\n fetchData()\n }\n }, [account, snapshots, updateUserSnapshots])\n\n return snapshots\n}\n\n/**\n * For a given position (data about holding) and user, get the chart\n * data for the fees and liquidity over time\n * @param {*} position\n * @param {*} account\n */\nexport function useUserPositionChart(position, account) {\n const pairAddress = position?.pair?.id\n const [state, { updateUserPairReturns }] = useUserContext()\n\n // get oldest date of data to fetch\n const startDateTimestamp = useStartTimestamp()\n\n // get users adds and removes on this pair\n const snapshots = useUserSnapshots(account)\n const pairSnapshots =\n snapshots &&\n position &&\n snapshots.filter((currentSnapshot) => {\n return currentSnapshot.pair.id === position.pair.id\n })\n\n // get data needed for calculations\n const currentPairData = usePairData(pairAddress)\n const [currentETHPrice] = useEthPrice()\n\n // formatetd array to return for chart data\n const formattedHistory = state?.[account]?.[USER_PAIR_RETURNS_KEY]?.[pairAddress]\n\n useEffect(() => {\n async function fetchData() {\n let fetchedData = await getHistoricalPairReturns(\n startDateTimestamp,\n currentPairData,\n pairSnapshots,\n currentETHPrice\n )\n updateUserPairReturns(account, pairAddress, fetchedData)\n }\n if (\n account &&\n startDateTimestamp &&\n pairSnapshots &&\n !formattedHistory &&\n currentPairData &&\n Object.keys(currentPairData).length > 0 &&\n pairAddress &&\n currentETHPrice\n ) {\n fetchData()\n }\n }, [\n account,\n startDateTimestamp,\n pairSnapshots,\n formattedHistory,\n pairAddress,\n currentPairData,\n currentETHPrice,\n updateUserPairReturns,\n position.pair.id,\n ])\n\n return formattedHistory\n}\n\n/**\n * For each day starting with min(first position timestamp, beginning of time window),\n * get total liquidity supplied by user in USD. Format in array with date timestamps\n * and usd liquidity value.\n */\nexport function useUserLiquidityChart(account) {\n const history = useUserSnapshots(account)\n // formatetd array to return for chart data\n const [formattedHistory, setFormattedHistory] = useState()\n\n const [startDateTimestamp, setStartDateTimestamp] = useState()\n const [activeWindow] = useTimeframe()\n\n // monitor the old date fetched\n useEffect(() => {\n const utcEndTime = dayjs.utc()\n // based on window, get starttime\n let utcStartTime\n switch (activeWindow) {\n case timeframeOptions.WEEK:\n utcStartTime = utcEndTime.subtract(1, 'week').startOf('day')\n break\n case timeframeOptions.ALL_TIME:\n utcStartTime = utcEndTime.subtract(1, 'year')\n break\n default:\n utcStartTime = utcEndTime.subtract(1, 'year').startOf('year')\n break\n }\n let startTime = utcStartTime.unix() - 1\n if ((activeWindow && startTime < startDateTimestamp) || !startDateTimestamp) {\n setStartDateTimestamp(startTime)\n }\n }, [activeWindow, startDateTimestamp])\n\n useEffect(() => {\n async function fetchData() {\n let dayIndex = parseInt(startDateTimestamp / 86400) // get unique day bucket unix\n const currentDayIndex = parseInt(dayjs.utc().unix() / 86400)\n\n // sort snapshots in order\n let sortedPositions = history.sort((a, b) => {\n return parseInt(a.timestamp) > parseInt(b.timestamp) ? 1 : -1\n })\n // if UI start time is > first position time - bump start index to this time\n if (parseInt(sortedPositions[0].timestamp) > dayIndex) {\n dayIndex = parseInt(parseInt(sortedPositions[0].timestamp) / 86400)\n }\n\n const dayTimestamps = []\n // get date timestamps for all days in view\n while (dayIndex < currentDayIndex) {\n dayTimestamps.push(parseInt(dayIndex) * 86400)\n dayIndex = dayIndex + 1\n }\n\n const pairs = history.reduce((pairList, position) => {\n return [...pairList, position.pair.id]\n }, [])\n\n // get all day datas where date is in this list, and pair is in pair list\n let {\n data: { pairDayDatas },\n } = await client.query({\n query: PAIR_DAY_DATA_BULK(pairs, startDateTimestamp),\n })\n\n const formattedHistory = []\n\n // map of current pair => ownership %\n const ownershipPerPair = {}\n for (const index in dayTimestamps) {\n const dayTimestamp = dayTimestamps[index]\n const timestampCeiling = dayTimestamp + 86400\n\n // cycle through relevant positions and update ownership for any that we need to\n const relevantPositions = history.filter((snapshot) => {\n return snapshot.timestamp < timestampCeiling && snapshot.timestamp > dayTimestamp\n })\n for (const index in relevantPositions) {\n const position = relevantPositions[index]\n // case where pair not added yet\n if (!ownershipPerPair[position.pair.id]) {\n ownershipPerPair[position.pair.id] = {\n lpTokenBalance: position.liquidityTokenBalance,\n timestamp: position.timestamp,\n }\n }\n // case where more recent timestamp is found for pair\n if (ownershipPerPair[position.pair.id] && ownershipPerPair[position.pair.id].timestamp < position.timestamp) {\n ownershipPerPair[position.pair.id] = {\n lpTokenBalance: position.liquidityTokenBalance,\n timestamp: position.timestamp,\n }\n }\n }\n\n const relavantDayDatas = Object.keys(ownershipPerPair).map((pairAddress) => {\n // find last day data after timestamp update\n const dayDatasForThisPair = pairDayDatas.filter((dayData) => {\n return dayData.pairAddress === pairAddress\n })\n // find the most recent reference to pair liquidity data\n let mostRecent = dayDatasForThisPair[0]\n for (const index in dayDatasForThisPair) {\n const dayData = dayDatasForThisPair[index]\n if (dayData.date < dayTimestamp && dayData.date > mostRecent.date) {\n mostRecent = dayData\n }\n }\n return mostRecent\n })\n\n // now cycle through pair day datas, for each one find usd value = ownership[address] * reserveUSD\n const dailyUSD = relavantDayDatas.reduce((totalUSD, dayData) => {\n if (dayData) {\n return (totalUSD =\n totalUSD +\n (ownershipPerPair[dayData.pairAddress]\n ? (parseFloat(ownershipPerPair[dayData.pairAddress].lpTokenBalance) / parseFloat(dayData.totalSupply)) *\n parseFloat(dayData.reserveUSD)\n : 0))\n } else {\n return totalUSD\n }\n }, 0)\n\n formattedHistory.push({\n date: dayTimestamp,\n valueUSD: dailyUSD,\n })\n }\n\n setFormattedHistory(formattedHistory)\n }\n if (history && startDateTimestamp && history.length > 0) {\n fetchData()\n }\n }, [history, startDateTimestamp])\n\n return formattedHistory\n}\n\nexport function useUserPositions(account) {\n const [state, { updatePositions }] = useUserContext()\n const positions = state?.[account]?.[POSITIONS_KEY]\n\n const snapshots = useUserSnapshots(account)\n const [ethPrice] = useEthPrice()\n\n useEffect(() => {\n async function fetchData(account) {\n try {\n let result = await client.query({\n query: USER_POSITIONS,\n variables: {\n user: account,\n },\n fetchPolicy: 'no-cache',\n })\n if (result?.data?.liquidityPositions) {\n let formattedPositions = await Promise.all(\n result?.data?.liquidityPositions.map(async (positionData) => {\n const returnData = await getLPReturnsOnPair(account, positionData.pair, ethPrice, snapshots)\n return {\n ...positionData,\n ...returnData,\n }\n })\n )\n updatePositions(account, formattedPositions)\n }\n } catch (e) {\n console.log(e)\n }\n }\n if (!positions && account && ethPrice && snapshots) {\n fetchData(account)\n }\n }, [account, positions, updatePositions, ethPrice, snapshots])\n\n return positions\n}\n\nexport function useMiningPositions(account) {\n const [state, { updateMiningPositions }] = useUserContext()\n const allPairData = useAllPairData()\n const miningPositions = state?.[account]?.[MINING_POSITIONS_KEY]\n\n const snapshots = useUserSnapshots(account)\n\n useEffect(() => {\n async function fetchData(account) {\n try {\n let miningPositionData = []\n let result = await stakingClient.query({\n query: MINING_POSITIONS(account),\n fetchPolicy: 'no-cache',\n })\n if (!result?.data?.user?.miningPosition) {\n return\n }\n miningPositionData = result.data.user.miningPosition\n for (const miningPosition of miningPositionData) {\n const pairAddress = miningPosition.miningPool.pair.id\n miningPosition.pairData = allPairData[pairAddress]\n }\n updateMiningPositions(account, miningPositionData)\n } catch (e) {\n console.log(e)\n }\n }\n\n if (!miningPositions && account && snapshots) {\n fetchData(account)\n }\n }, [account, miningPositions, updateMiningPositions, snapshots, allPairData])\n return miningPositions\n}\n","import { useEffect } from 'react'\nimport ReactGA from 'react-ga'\n\n// fires a GA pageview every time the route changes\nexport default function GoogleAnalyticsReporter({ location: { pathname, search } }) {\n useEffect(() => {\n ReactGA.pageview(`${pathname}${search}`)\n }, [pathname, search])\n return null\n}\n","import React from 'react'\nimport styled, { css, keyframes } from 'styled-components'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\n\nconst pulse = keyframes`\n 0% { transform: scale(1); }\n 60% { transform: scale(1.1); }\n 100% { transform: scale(1); }\n`\n\nconst Wrapper = styled.div`\n pointer-events: none;\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n\n ${(props) =>\n props.fill && !props.height\n ? css`\n height: 100vh;\n `\n : css`\n height: 180px;\n `}\n`\n\nconst AnimatedImg = styled.div`\n animation: ${pulse} 800ms linear infinite;\n & > * {\n width: 72px;\n }\n`\n\nconst LocalLoader = ({ fill }) => {\n const [darkMode] = useDarkModeManager()\n\n return (\n \n \n \"loading-icon\"\n \n \n )\n}\n\nexport default LocalLoader\n","import { CHAINS } from '../constants'\n\nconst ETHERSCAN_HOSTNAMES = {\n [CHAINS.MAINET]: 'etherscan.io',\n [CHAINS.KOVAN]: 'kovan.etherscan.io',\n [CHAINS.POLYGON]: 'polygonscan.com',\n}\n\nexport enum ExplorerDataType {\n TRANSACTION = 'transaction',\n TOKEN = 'token',\n ADDRESS = 'address',\n BLOCK = 'block',\n}\n\n/**\n * Return the explorer link for the given data and data type\n * @param chainId the ID of the chain for which to return the data\n * @param data the data to return a link for\n * @param type the type of the data\n */\nexport function getExplorerLink(chainId: number, data: string, type: ExplorerDataType): string {\n const prefix = `https://${ETHERSCAN_HOSTNAMES[chainId] ?? 'etherscan.io'}`\n\n switch (type) {\n case ExplorerDataType.TRANSACTION: {\n return `${prefix}/tx/${data}`\n }\n case ExplorerDataType.TOKEN: {\n return `${prefix}/token/${data}`\n }\n case ExplorerDataType.BLOCK: {\n return `${prefix}/block/${data}`\n }\n case ExplorerDataType.ADDRESS:\n default: {\n return `${prefix}/address/${data}`\n }\n }\n}\n","import React from 'react'\nimport { Link as RebassLink } from 'rebass'\nimport { Link as RouterLink } from 'react-router-dom'\nimport PropTypes from 'prop-types'\nimport styled from 'styled-components'\nimport { lighten, darken } from 'polished'\n\nconst WrappedLink = ({ external, children, ...rest }) => (\n \n {children}\n \n)\n\nWrappedLink.propTypes = {\n external: PropTypes.bool,\n}\n\nconst Link = styled(WrappedLink)`\n color: ${({ color, theme }) => (color ? color : theme.link)};\n`\n\nexport default Link\n\nexport const CustomLink = styled(RouterLink)`\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n color: ${({ color, theme }) => (color ? color : theme.link)};\n\n &:visited {\n color: ${({ color, theme }) => (color ? lighten(0.1, color) : lighten(0.1, theme.link))};\n }\n\n &:hover {\n cursor: pointer;\n text-decoration: none;\n underline: none;\n color: ${({ color, theme }) => (color ? darken(0.1, color) : darken(0.1, theme.link))};\n }\n`\n\nexport const BasicLink = styled(RouterLink)`\n text-decoration: none;\n color: inherit;\n &:hover {\n cursor: pointer;\n text-decoration: none;\n underline: none;\n }\n`\n","import React from 'react'\nimport { Box, Text } from 'rebass'\nimport styled from 'styled-components'\nimport { usedChain } from '../constants'\nimport { ExplorerDataType, getExplorerLink } from '../utils/etherscan'\nimport Link from './Link'\n\nconst Divider = styled(Box)`\n height: 1px;\n background-color: ${({ theme }) => theme.divider};\n`\n\nexport const BlockedWrapper = styled.div`\n width: 100%;\n height: 100%;\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nexport const BlockedMessageWrapper = styled.div`\n border: 1px solid ${({ theme }) => theme.text3};\n border-radius: 12px;\n display: flex;\n justify-content: center;\n align-items: center;\n padding: 1rem;\n max-width: 80%;\n`\n\nexport const IconWrapper = styled.div`\n position: absolute;\n right: 0;\n border-radius: 3px;\n height: 16px;\n width: 16px;\n padding: 0px;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n color: ${({ theme }) => theme.text1};\n\n :hover {\n cursor: pointer;\n opacity: 0.7;\n }\n`\n\nconst Hint = ({ children, ...rest }) => (\n \n {children}\n \n)\n\nconst Address = ({ address, token, ...rest }) => (\n \n {address}\n \n)\n\nexport const Hover = styled.div`\n :hover {\n cursor: pointer;\n opacity: ${({ fade }) => fade && '0.7'};\n }\n`\n\nexport const StyledIcon = styled.div`\n color: ${({ theme }) => theme.text1};\n`\n\nconst EmptyCard = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n height: 200px;\n border-radius: 20px;\n color: ${({ theme }) => theme.text1};\n height: ${({ height }) => height && height};\n`\n\nexport const SideBar = styled.span`\n display: grid;\n grid-gap: 24px;\n position: sticky;\n top: 4rem;\n`\n\nexport const SubNav = styled.ul`\n list-style: none;\n display: flex;\n flex-direction: row;\n justify-content: flex-start;\n align-items: flex-start;\n padding: 0;\n margin-bottom: 2rem;\n`\nexport const SubNavEl = styled.li`\n list-style: none;\n display: flex;\n padding-bottom: 0.5rem;\n margin-right: 1rem;\n font-weight: ${({ isActive }) => (isActive ? 600 : 500)};\n border-bottom: 1px solid rgba(0, 0, 0, 0);\n\n :hover {\n cursor: pointer;\n border-bottom: 1px solid ${({ theme }) => theme.bg3};\n }\n`\n\nexport const PageWrapper = styled.div`\n display: flex;\n flex-direction: column;\n padding-top: 36px;\n padding-bottom: 80px;\n\n @media screen and (max-width: 600px) {\n padding-top: 0px;\n & > * {\n padding: 0 12px;\n }\n }\n`\n\nexport const ContentWrapper = styled.div`\n display: grid;\n justify-content: start;\n align-items: start;\n grid-template-columns: 1fr;\n grid-gap: 24px;\n max-width: 1440px;\n width: 100%;\n margin: 0 auto;\n padding: 0 2rem;\n box-sizing: border-box;\n @media screen and (max-width: 1180px) {\n grid-template-columns: 1fr;\n padding: 0 1rem;\n }\n`\n\nexport const ContentWrapperLarge = styled.div`\n display: grid;\n justify-content: start;\n align-items: start;\n grid-template-columns: 1fr;\n grid-gap: 24px;\n padding: 2rem;\n margin: 0 auto;\n box-sizing: border-box;\n max-width: 1440px;\n width: 100%;\n\n @media screen and (max-width: 1282px) {\n grid-template-columns: 1fr;\n padding: 0 1rem;\n }\n`\n\nexport const FullWrapper = styled.div`\n display: grid;\n justify-content: start;\n align-items: start;\n grid-template-columns: 1fr;\n grid-gap: 14px;\n max-width: 1440px;\n width: 100%;\n margin: 0 auto;\n padding: 0 2rem;\n box-sizing: border-box;\n\n @media screen and (max-width: 1180px) {\n grid-template-columns: 1fr;\n padding: 0 1rem;\n }\n`\n\nexport const FixedMenu = styled.div`\n z-index: 99;\n width: 100%;\n box-sizing: border-box;\n padding: 1rem;\n box-sizing: border-box;\n margin-bottom: 2rem;\n max-width: 100vw;\n\n @media screen and (max-width: 800px) {\n margin-bottom: 0;\n }\n`\n\nexport { Hint, Divider, Address, EmptyCard }\n","import styled from 'styled-components'\nimport { Box } from 'rebass/styled-components'\n\nconst Row = styled(Box)`\n width: 100%;\n display: flex;\n padding: 0;\n align-items: center;\n align-items: ${({ align }) => align && align};\n padding: ${({ padding }) => padding};\n border: ${({ border }) => border};\n border-radius: ${({ borderRadius }) => borderRadius};\n justify-content: ${({ justify }) => justify};\n`\n\nexport const RowBetween = styled(Row)`\n justify-content: space-between;\n`\nexport const RowStart = styled(Row)`\n justify-content: flex-start;\n`\nexport const RowFlat = styled.div`\n display: flex;\n align-items: flex-end;\n`\n\nexport const AutoRow = styled(Row)`\n flex-wrap: ${({ wrap }) => wrap ?? 'nowrap'};\n margin: -${({ gap }) => gap};\n & > * {\n margin: ${({ gap }) => gap} !important;\n }\n`\n\nexport const RowFixed = styled(Row)`\n width: fit-content;\n`\n\nexport default Row\n","import styled from 'styled-components'\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n`\nexport const ColumnCenter = styled(Column)`\n width: 100%;\n align-items: center;\n`\n\nexport const AutoColumn = styled.div`\n display: grid;\n grid-auto-rows: auto;\n grid-row-gap: ${({ gap }) => (gap === 'sm' && '8px') || (gap === 'md' && '12px') || (gap === 'lg' && '24px') || gap};\n justify-items: ${({ justify }) => justify && justify};\n`\n\nexport default Column\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\n\nimport Row, { RowBetween } from '../Row'\nimport { AutoColumn } from '../Column'\nimport { ChevronDown as Arrow } from 'react-feather'\nimport { TYPE } from '../../Theme'\nimport { StyledIcon } from '..'\n\nconst Wrapper = styled.div`\n z-index: 20;\n position: relative;\n background-color: ${({ theme }) => theme.panelColor};\n border: 1px solid ${({ open, color }) => (open ? color : 'rgba(0, 0, 0, 0.15);')} \n width: 100px;\n padding: 4px 10px;\n padding-right: 6px;\n border-radius: 8px;\n display: flex;\n align-items: center;\n justify-content: center;\n\n :hover {\n cursor: pointer;\n }\n`\n\nconst Dropdown = styled.div`\n position: absolute;\n top: 34px;\n padding-top: 40px;\n width: calc(100% - 40px);\n background-color: ${({ theme }) => theme.bg7};\n border: 1px solid rgba(0, 0, 0, 0.15);\n padding: 10px 10px;\n border-radius: 8px;\n width: calc(100% - 20px);\n font-weight: 500;\n font-size: 1rem;\n color: black;\n :hover {\n cursor: pointer;\n }\n`\n\nconst ArrowStyled = styled(Arrow)`\n height: 20px;\n width: 20px;\n margin-left: 6px;\n`\nconst DropDownRow = styled(Row)``\n\nconst DropdownSelect = ({ options, active, setActive, color }) => {\n const [showDropdown, toggleDropdown] = useState(false)\n return (\n \n toggleDropdown(!showDropdown)} justify=\"center\">\n {active}\n \n \n \n \n {showDropdown && (\n \n \n {Object.keys(options).map((key, index) => {\n let option = options[key]\n return (\n option !== active && (\n {\n toggleDropdown(!showDropdown)\n setActive(option)\n }}\n key={index}\n >\n {option}\n \n )\n )\n })}\n \n \n )}\n \n )\n}\n\nexport default DropdownSelect\n","import { Currency, Token } from '@ixswap1/sdk-core'\nimport { Tags, TokenInfo } from '@uniswap/token-lists'\nimport { TokenList } from '@uniswap/token-lists/dist/types'\n\nimport { SecToken } from '../types/token'\nimport { isAddress } from './lists'\n\ntype TagDetails = Tags[keyof Tags]\nexport interface TagInfo extends TagDetails {\n id: string\n}\n/**\n * Token instances created from token info on a token list.\n */\nexport class WrappedTokenInfo implements Token {\n public readonly isNative: false = false\n public readonly isToken: true = true\n public readonly list?: TokenList\n public readonly isSecToken: boolean = false\n public readonly tokenInfo: TokenInfo | SecToken\n\n constructor(tokenInfo: TokenInfo | SecToken, list?: TokenList) {\n this.tokenInfo = tokenInfo\n this.list = list\n if (list === undefined) {\n this.isSecToken = true\n }\n }\n\n private _checksummedAddress: string | null = null\n\n public get address(): string {\n if (this._checksummedAddress) return this._checksummedAddress\n const checksummedAddress =\n isAddress(this.tokenInfo.address) || isAddress((this.tokenInfo as any).contractAddress ?? '')\n if (!checksummedAddress) throw new Error(`Invalid token address: ${this.tokenInfo.address}`)\n return (this._checksummedAddress = checksummedAddress)\n }\n\n public get chainId(): number {\n return this.tokenInfo.chainId\n }\n\n public get decimals(): number {\n return this.tokenInfo.decimals\n }\n\n public get name(): string {\n return this.tokenInfo.name\n }\n public get description(): string {\n return (this.tokenInfo as any)?.description ?? ''\n }\n public get symbol(): string {\n return this.tokenInfo.symbol\n }\n\n public get logoURI(): string | undefined {\n return this.tokenInfo.logoURI\n }\n\n private _tags: TagInfo[] | null = null\n public get tags(): TagInfo[] {\n if (this._tags !== null) return this._tags\n if (!this.tokenInfo.tags || !this.list) return (this._tags = [])\n const listTags = this.list.tags\n if (!listTags) return (this._tags = [])\n\n return (this._tags = this.tokenInfo.tags.map((tagId) => {\n return {\n ...listTags[tagId],\n id: tagId,\n }\n }))\n }\n\n equals(other: Currency): boolean {\n return other.chainId === this.chainId && other.isToken && other.address.toLowerCase() === this.address.toLowerCase()\n }\n\n sortsBefore(other: Token): boolean {\n if (this.equals(other)) throw new Error('Addresses should not be equal')\n return this.address.toLowerCase() < other.address.toLowerCase()\n }\n\n public get wrapped(): Token {\n return this\n }\n}\n","import { getAddress } from '@ethersproject/address'\nimport { TokenList } from '@uniswap/token-lists'\nimport walletValidator from 'multicoin-address-validator'\n\nimport { WrappedTokenInfo } from './wrappedTokenInfo'\n\nexport function isAddress(value: any): string | false {\n if (!value) {\n return false\n }\n try {\n return getAddress(value)\n } catch {\n return false\n }\n}\n\nexport type TokenAddressMap = Readonly<{\n [chainId: number]: Readonly<{ [tokenAddress: string]: { token: WrappedTokenInfo; list: TokenList } }>\n}>\n\nexport function listToTokenMap(list: TokenList): TokenAddressMap {\n const map = list.tokens.reduce((tokenMap, tokenInfo) => {\n const token = new WrappedTokenInfo(tokenInfo, list)\n if (tokenMap[token.chainId]?.[token.address] !== undefined) {\n console.error(new Error(`Duplicate token! ${token.address}`))\n return tokenMap\n }\n return {\n ...tokenMap,\n [token.chainId]: {\n ...tokenMap[token.chainId],\n [token.address]: {\n token,\n list,\n },\n },\n }\n }, {})\n return transformMap(map)\n}\n\nexport function transformMap(map2: TokenAddressMap): TokenAddressMap {\n return {\n [1]: { ...map2[1] },\n [4]: { ...map2[4] },\n [3]: { ...map2[3] },\n [42]: { ...map2[42] },\n [137]: { ...map2[137] },\n [80001]: { ...map2[80001] },\n [5]: { ...map2[5] },\n }\n}\n","import { useState, useCallback, useEffect, useRef, useContext } from 'react'\nimport { shade } from 'polished'\nimport DEFAULT_TOKEN_LIST from '@ixswap1/default-token-list'\nimport Vibrant from 'node-vibrant'\nimport { hex } from 'wcag-contrast'\nimport copy from 'copy-to-clipboard'\nimport { ThemeContext } from 'styled-components'\n\nimport { isAddress, listToTokenMap } from './lists'\n\nexport function useColor(tokenAddress, token) {\n const [color, setColor] = useState('#5048E5')\n const TRANSFORMED_DEFAULT_TOKEN_LIST = listToTokenMap(DEFAULT_TOKEN_LIST)\n\n if (tokenAddress) {\n const path = `https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/${isAddress(\n tokenAddress\n )}/logo.png`\n if (path) {\n Vibrant.from(\n TRANSFORMED_DEFAULT_TOKEN_LIST[42][isAddress(tokenAddress) || null]?.token?.tokenInfo?.logoURI || path\n ).getPalette((err, palette) => {\n if (palette && palette.Vibrant) {\n let detectedHex = palette.Vibrant.hex\n let AAscore = hex(detectedHex, '#FFF')\n while (AAscore < 3) {\n detectedHex = shade(0.005, detectedHex)\n AAscore = hex(detectedHex, '#FFF')\n }\n if (token === 'DAI') {\n setColor('#FAAB14')\n } else {\n setColor('#5048E5')\n }\n }\n })\n }\n }\n return color\n}\n\nexport function useCopyClipboard(timeout = 500) {\n const [isCopied, setIsCopied] = useState(false)\n\n const staticCopy = useCallback((text) => {\n const didCopy = copy(text)\n setIsCopied(didCopy)\n }, [])\n\n useEffect(() => {\n if (isCopied) {\n const hide = setTimeout(() => {\n setIsCopied(false)\n }, timeout)\n\n return () => {\n clearTimeout(hide)\n }\n }\n }, [isCopied, setIsCopied, timeout])\n\n return [isCopied, staticCopy]\n}\n\nexport const useOutsideClick = (ref, ref2, callback) => {\n const handleClick = (e) => {\n if (ref.current && ref.current && !ref2.current) {\n callback(true)\n } else if (ref.current && !ref.current.contains(e.target) && ref2.current && !ref2.current.contains(e.target)) {\n callback(true)\n } else {\n callback(false)\n }\n }\n useEffect(() => {\n document.addEventListener('click', handleClick)\n return () => {\n document.removeEventListener('click', handleClick)\n }\n })\n}\n\nexport default function useInterval(callback: () => void, delay: null | number) {\n const savedCallback = useRef<() => void>()\n\n // Remember the latest callback.\n useEffect(() => {\n savedCallback.current = callback\n }, [callback])\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n const current = savedCallback.current\n current && current()\n }\n\n if (delay !== null) {\n tick()\n const id = setInterval(tick, delay)\n return () => clearInterval(id)\n }\n return\n }, [delay])\n}\n\nexport const useTheme = () => {\n return useContext(ThemeContext)\n}\n","import { Placement } from '@popperjs/core'\nimport { transparentize } from 'polished'\nimport React, { useState } from 'react'\nimport { usePopper } from 'react-popper'\nimport styled from 'styled-components'\nimport Portal from '@reach/portal'\nimport useInterval from '../../hooks'\n\nconst PopoverContainer = styled.div<{ show: boolean }>`\n z-index: 9999;\n\n visibility: ${(props) => (props.show ? 'visible' : 'hidden')};\n opacity: ${(props) => (props.show ? 1 : 0)};\n transition: visibility 150ms linear, opacity 150ms linear;\n\n background: ${({ theme }) => theme.bg2};\n border: 1px solid ${({ theme }) => theme.bg3};\n box-shadow: 0 4px 8px 0 ${({ theme }) => transparentize(0.9, theme.shadow1)};\n color: ${({ theme }) => theme.text2};\n border-radius: 8px;\n`\n\nconst ReferenceElement = styled.div`\n display: inline-block;\n`\n\nexport interface PopoverProps {\n content: React.ReactNode\n show: boolean\n children: React.ReactNode\n placement?: Placement\n}\n\nexport default function Popover({ content, show, children, placement = 'auto' }: PopoverProps) {\n const [referenceElement, setReferenceElement] = useState(null)\n const [popperElement, setPopperElement] = useState(null)\n const [arrowElement] = useState(null)\n const { styles, update, attributes } = usePopper(referenceElement, popperElement, {\n placement,\n strategy: 'fixed',\n modifiers: [\n { name: 'offset', options: { offset: [8, 8] } },\n { name: 'arrow', options: { element: arrowElement } },\n ],\n })\n\n useInterval(update, show ? 100 : null)\n\n return (\n <>\n {children}\n \n \n {content}\n {/* */}\n \n \n \n )\n}\n","import React, { useCallback, useState } from 'react'\nimport { HelpCircle as Question } from 'react-feather'\nimport styled from 'styled-components'\nimport Popover, { PopoverProps } from '../Popover'\n\nconst QuestionWrapper = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0.2rem;\n border: none;\n background: none;\n outline: none;\n cursor: default;\n border-radius: 36px;\n background-color: ${({ theme }) => theme.bg2};\n color: ${({ theme }) => theme.text2};\n\n :hover,\n :focus {\n opacity: 0.7;\n }\n`\n\nconst TooltipContainer = styled.div`\n width: 228px;\n padding: 0.6rem 1rem;\n line-height: 150%;\n font-weight: 400;\n`\n\ninterface TooltipProps extends Omit {\n text: string\n}\n\nexport function Tooltip({ text, ...rest }: TooltipProps) {\n return {text}} {...rest} />\n}\n\nexport default function QuestionHelper({ text, disabled }: { text: string; disabled?: boolean }) {\n const [show, setShow] = useState(false)\n\n const open = useCallback(() => setShow(true), [setShow])\n const close = useCallback(() => setShow(false), [setShow])\n\n return (\n \n \n \n \n \n \n \n )\n}\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\nimport { Tooltip } from '../QuestionHelper'\n\nconst TextWrapper = styled.div`\n position: relative;\n font-weight: 700;\n margin-left: ${({ margin }) => margin && '4px'};\n color: ${({ theme, link }) => (link ? theme.blue : theme.text1)};\n font-size: ${({ fontSize }) => fontSize ?? 'inherit'};\n\n :hover {\n cursor: pointer;\n }\n\n @media screen and (max-width: 600px) {\n font-size: ${({ adjustSize }) => adjustSize && '12px'};\n }\n`\n\nconst FormattedName = ({ text, maxCharacters, margin = false, adjustSize = false, fontSize, link, ...rest }) => {\n const [showHover, setShowHover] = useState(false)\n\n if (!text) {\n return ''\n }\n\n if (text.length > maxCharacters) {\n return (\n \n setShowHover(true)}\n onMouseLeave={() => setShowHover(false)}\n margin={margin}\n adjustSize={adjustSize}\n link={link}\n fontSize={fontSize}\n {...rest}\n >\n {' ' + text.slice(0, maxCharacters - 1) + '...'}\n \n \n )\n }\n\n return (\n \n {text}\n \n )\n}\n\nexport default FormattedName\n","import dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\nimport React, { useEffect, useState } from 'react'\nimport { useMedia } from 'react-use'\nimport { Box, Flex, Text } from 'rebass'\nimport styled from 'styled-components'\nimport { Divider, EmptyCard } from '..'\nimport { usedChain } from '../../constants'\nimport { useCurrentCurrency } from '../../contexts/Application'\nimport { TYPE } from '../../Theme'\nimport { formattedNum, formatTime } from '../../utils'\nimport { updateNameData } from '../../utils/data'\nimport { ExplorerDataType, getExplorerLink } from '../../utils/etherscan'\nimport DropdownSelect from '../DropdownSelect'\nimport FormattedName from '../FormattedName'\nimport Link from '../Link'\nimport LocalLoader from '../LocalLoader'\nimport { RowBetween, RowFixed } from '../Row'\n\ndayjs.extend(utc)\n\nconst PageButtons = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 2em;\n margin-bottom: 0.5em;\n`\n\nconst Arrow = styled.div`\n color: #2f80ed;\n opacity: ${(props) => (props.faded ? 0.3 : 1)};\n padding: 0 20px;\n user-select: none;\n :hover {\n cursor: pointer;\n }\n`\n\nconst List = styled(Box)`\n -webkit-overflow-scrolling: touch;\n`\n\nconst DashGrid = styled.div`\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 100px 1fr 1fr;\n grid-template-areas: 'txn value time';\n\n > * {\n justify-content: flex-end;\n width: 100%;\n\n &:first-child {\n justify-content: flex-start;\n text-align: left;\n width: 100px;\n }\n }\n\n @media screen and (min-width: 500px) {\n > * {\n &:first-child {\n width: 180px;\n }\n }\n }\n\n @media screen and (min-width: 780px) {\n max-width: 1320px;\n grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr;\n grid-template-areas: 'txn value amountToken amountOther time';\n\n > * {\n &:first-child {\n width: 180px;\n }\n }\n }\n\n @media screen and (min-width: 1080px) {\n max-width: 1320px;\n grid-template-columns: 1.2fr 1fr 1fr 1fr 1fr 1fr;\n grid-template-areas: 'txn value amountToken amountOther account time';\n }\n`\n\nconst ClickableText = styled(Text)`\n color: ${({ theme }) => theme.text1};\n user-select: none;\n text-align: end;\n\n &:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n\n @media screen and (max-width: 640px) {\n font-size: 14px;\n }\n`\n\nconst DataText = styled(Flex)`\n align-items: center;\n text-align: right;\n color: ${({ theme }) => theme.text1};\n\n & > * {\n font-size: 1em;\n }\n\n @media screen and (max-width: 40em) {\n font-size: 0.85rem;\n }\n`\n\nexport const SortText = styled.button`\n cursor: pointer;\n font-weight: ${({ active, theme }) => (active ? 500 : 400)};\n margin-right: 0.75rem !important;\n border: none;\n background-color: transparent;\n font-size: 1rem;\n padding: 0px;\n color: ${({ active, theme }) => (active ? theme.text1 : theme.text3)};\n outline: none;\n\n @media screen and (max-width: 600px) {\n font-size: 14px;\n }\n`\n\nconst SORT_FIELD = {\n VALUE: 'amountUSD',\n AMOUNT0: 'token0Amount',\n AMOUNT1: 'token1Amount',\n TIMESTAMP: 'timestamp',\n}\n\nconst TXN_TYPE = {\n ALL: 'All',\n SWAP: 'Swap',\n ADD: 'Mint',\n REMOVE: 'Burn',\n}\n\nconst ITEMS_PER_PAGE = 10\n\nexport function getTransactionType(event, symbol0, symbol1) {\n const formattedS0 = symbol0?.length > 8 ? symbol0.slice(0, 7) + '...' : symbol0\n const formattedS1 = symbol1?.length > 8 ? symbol1.slice(0, 7) + '...' : symbol1\n switch (event) {\n case TXN_TYPE.ADD:\n return 'Add ' + formattedS0 + ' and ' + formattedS1\n case TXN_TYPE.REMOVE:\n return 'Remove ' + formattedS0 + ' and ' + formattedS1\n case TXN_TYPE.SWAP:\n return 'Swap ' + formattedS0 + ' for ' + formattedS1\n default:\n return ''\n }\n}\n\n// @TODO rework into virtualized list\nfunction TxnList({ transactions, symbol0Override, symbol1Override, color }) {\n // page state\n const [page, setPage] = useState(1)\n const [maxPage, setMaxPage] = useState(1)\n\n // sorting\n const [sortDirection, setSortDirection] = useState(true)\n const [sortedColumn, setSortedColumn] = useState(SORT_FIELD.TIMESTAMP)\n const [filteredItems, setFilteredItems] = useState()\n const [txFilter, setTxFilter] = useState(TXN_TYPE.ALL)\n\n const [currency] = useCurrentCurrency()\n\n useEffect(() => {\n setMaxPage(1) // edit this to do modular\n setPage(1)\n }, [transactions])\n\n // parse the txns and format for UI\n useEffect(() => {\n if (transactions && transactions.mints && transactions.burns && transactions.swaps) {\n let newTxns = []\n if (transactions.mints.length > 0) {\n transactions.mints.map((mint) => {\n let newTxn = {}\n newTxn.hash = mint.transaction.id\n newTxn.timestamp = mint.transaction.timestamp\n newTxn.type = TXN_TYPE.ADD\n newTxn.token0Amount = mint.amount0\n newTxn.token1Amount = mint.amount1\n newTxn.account = mint.to\n newTxn.token0Symbol = updateNameData(mint.pair).token0.symbol\n newTxn.token1Symbol = updateNameData(mint.pair).token1.symbol\n newTxn.amountUSD = mint.amountUSD\n return newTxns.push(newTxn)\n })\n }\n if (transactions.burns.length > 0) {\n transactions.burns.map((burn) => {\n let newTxn = {}\n newTxn.hash = burn.transaction.id\n newTxn.timestamp = burn.transaction.timestamp\n newTxn.type = TXN_TYPE.REMOVE\n newTxn.token0Amount = burn.amount0\n newTxn.token1Amount = burn.amount1\n newTxn.account = burn.sender\n newTxn.token0Symbol = updateNameData(burn.pair).token0.symbol\n newTxn.token1Symbol = updateNameData(burn.pair).token1.symbol\n newTxn.amountUSD = burn.amountUSD\n return newTxns.push(newTxn)\n })\n }\n if (transactions.swaps.length > 0) {\n transactions.swaps.map((swap) => {\n const netToken0 = swap.amount0In - swap.amount0Out\n const netToken1 = swap.amount1In - swap.amount1Out\n\n let newTxn = {}\n\n if (netToken0 < 0) {\n newTxn.token0Symbol = updateNameData(swap.pair).token0.symbol\n newTxn.token1Symbol = updateNameData(swap.pair).token1.symbol\n newTxn.token0Amount = Math.abs(netToken0)\n newTxn.token1Amount = Math.abs(netToken1)\n } else if (netToken1 < 0) {\n newTxn.token0Symbol = updateNameData(swap.pair).token1.symbol\n newTxn.token1Symbol = updateNameData(swap.pair).token0.symbol\n newTxn.token0Amount = Math.abs(netToken1)\n newTxn.token1Amount = Math.abs(netToken0)\n }\n\n newTxn.hash = swap.transaction.id\n newTxn.timestamp = swap.transaction.timestamp\n newTxn.type = TXN_TYPE.SWAP\n\n newTxn.amountUSD = swap.amountUSD\n newTxn.account = swap.to\n return newTxns.push(newTxn)\n })\n }\n\n const filtered = newTxns.filter((item) => {\n if (txFilter !== TXN_TYPE.ALL) {\n return item.type === txFilter\n }\n return true\n })\n setFilteredItems(filtered)\n let extraPages = 1\n if (filtered.length % ITEMS_PER_PAGE === 0) {\n extraPages = 0\n }\n if (filtered.length === 0) {\n setMaxPage(1)\n } else {\n setMaxPage(Math.floor(filtered.length / ITEMS_PER_PAGE) + extraPages)\n }\n }\n }, [transactions, txFilter])\n\n useEffect(() => {\n setPage(1)\n }, [txFilter])\n\n const filteredList =\n filteredItems &&\n filteredItems\n .sort((a, b) => {\n return parseFloat(a[sortedColumn]) > parseFloat(b[sortedColumn])\n ? (sortDirection ? -1 : 1) * 1\n : (sortDirection ? -1 : 1) * -1\n })\n .slice(ITEMS_PER_PAGE * (page - 1), page * ITEMS_PER_PAGE)\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below780 = useMedia('(max-width: 780px)')\n\n const ListItem = ({ item }) => {\n return (\n \n \n \n {getTransactionType(item.type, item.token1Symbol, item.token0Symbol)}\n \n \n \n {currency === 'ETH' ? 'Ξ ' + formattedNum(item.valueETH) : formattedNum(item.amountUSD, true)}\n \n {!below780 && (\n <>\n \n {formattedNum(item.token1Amount) + ' '}{' '}\n \n \n \n {formattedNum(item.token0Amount) + ' '}{' '}\n \n \n \n )}\n {!below1080 && (\n \n \n {item.account && item.account.slice(0, 6) + '...' + item.account.slice(38, 42)}\n \n \n )}\n {formatTime(item.timestamp)}\n \n )\n }\n\n return (\n <>\n \n {below780 ? (\n \n \n \n ) : (\n \n {\n setTxFilter(TXN_TYPE.ALL)\n }}\n active={txFilter === TXN_TYPE.ALL}\n >\n All\n \n {\n setTxFilter(TXN_TYPE.SWAP)\n }}\n active={txFilter === TXN_TYPE.SWAP}\n >\n Swaps\n \n {\n setTxFilter(TXN_TYPE.ADD)\n }}\n active={txFilter === TXN_TYPE.ADD}\n >\n Adds\n \n {\n setTxFilter(TXN_TYPE.REMOVE)\n }}\n active={txFilter === TXN_TYPE.REMOVE}\n >\n Removes\n \n \n )}\n\n \n {\n setSortedColumn(SORT_FIELD.VALUE)\n setSortDirection(sortedColumn !== SORT_FIELD.VALUE ? true : !sortDirection)\n }}\n >\n Total Value {sortedColumn === SORT_FIELD.VALUE ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n {!below780 && (\n \n {\n setSortedColumn(SORT_FIELD.AMOUNT0)\n setSortDirection(sortedColumn !== SORT_FIELD.AMOUNT0 ? true : !sortDirection)\n }}\n >\n {symbol0Override ? symbol0Override + ' Amount' : 'Token Amount'}{' '}\n {sortedColumn === SORT_FIELD.AMOUNT0 ? (sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n <>\n {!below780 && (\n \n {\n setSortedColumn(SORT_FIELD.AMOUNT1)\n setSortDirection(sortedColumn !== SORT_FIELD.AMOUNT1 ? true : !sortDirection)\n }}\n >\n {symbol1Override ? symbol1Override + ' Amount' : 'Token Amount'}{' '}\n {sortedColumn === SORT_FIELD.AMOUNT1 ? (sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n {!below1080 && (\n \n Account\n \n )}\n \n {\n setSortedColumn(SORT_FIELD.TIMESTAMP)\n setSortDirection(sortedColumn !== SORT_FIELD.TIMESTAMP ? true : !sortDirection)\n }}\n >\n Time {sortedColumn === SORT_FIELD.TIMESTAMP ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n \n \n \n \n {!filteredList ? (\n \n ) : filteredList.length === 0 ? (\n No recent transactions found.\n ) : (\n filteredList.map((item, index) => {\n return (\n
\n \n \n
\n )\n })\n )}\n
\n \n {\n setPage(page === 1 ? page : page - 1)\n }}\n >\n \n \n {'Page ' + page + ' of ' + maxPage}\n {\n setPage(page === maxPage ? page : page + 1)\n }}\n >\n \n \n \n \n )\n}\n\nexport default TxnList\n","import { Box as RebassBox } from 'rebass'\nimport styled, { css } from 'styled-components'\n\nconst panelPseudo = css`\n :after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n height: 10px;\n }\n\n @media only screen and (min-width: 40em) {\n :after {\n content: unset;\n }\n }\n`\n\nconst Panel = styled(RebassBox)`\n position: relative;\n background-color: #ffffff;\n padding: 1.25rem;\n width: 100%;\n height: 100%;\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n border-radius: 8px;\n // border: 1px solid ${({ theme }) => theme.bg3};\n // box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.05); /* box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.01), 0px 4px 8px rgba(0, 0, 0, 0.01), 0px 16px 24px rgba(0, 0, 0, 0.01), 0px 24px 32px rgba(0, 0, 0, 0.01); */\n :hover {\n cursor: ${({ hover }) => hover && 'pointer'};\n border: ${({ hover, theme }) => hover && '1px solid' + theme.bg5};\n }\n\n ${(props) => props.background && `background-color: ${props.theme.advancedBG};`}\n\n ${(props) => (props.area ? `grid-area: ${props.area};` : null)}\n\n ${(props) =>\n props.grouped &&\n css`\n @media only screen and (min-width: 40em) {\n &:first-of-type {\n border-radius: 20px 20px 0 0;\n }\n &:last-of-type {\n border-radius: 0 0 20px 20px;\n }\n }\n `}\n\n ${(props) =>\n props.rounded &&\n css`\n border-radius: 8px;\n @media only screen and (min-width: 40em) {\n border-radius: 10px;\n }\n `};\n\n ${(props) => !props.last && panelPseudo}\n`\n\nexport default Panel\n\n// const Panel = styled.div`\n// width: 100%;\n// height: 100%;\n// display: flex;\n// flex-direction: column;\n// justify-content: flex-start;\n// border-radius: 12px;\n// background-color: ${({ theme }) => theme.advancedBG};\n// padding: 1.25rem;\n// box-sizing: border-box;\n// box-shadow: 0 1.1px 2.8px -9px rgba(0, 0, 0, 0.008), 0 2.7px 6.7px -9px rgba(0, 0, 0, 0.012),\n// 0 5px 12.6px -9px rgba(0, 0, 0, 0.015), 0 8.9px 22.6px -9px rgba(0, 0, 0, 0.018),\n// 0 16.7px 42.2px -9px rgba(0, 0, 0, 0.022), 0 40px 101px -9px rgba(0, 0, 0, 0.03);\n// `\n","import React from 'react'\nimport { Button as RebassButton } from 'rebass/styled-components'\nimport styled from 'styled-components'\nimport { Plus, ChevronDown, ChevronUp } from 'react-feather'\nimport { darken, transparentize } from 'polished'\nimport { RowBetween } from '../Row'\nimport { StyledIcon } from '..'\nimport { gradientBorder } from '../../Theme'\n\nconst Base = styled(RebassButton)`\n padding: 8px 12px;\n font-size: 0.825rem;\n font-weight: 600;\n border-radius: 12px;\n cursor: pointer;\n outline: none;\n border: 1px solid transparent;\n outline: none;\n border-bottom-right-radius: ${({ open }) => open && '0'};\n border-bottom-left-radius: ${({ open }) => open && '0'};\n`\n\nconst BaseCustom = styled(RebassButton)`\n padding: 16px 12px;\n font-size: 0.825rem;\n font-weight: 400;\n border-radius: 12px;\n cursor: pointer;\n outline: none;\n`\n\nconst Dull = styled(Base)`\n background-color: rgba(255, 255, 255, 0.15);\n border: 1px solid rgba(255, 255, 255, 0.15);\n color: black;\n height: 100%;\n font-weight: 400;\n &:hover,\n :focus {\n background-color: rgba(255, 255, 255, 0.25);\n border-color: rgba(255, 255, 255, 0.25);\n }\n &:focus {\n box-shadow: 0 0 0 1pt rgba(255, 255, 255, 0.25);\n }\n &:active {\n background-color: rgba(255, 255, 255, 0.25);\n border-color: rgba(255, 255, 255, 0.25);\n }\n`\n\nexport default function ButtonStyled({ children, ...rest }) {\n return {children}\n}\n\nconst ContentWrapper = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n`\n\nexport const ButtonLight = styled(Base)`\n border: 1px solid #e6e6ff;\n padding: 15px 25px;\n background: none;\n color: ${({ color, theme }) => (color ? darken(0.1, color) : theme.primary1)};\n\n min-width: fit-content;\n border-radius: 6px;\n white-space: nowrap;\n\n a {\n color: ${({ color, theme }) => (color ? darken(0.1, color) : theme.primary1)};\n }\n\n :hover {\n background-color: ${({ color, theme }) =>\n color ? transparentize(0.8, color) : transparentize(0.8, theme.primary1)};\n }\n`\n\nexport function ButtonDropdown({ disabled = false, children, open, ...rest }) {\n return (\n \n \n
{children}
\n {open ? (\n \n \n \n ) : (\n \n \n \n )}\n
\n
\n )\n}\n\nexport const ButtonDark = styled(Base)`\n background-color: #6666ff;\n color: white;\n padding: 15px 55px;\n width: fit-content;\n border-radius: 6px;\n white-space: nowrap;\n\n :hover {\n background-color: ${({ color, theme }) => (color ? darken(0.1, color) : darken(0.1, theme.primary1))};\n }\n`\n\nexport const ButtonFaded = styled(Base)`\n background-color: ${({ theme }) => theme.bg2};\n color: (255, 255, 255, 0.5);\n white-space: nowrap;\n\n :hover {\n opacity: 0.5;\n }\n`\n\nexport const PrimaryButton = styled(BaseCustom)`\n width: 100%;\n background: #ffffff;\n border-radius: 6px;\n padding: 12px 16px;\n border: 1px solid #e6e6ff;\n color: #6666ff;\n font-size: 14px;\n font-weight: 600;\n`\n\nexport const ButtonIXSGradient = styled(PrimaryButton)`\n height: 36px;\n width: 221px;\n position: relative;\n cursor: pointer;\n border: none;\n white-space: no-wrap;\n padding: 8px 0px;\n\n :hover {\n @media (min-width: 1000px) {\n opacity: 0.8;\n }\n }\n :active {\n opacity: 0.9;\n }\n border-radius: 8px;\n background-color: #6666ff;\n background: #6666ff;\n color: #ffffff;\n`\nexport const ButtonGradientBorder = styled(ButtonIXSGradient)`\n background-color: transparent;\n background: transparent;\n border: 1px solid #E6E6FF;\n width: auto;\n height: auto;\n font\n // :focus,\n // :hover {\n // background-color: transparent;\n // background: transparent;\n // }\n`\n\nexport const ButtonIXSSecondaryGradient = styled(ButtonIXSGradient)`\n background: none;\n border: 1px solid #e6e6ff;\n color: #6666ff;\n padding: 12px 16px;\n border-radius: 6px;\n`\n\nexport const SecondaryButton = styled(BaseCustom)`\n position: relative;\n width: 221px;\n background: transparent;\n border-radius: 40px;\n padding: 8px 0px;\n border: solid 2px transparent;\n background-image: linear-gradient(116.36deg, #7b42a9 33.43%, #ed0376 95.41%);\n background-clip: content-box, border-box;\n box-shadow: 2px 1000px 1px #fff inset;\n\n // ::before {\n // content: '';\n // position: absolute;\n // inset: 0;\n // background: ${({ theme }) => theme.background1};\n // z-index: -1;\n // margin: 1px;\n // border-radius: inherit;\n // }\n`\n\nexport function ButtonPlusDull({ disabled, children, ...rest }) {\n return (\n \n \n \n
{children}
\n
\n
\n )\n}\n\nexport function ButtonCustom({ children, bgColor, color, ...rest }) {\n return (\n \n {children}\n \n )\n}\n\nexport const OptionButton = styled.div`\n font-weight: 500;\n width: fit-content;\n white-space: nowrap;\n padding: 6px;\n border-radius: 6px;\n border: 1px solid ${({ theme }) => theme.bg4};\n background-color: ${({ active, theme }) => active && '#6666FF'};\n color: ${({ theme, active }) => active && 'White'};\n\n :hover {\n cursor: ${({ disabled }) => !disabled && 'pointer'};\n }\n`\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\nimport { Area, XAxis, YAxis, ResponsiveContainer, Tooltip, AreaChart } from 'recharts'\nimport { AutoRow, RowBetween } from '../Row'\nimport { toK, toNiceDate, toNiceDateYear, formattedNum, getTimeframe } from '../../utils'\nimport { OptionButton } from '../ButtonStyled'\nimport { darken } from 'polished'\nimport { useMedia } from 'react-use'\nimport { timeframeOptions } from '../../constants'\nimport DropdownSelect from '../DropdownSelect'\nimport { useUserLiquidityChart } from '../../contexts/User'\nimport LocalLoader from '../LocalLoader'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\nimport { TYPE } from '../../Theme'\n\nconst ChartWrapper = styled.div`\n height: 100%;\n max-height: 390px;\n\n @media screen and (max-width: 600px) {\n min-height: 200px;\n }\n`\n\nconst UserChart = ({ account }) => {\n const chartData = useUserLiquidityChart(account)\n\n const [timeWindow, setTimeWindow] = useState(timeframeOptions.ALL_TIME)\n let utcStartTime = getTimeframe(timeWindow)\n\n const below600 = useMedia('(max-width: 600px)')\n const above1600 = useMedia('(min-width: 1600px)')\n\n const domain = [(dataMin) => (dataMin > utcStartTime ? dataMin : utcStartTime), 'dataMax']\n\n const aspect = above1600 ? 60 / 12 : below600 ? 60 / 42 : 60 / 16\n\n const [darkMode] = useDarkModeManager()\n const textColor = darkMode ? 'white' : 'black'\n\n return (\n \n {below600 ? (\n \n
\n \n \n ) : (\n \n \n Liquidity Value\n \n \n setTimeWindow(timeframeOptions.MONTH)}\n >\n 1M\n \n setTimeWindow(timeframeOptions.WEEK)}\n >\n 1W\n \n setTimeWindow(timeframeOptions.ALL_TIME)}\n >\n All\n \n \n \n )}\n {chartData ? (\n \n \n \n \n \n \n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={domain}\n />\n '$' + toK(tick)}\n axisLine={false}\n tickLine={false}\n interval=\"preserveEnd\"\n minTickGap={6}\n yAxisId={0}\n tick={{ fill: textColor }}\n />\n formattedNum(val, true)}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: '#ff007a',\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n ) : (\n \n )}\n \n )\n}\n\nexport default UserChart\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\nimport { XAxis, YAxis, ResponsiveContainer, Tooltip, LineChart, Line, CartesianGrid } from 'recharts'\nimport { AutoRow, RowBetween } from '../Row'\n\nimport { toK, toNiceDate, toNiceDateYear, formattedNum, getTimeframe } from '../../utils'\nimport { OptionButton } from '../ButtonStyled'\nimport { useMedia } from 'react-use'\nimport { timeframeOptions } from '../../constants'\nimport DropdownSelect from '../DropdownSelect'\nimport { useUserPositionChart } from '../../contexts/User'\nimport { useTimeframe } from '../../contexts/Application'\nimport LocalLoader from '../LocalLoader'\nimport { useColor } from '../../hooks'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\n\nconst ChartWrapper = styled.div`\n max-height: 420px;\n\n @media screen and (max-width: 600px) {\n min-height: 200px;\n }\n`\n\nconst OptionsRow = styled.div`\n display: flex;\n flex-direction: row;\n width: 100%;\n margin-bottom: 40px;\n`\n\nconst CHART_VIEW = {\n VALUE: 'Value',\n FEES: 'Fees',\n}\n\nconst PairReturnsChart = ({ account, position }) => {\n let data = useUserPositionChart(position, account)\n\n const [timeWindow, setTimeWindow] = useTimeframe()\n\n const below600 = useMedia('(max-width: 600px)')\n\n const color = useColor(position?.pair.token0.id)\n\n const [chartView, setChartView] = useState(CHART_VIEW.VALUE)\n\n // based on window, get starttime\n let utcStartTime = getTimeframe(timeWindow)\n data = data?.filter((entry) => entry.date >= utcStartTime)\n\n const aspect = below600 ? 60 / 42 : 60 / 16\n\n const [darkMode] = useDarkModeManager()\n const textColor = darkMode ? 'white' : 'black'\n\n return (\n \n {below600 ? (\n \n
\n \n \n ) : (\n \n \n setChartView(CHART_VIEW.VALUE)}>\n Liquidity\n \n setChartView(CHART_VIEW.FEES)}>\n Fees\n \n \n \n setTimeWindow(timeframeOptions.WEEK)}\n >\n 1W\n \n setTimeWindow(timeframeOptions.MONTH)}\n >\n 1M\n \n setTimeWindow(timeframeOptions.ALL_TIME)}\n >\n All\n \n \n \n )}\n \n {data ? (\n \n \n \n \n \n \n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={['dataMin', 'dataMax']}\n />\n '$' + toK(tick)}\n axisLine={false}\n tickLine={false}\n interval=\"preserveStartEnd\"\n minTickGap={0}\n yAxisId={0}\n tick={{ fill: textColor }}\n />\n formattedNum(val, true)}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n\n \n \n ) : (\n \n )}\n \n \n )\n}\n\nexport default PairReturnsChart\n","import React, { useState, useEffect } from 'react'\nimport DEFAULT_TOKEN_LIST from '@ixswap1/default-token-list'\nimport styled from 'styled-components'\n\nimport { isAddress } from '../../hooks/lists'\nimport EthereumLogo from '../../assets/eth.png'\nimport { usedChain, WETH } from '../../constants/index.js'\nimport { listToTokenMap } from '../../hooks/lists'\nimport NewDemo from '../../assets/newDemo.png'\n\nconst BAD_IMAGES = {}\n\nconst Inline = styled.div`\n display: flex;\n align-items: center;\n align-self: center;\n`\n\nconst Image = styled.img`\n width: ${({ size }) => size};\n height: ${({ size }) => size};\n background-color: white;\n border-radius: 50%;\n box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.075);\n`\n\nconst StyledEthereumLogo = styled.div`\n display: flex;\n align-items: center;\n justify-content: center;\n\n > img {\n width: ${({ size }) => size};\n height: ${({ size }) => size};\n }\n`\n\nexport default function TokenLogo({ address, header = false, size = '24px', ...rest }) {\n const [error, setError] = useState(false)\n\n useEffect(() => {\n setError(false)\n }, [address])\n\n if (error || BAD_IMAGES[address]) {\n return (\n \n \n {/* \n 🤔\n */}\n \n )\n }\n\n // hard coded fixes for trust wallet api issues\n if (address?.toLowerCase() === '0x5e74c9036fb86bd7ecdcb084a0673efc32ea31cb') {\n address = '0x42456d7084eacf4083f1140d3229471bba2949a8'\n }\n\n if (address?.toLowerCase() === '0xc011a73ee8576fb46f5e1c5751ca3b9fe0af2a6f') {\n address = '0xc011a72400e58ecd99ee497cf89e3775d4bd732f'\n }\n\n if (address?.toLowerCase() === WETH[usedChain]) {\n return (\n \n \n \n )\n }\n\n const path = `https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/polygon/assets/${isAddress(\n address\n )}/logo.png`\n\n const TRANSFORMED_DEFAULT_TOKEN_LIST = listToTokenMap(DEFAULT_TOKEN_LIST)\n\n return (\n \n {\n BAD_IMAGES[address] = true\n setError(true)\n event.preventDefault()\n }}\n />\n \n )\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport TokenLogo from '../TokenLogo'\n\nexport default function DoubleTokenLogo({ a0, a1, size = 24, margin = false }) {\n const TokenWrapper = styled.div`\n position: relative;\n display: flex;\n flex-direction: row;\n margin-right: ${({ sizeraw, margin }) => margin && (sizeraw / 3 + 8).toString() + 'px'};\n `\n\n const HigherLogo = styled(TokenLogo)`\n z-index: 2;\n // background-color: white;\n border-radius: 50%;\n `\n\n const CoveredLogo = styled(TokenLogo)`\n position: absolute;\n left: ${({ sizeraw }) => (sizeraw / 2).toString() + 'px'};\n // background-color: white;\n border-radius: 50%;\n `\n\n return (\n \n \n \n \n )\n}\n","import React, { useState, useEffect } from 'react'\nimport { useMedia } from 'react-use'\nimport dayjs from 'dayjs'\nimport LocalLoader from '../LocalLoader'\nimport utc from 'dayjs/plugin/utc'\nimport { Box, Flex, Text } from 'rebass'\nimport styled from 'styled-components'\nimport Link, { CustomLink } from '../Link'\nimport { Divider } from '../../components'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport { withRouter } from 'react-router-dom'\nimport { formattedNum, getPoolLink } from '../../utils'\nimport { AutoColumn } from '../Column'\nimport { useEthPrice } from '../../contexts/GlobalData'\nimport { RowFixed } from '../Row'\nimport { ButtonLight } from '../ButtonStyled'\nimport { TYPE } from '../../Theme'\nimport FormattedName from '../FormattedName'\n\ndayjs.extend(utc)\n\nconst PageButtons = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 2em;\n margin-bottom: 0.5em;\n`\n\nconst Arrow = styled.div`\n color: ${({ theme }) => theme.primary1};\n opacity: ${(props) => (props.faded ? 0.3 : 1)};\n padding: 0 20px;\n user-select: none;\n :hover {\n cursor: pointer;\n }\n`\n\nconst List = styled(Box)`\n -webkit-overflow-scrolling: touch;\n`\n\nconst DashGrid = styled.div`\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 5px 0.5fr 1fr 1fr;\n grid-template-areas: 'number name ixswap return';\n align-items: flex-start;\n padding: 20px 0;\n\n > * {\n justify-content: flex-end;\n width: 100%;\n\n :first-child {\n justify-content: flex-start;\n text-align: left;\n width: 20px;\n }\n }\n\n @media screen and (min-width: 1200px) {\n grid-template-columns: 35px 2.5fr 1fr 1fr;\n grid-template-areas: 'number name ixswap return';\n }\n\n @media screen and (max-width: 740px) {\n grid-template-columns: 2.5fr 1fr 1fr;\n grid-template-areas: 'name ixswap return';\n }\n\n @media screen and (max-width: 500px) {\n grid-template-columns: 2.5fr 1fr;\n grid-template-areas: 'name ixswap';\n }\n`\n\nconst ListWrapper = styled.div``\n\nconst ClickableText = styled(Text)`\n color: ${({ theme }) => theme.text1};\n &:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n\n text-align: end;\n user-select: none;\n`\n\nconst DataText = styled(Flex)`\n align-items: center;\n text-align: center;\n color: ${({ theme }) => theme.text1};\n & > * {\n font-size: 1em;\n }\n\n @media screen and (max-width: 600px) {\n font-size: 13px;\n }\n`\n\nconst SORT_FIELD = {\n VALUE: 'VALUE',\n IXSWAP_RETURN: 'IXSWAP_RETURN',\n}\n\nfunction PositionList({ positions }) {\n const below500 = useMedia('(max-width: 500px)')\n const below740 = useMedia('(max-width: 740px)')\n\n // pagination\n const [page, setPage] = useState(1)\n const [maxPage, setMaxPage] = useState(1)\n const ITEMS_PER_PAGE = 10\n\n // sorting\n const [sortDirection, setSortDirection] = useState(true)\n const [sortedColumn, setSortedColumn] = useState(SORT_FIELD.VALUE)\n\n useEffect(() => {\n setMaxPage(1) // edit this to do modular\n setPage(1)\n }, [positions])\n\n useEffect(() => {\n if (positions) {\n let extraPages = 1\n if (positions.length % ITEMS_PER_PAGE === 0) {\n extraPages = 0\n }\n setMaxPage(Math.floor(positions.length / ITEMS_PER_PAGE) + extraPages || 1)\n }\n }, [positions])\n\n const [ethPrice] = useEthPrice()\n\n const ListItem = ({ position, index }) => {\n const poolOwnership = position.liquidityTokenBalance / position.pair.totalSupply\n const valueUSD = poolOwnership * position.pair.reserveUSD\n\n return (\n 0 ? 1 : 0.6 }} focus={true}>\n {!below740 && {index}}\n \n \n \n \n \n \n \n \n \n \n\n \n \n Add\n \n {poolOwnership > 0 && (\n \n Remove\n \n )}\n \n \n \n \n \n {formattedNum(valueUSD, true, true)}\n \n \n \n {formattedNum(poolOwnership * parseFloat(position.pair.reserve0))}{' '}\n \n \n \n \n \n {formattedNum(poolOwnership * parseFloat(position.pair.reserve1))}{' '}\n \n \n \n \n \n \n {!below500 && (\n \n \n \n {formattedNum(position?.fees.sum, true, true)}\n \n \n \n \n {parseFloat(position.pair.token0.derivedETH)\n ? formattedNum(\n position?.fees.sum / (parseFloat(position.pair.token0.derivedETH) * ethPrice) / 2,\n false,\n true\n )\n : 0}{' '}\n \n \n \n \n \n {parseFloat(position.pair.token1.derivedETH)\n ? formattedNum(\n position?.fees.sum / (parseFloat(position.pair.token1.derivedETH) * ethPrice) / 2,\n false,\n true\n )\n : 0}{' '}\n \n \n \n \n \n \n )}\n \n )\n }\n\n const positionsSorted =\n positions &&\n positions\n\n .sort((p0, p1) => {\n if (sortedColumn === SORT_FIELD.PRINCIPAL) {\n return p0?.principal?.usd > p1?.principal?.usd ? (sortDirection ? -1 : 1) : sortDirection ? 1 : -1\n }\n if (sortedColumn === SORT_FIELD.HODL) {\n return p0?.hodl?.sum > p1?.hodl?.sum ? (sortDirection ? -1 : 1) : sortDirection ? 1 : -1\n }\n if (sortedColumn === SORT_FIELD.IXSWAP_RETURN) {\n return p0?.ixswap?.return > p1?.ixswap?.return ? (sortDirection ? -1 : 1) : sortDirection ? 1 : -1\n }\n if (sortedColumn === SORT_FIELD.VALUE) {\n const bal0 = (p0.liquidityTokenBalance / p0.pair.totalSupply) * p0.pair.reserveUSD\n const bal1 = (p1.liquidityTokenBalance / p1.pair.totalSupply) * p1.pair.reserveUSD\n return bal0 > bal1 ? (sortDirection ? -1 : 1) : sortDirection ? 1 : -1\n }\n return 1\n })\n .slice(ITEMS_PER_PAGE * (page - 1), page * ITEMS_PER_PAGE)\n .map((position, index) => {\n return (\n
\n \n \n
\n )\n })\n\n return (\n \n \n {!below740 && (\n \n #\n \n )}\n \n Name\n \n \n {\n setSortedColumn(SORT_FIELD.VALUE)\n setSortDirection(sortedColumn !== SORT_FIELD.VALUE ? true : !sortDirection)\n }}\n >\n {below740 ? 'Value' : 'Liquidity'} {sortedColumn === SORT_FIELD.VALUE ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n {!below500 && (\n \n {\n setSortedColumn(SORT_FIELD.IXSWAP_RETURN)\n setSortDirection(sortedColumn !== SORT_FIELD.IXSWAP_RETURN ? true : !sortDirection)\n }}\n >\n {below740 ? 'Fees' : 'Total Fees Earned'}{' '}\n {sortedColumn === SORT_FIELD.IXSWAP_RETURN ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n \n \n {!positionsSorted ? : positionsSorted}\n \n
setPage(page === 1 ? page : page - 1)}>\n \n
\n {'Page ' + page + ' of ' + maxPage}\n
setPage(page === maxPage ? page : page + 1)}>\n \n
\n
\n
\n )\n}\n\nexport default withRouter(PositionList)\n","import React, { useState, useEffect } from 'react'\nimport { useMedia } from 'react-use'\nimport dayjs from 'dayjs'\nimport LocalLoader from '../LocalLoader'\nimport utc from 'dayjs/plugin/utc'\nimport { Box, Flex, Text } from 'rebass'\nimport styled from 'styled-components'\nimport Link, { CustomLink } from '../Link'\nimport { Divider } from '..'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport { withRouter } from 'react-router-dom'\nimport { formattedNum, getIxswapAppLink } from '../../utils'\nimport { AutoColumn } from '../Column'\nimport { RowFixed } from '../Row'\nimport { ButtonLight } from '../ButtonStyled'\nimport { TYPE } from '../../Theme'\nimport FormattedName from '../FormattedName'\n\ndayjs.extend(utc)\n\nconst PageButtons = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 2em;\n margin-bottom: 0.5em;\n`\n\nconst Arrow = styled.div`\n color: ${({ theme }) => theme.primary1};\n opacity: ${(props) => (props.faded ? 0.3 : 1)};\n padding: 0 20px;\n user-select: none;\n :hover {\n cursor: pointer;\n }\n`\n\nconst List = styled(Box)`\n -webkit-overflow-scrolling: touch;\n`\n\nconst DashGrid = styled.div`\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 5px 0.5fr 1fr;\n grid-template-areas: 'number name ixswap';\n align-items: flex-start;\n padding: 20px 0;\n\n > * {\n justify-content: flex-end;\n width: 100%;\n\n :first-child {\n justify-content: flex-start;\n text-align: left;\n width: 20px;\n }\n }\n\n @media screen and (min-width: 1200px) {\n grid-template-columns: 35px 2.5fr 1fr;\n grid-template-areas: 'number name ixswap';\n }\n\n @media screen and (max-width: 740px) {\n grid-template-columns: 2.5fr 1fr;\n grid-template-areas: 'name ixswap';\n }\n\n @media screen and (max-width: 500px) {\n grid-template-columns: 2.5fr 1fr;\n grid-template-areas: 'name ixswap';\n }\n`\n\nconst ListWrapper = styled.div``\n\nconst ClickableText = styled(Text)`\n color: ${({ theme }) => theme.text1};\n &:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n\n text-align: end;\n user-select: none;\n`\n\nconst DataText = styled(Flex)`\n align-items: center;\n text-align: center;\n color: ${({ theme }) => theme.text1};\n & > * {\n font-size: 1em;\n }\n\n @media screen and (max-width: 600px) {\n font-size: 13px;\n }\n`\n\nconst SORT_FIELD = {\n VALUE: 'VALUE',\n IXSWAP_RETURN: 'IXSWAP_RETURN',\n}\n\nfunction MiningPositionList({ miningPositions }) {\n // const below500 = useMedia('(max-width: 500px)')\n const below740 = useMedia('(max-width: 740px)')\n\n // pagination\n const [page, setPage] = useState(1)\n const [maxPage, setMaxPage] = useState(1)\n const ITEMS_PER_PAGE = 10\n\n // sorting\n const [sortDirection, setSortDirection] = useState(true)\n const [sortedColumn, setSortedColumn] = useState(SORT_FIELD.VALUE)\n\n useEffect(() => {\n setMaxPage(1) // edit this to do modular\n setPage(1)\n }, [miningPositions])\n\n useEffect(() => {\n if (miningPositions) {\n let extraPages = 1\n if (miningPositions.length % ITEMS_PER_PAGE === 0) {\n extraPages = 0\n }\n setMaxPage(Math.floor(miningPositions.length / ITEMS_PER_PAGE) + extraPages || 1)\n }\n }, [miningPositions])\n\n const ListItem = ({ miningPosition, index }) => {\n if (!miningPosition.pairData) return null\n const pairPercentage = miningPosition.balance / miningPosition.pairData.totalSupply\n const valueUSD = miningPosition.pairData.reserveUSD\n const valueFirstPair = miningPosition.pairData.reserve0\n const valueSecondPair = miningPosition.pairData.reserve1\n const firstPairName = miningPosition.miningPool.pair.token0\n const secondPairName = miningPosition.miningPool.pair.token1\n const pairAddress = miningPosition.miningPool.pair.id\n const firstPairAddress = miningPosition.pairData.token0.id\n const secondPairAddress = miningPosition.pairData.token1.id\n\n return (\n 0 ? 1 : 0.6 }} focus={true}>\n {!below740 && {index}}\n \n \n \n \n \n \n \n \n \n \n \n \n Stake More\n \n {pairPercentage > 0 && (\n \n Withdraw\n \n )}\n \n \n \n \n \n {formattedNum(pairPercentage * valueUSD, true, true)}\n \n \n {formattedNum(pairPercentage * parseFloat(valueFirstPair))} \n \n \n \n {formattedNum(pairPercentage * parseFloat(valueSecondPair))} \n \n \n \n \n \n \n )\n }\n\n const miningPositionsSorted =\n miningPositions &&\n miningPositions\n\n .sort((p0, p1) => {\n if (sortedColumn === SORT_FIELD.VALUE) {\n const bal0 = (p0.balance / p0.pairData?.totalSupply) * p0.pairData?.reserveUSD\n const bal1 = (p0.balance / p0.pairData?.totalSupply) * p1.pairData?.reserveUSD\n return bal0 > bal1 ? (sortDirection ? -1 : 1) : sortDirection ? 1 : -1\n }\n return 1\n })\n .slice(ITEMS_PER_PAGE * (page - 1), page * ITEMS_PER_PAGE)\n .map((miningPosition, index) => {\n return (\n
\n \n \n
\n )\n })\n\n return (\n \n \n {!below740 && (\n \n #\n \n )}\n \n Name{' '}\n \n \n {\n setSortedColumn(SORT_FIELD.VALUE)\n setSortDirection(sortedColumn !== SORT_FIELD.VALUE ? true : !sortDirection)\n }}\n >\n {below740 ? 'Value' : 'Liquidity'} {sortedColumn === SORT_FIELD.VALUE ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n \n \n {!miningPositionsSorted ? : miningPositionsSorted}\n \n
setPage(page === 1 ? page : page - 1)}>\n \n
\n {'Page ' + page + ' of ' + maxPage}\n
setPage(page === maxPage ? page : page + 1)}>\n \n
\n
\n
\n )\n}\n\nexport default withRouter(MiningPositionList)\n","import React, { useState, useEffect, useMemo, useRef } from 'react'\nimport styled from 'styled-components'\n\nimport Row, { RowFixed } from '../Row'\nimport TokenLogo from '../TokenLogo'\nimport { Search as SearchIcon, X } from 'react-feather'\nimport { BasicLink } from '../Link'\n\nimport { useAllTokenData, useTokenData } from '../../contexts/TokenData'\nimport { useAllPairData, usePairData } from '../../contexts/PairData'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport { useMedia } from 'react-use'\nimport { useAllPairsInIXSwap, useAllTokensInIXSwap } from '../../contexts/GlobalData'\nimport { TOKEN_BLACKLIST, PAIR_BLACKLIST } from '../../constants'\n\nimport { transparentize } from 'polished'\nimport { client } from '../../apollo/client'\nimport { PAIR_SEARCH, TOKEN_SEARCH } from '../../apollo/queries'\nimport FormattedName from '../FormattedName'\nimport { TYPE } from '../../Theme'\nimport { updateNameData } from '../../utils/data'\n\nconst Container = styled.div`\n height: 48px;\n z-index: 30;\n position: relative;\n\n @media screen and (max-width: 600px) {\n width: 100%;\n }\n`\n\nconst Wrapper = styled.div`\n display: flex;\n position: relative;\n flex-direction: row;\n align-items: center;\n justify-content: flex-end;\n padding: 12px 16px;\n border-radius: 12px;\n background: ${({ theme, small, open }) => (small ? (open ? theme.bg6 : 'none') : transparentize(0.4, theme.bg6))};\n border-bottom-right-radius: ${({ open }) => (open ? '0px' : '12px')};\n border-bottom-left-radius: ${({ open }) => (open ? '0px' : '12px')};\n z-index: 9999;\n width: 100%;\n min-width: 300px;\n box-sizing: border-box;\n box-shadow: ${({ open, small }) =>\n !open && !small\n ? '0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04) '\n : 'none'};\n @media screen and (max-width: 500px) {\n background: ${({ theme }) => theme.bg6};\n box-shadow: ${({ open }) =>\n !open\n ? '0px 24px 32px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 0px 1px rgba(0, 0, 0, 0.04) '\n : 'none'};\n }\n`\nconst Input = styled.input`\n position: relative;\n display: flex;\n align-items: center;\n white-space: nowrap;\n background: none;\n border: none;\n outline: none;\n width: 100%;\n color: ${({ theme }) => theme.text1};\n font-size: ${({ large }) => (large ? '20px' : '14px')};\n\n ::placeholder {\n color: ${({ theme }) => theme.text3};\n font-size: 16px;\n }\n\n @media screen and (max-width: 640px) {\n ::placeholder {\n font-size: 1rem;\n }\n }\n`\n\nconst SearchIconLarge = styled(SearchIcon)`\n height: 20px;\n width: 20px;\n margin-right: 0.5rem;\n position: absolute;\n right: 10px;\n pointer-events: none;\n color: ${({ theme }) => theme.text3};\n`\n\nconst CloseIcon = styled(X)`\n height: 20px;\n width: 20px;\n margin-right: 0.5rem;\n position: absolute;\n right: 10px;\n color: ${({ theme }) => theme.text3};\n :hover {\n cursor: pointer;\n }\n`\n\nconst Menu = styled.div`\n display: flex;\n flex-direction: column;\n z-index: 9999;\n width: 100%;\n top: 50px;\n max-height: 540px;\n overflow: auto;\n left: 0;\n padding-bottom: 20px;\n background: ${({ theme }) => theme.bg6};\n border-bottom-right-radius: 12px;\n border-bottom-left-radius: 12px;\n box-shadow: 0px 0px 1px rgba(0, 0, 0, 0.04), 0px 4px 8px rgba(0, 0, 0, 0.04), 0px 16px 24px rgba(0, 0, 0, 0.04),\n 0px 24px 32px rgba(0, 0, 0, 0.04);\n display: ${({ hide }) => hide && 'none'};\n`\n\nconst MenuItem = styled(Row)`\n padding: 1rem;\n font-size: 0.85rem;\n & > * {\n margin-right: 6px;\n }\n :hover {\n cursor: pointer;\n background-color: ${({ theme }) => theme.bg2};\n }\n`\n\nconst Heading = styled(Row)`\n padding: 1rem;\n display: ${({ hide = false }) => hide && 'none'};\n`\n\nconst Gray = styled.span`\n color: #888d9b;\n`\n\nconst Blue = styled.span`\n color: #2172e5;\n :hover {\n cursor: pointer;\n }\n`\n\nexport const Search = ({ small = false }) => {\n let allTokens = useAllTokensInIXSwap()\n const allTokenData = useAllTokenData()\n\n let allPairs = useAllPairsInIXSwap()\n const allPairData = useAllPairData()\n\n const [showMenu, toggleMenu] = useState(false)\n const [value, setValue] = useState('')\n const [, toggleShadow] = useState(false)\n const [, toggleBottomShadow] = useState(false)\n\n // fetch new data on tokens and pairs if needed\n useTokenData(value)\n usePairData(value)\n\n const below700 = useMedia('(max-width: 700px)')\n const below470 = useMedia('(max-width: 470px)')\n const below410 = useMedia('(max-width: 410px)')\n\n useEffect(() => {\n if (value !== '') {\n toggleMenu(true)\n } else {\n toggleMenu(false)\n }\n }, [value])\n\n const [searchedTokens, setSearchedTokens] = useState([])\n const [searchedPairs, setSearchedPairs] = useState([])\n\n useEffect(() => {\n async function fetchData() {\n try {\n if (value?.length > 0) {\n let tokens = await client.query({\n query: TOKEN_SEARCH,\n variables: {\n value: value ? value.toUpperCase() : '',\n id: value,\n },\n })\n\n let pairs = await client.query({\n query: PAIR_SEARCH,\n variables: {\n tokens: tokens.data.asSymbol?.map((t) => t.id),\n id: value,\n },\n })\n\n setSearchedPairs(\n updateNameData(pairs.data.as0)\n .concat(updateNameData(pairs.data.as1))\n .concat(updateNameData(pairs.data.asAddress))\n )\n const foundTokens = tokens.data.asSymbol.concat(tokens.data.asAddress).concat(tokens.data.asName)\n setSearchedTokens(foundTokens)\n }\n } catch (e) {\n console.log(e)\n }\n }\n fetchData()\n }, [value])\n\n function escapeRegExp(string) {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n }\n\n // add the searched tokens to the list if not found yet\n allTokens = allTokens.concat(\n searchedTokens.filter((searchedToken) => {\n let included = false\n updateNameData()\n allTokens.map((token) => {\n if (token.id === searchedToken.id) {\n included = true\n }\n return true\n })\n return !included\n })\n )\n\n let uniqueTokens = []\n let found = {}\n allTokens &&\n allTokens.map((token) => {\n if (!found[token.id]) {\n found[token.id] = true\n uniqueTokens.push(token)\n }\n return true\n })\n\n allPairs = allPairs.concat(\n searchedPairs.filter((searchedPair) => {\n let included = false\n allPairs.map((pair) => {\n if (pair.id === searchedPair.id) {\n included = true\n }\n return true\n })\n return !included\n })\n )\n\n let uniquePairs = []\n let pairsFound = {}\n allPairs &&\n allPairs.map((pair) => {\n if (!pairsFound[pair.id]) {\n pairsFound[pair.id] = true\n uniquePairs.push(pair)\n }\n return true\n })\n\n const filteredTokenList = useMemo(() => {\n return uniqueTokens\n ? uniqueTokens\n .sort((a, b) => {\n const tokenA = allTokenData[a.id]\n const tokenB = allTokenData[b.id]\n if (tokenA?.oneDayVolumeUSD && tokenB?.oneDayVolumeUSD) {\n return tokenA.oneDayVolumeUSD > tokenB.oneDayVolumeUSD ? -1 : 1\n }\n if (tokenA?.oneDayVolumeUSD && !tokenB?.oneDayVolumeUSD) {\n return -1\n }\n if (!tokenA?.oneDayVolumeUSD && tokenB?.oneDayVolumeUSD) {\n return tokenA?.totalLiquidity > tokenB?.totalLiquidity ? -1 : 1\n }\n return 1\n })\n .filter((token) => {\n if (TOKEN_BLACKLIST.includes(token.id)) {\n return false\n }\n const regexMatches = Object.keys(token).map((tokenEntryKey) => {\n const isAddress = value.slice(0, 2) === '0x'\n if (tokenEntryKey === 'id' && isAddress) {\n return token[tokenEntryKey].match(new RegExp(escapeRegExp(value), 'i'))\n }\n if (tokenEntryKey === 'symbol' && !isAddress) {\n return token[tokenEntryKey].match(new RegExp(escapeRegExp(value), 'i'))\n }\n if (tokenEntryKey === 'name' && !isAddress) {\n return token[tokenEntryKey].match(new RegExp(escapeRegExp(value), 'i'))\n }\n return false\n })\n return regexMatches.some((m) => m)\n })\n : []\n }, [allTokenData, uniqueTokens, value])\n\n const filteredPairList = useMemo(() => {\n return uniquePairs\n ? uniquePairs\n .sort((a, b) => {\n const pairA = allPairData[a.id]\n const pairB = allPairData[b.id]\n if (pairA?.trackedReserveETH && pairB?.trackedReserveETH) {\n return parseFloat(pairA.trackedReserveETH) > parseFloat(pairB.trackedReserveETH) ? -1 : 1\n }\n if (pairA?.trackedReserveETH && !pairB?.trackedReserveETH) {\n return -1\n }\n if (!pairA?.trackedReserveETH && pairB?.trackedReserveETH) {\n return 1\n }\n return 0\n })\n .filter((pair) => {\n if (PAIR_BLACKLIST.includes(pair.id)) {\n return false\n }\n if (value && value.includes(' ')) {\n const pairA = value.split(' ')[0]?.toUpperCase()\n const pairB = value.split(' ')[1]?.toUpperCase()\n return (\n (pair.token0.symbol.includes(pairA) || pair.token0.symbol.includes(pairB)) &&\n (pair.token1.symbol.includes(pairA) || pair.token1.symbol.includes(pairB))\n )\n }\n if (value && value.includes('-')) {\n const pairA = value.split('-')[0]?.toUpperCase()\n const pairB = value.split('-')[1]?.toUpperCase()\n return (\n (pair.token0.symbol.includes(pairA) || pair.token0.symbol.includes(pairB)) &&\n (pair.token1.symbol.includes(pairA) || pair.token1.symbol.includes(pairB))\n )\n }\n const regexMatches = Object.keys(pair).map((field) => {\n const isAddress = value.slice(0, 2) === '0x'\n if (field === 'id' && isAddress) {\n return pair[field].match(new RegExp(escapeRegExp(value), 'i'))\n }\n if (field === 'token0') {\n return (\n pair[field].symbol.match(new RegExp(escapeRegExp(value), 'i')) ||\n pair[field].name.match(new RegExp(escapeRegExp(value), 'i'))\n )\n }\n if (field === 'token1') {\n return (\n pair[field].symbol.match(new RegExp(escapeRegExp(value), 'i')) ||\n pair[field].name.match(new RegExp(escapeRegExp(value), 'i'))\n )\n }\n return false\n })\n return regexMatches.some((m) => m)\n })\n : []\n }, [allPairData, uniquePairs, value])\n\n useEffect(() => {\n if (Object.keys(filteredTokenList).length > 2) {\n toggleShadow(true)\n } else {\n toggleShadow(false)\n }\n }, [filteredTokenList])\n\n useEffect(() => {\n if (Object.keys(filteredPairList).length > 2) {\n toggleBottomShadow(true)\n } else {\n toggleBottomShadow(false)\n }\n }, [filteredPairList])\n\n const [tokensShown, setTokensShown] = useState(3)\n const [pairsShown, setPairsShown] = useState(3)\n\n function onDismiss() {\n setPairsShown(3)\n setTokensShown(3)\n toggleMenu(false)\n setValue('')\n }\n\n // refs to detect clicks outside modal\n const wrapperRef = useRef()\n const menuRef = useRef()\n\n const handleClick = (e) => {\n if (\n !(menuRef.current && menuRef.current.contains(e.target)) &&\n !(wrapperRef.current && wrapperRef.current.contains(e.target))\n ) {\n setPairsShown(3)\n setTokensShown(3)\n toggleMenu(false)\n }\n }\n\n useEffect(() => {\n document.addEventListener('click', handleClick)\n return () => {\n document.removeEventListener('click', handleClick)\n }\n })\n\n return (\n \n \n {\n setValue(e.target.value)\n }}\n onFocus={() => {\n if (!showMenu) {\n toggleMenu(true)\n }\n }}\n />\n {!showMenu ? : toggleMenu(false)} />}\n \n \n \n Pairs\n \n
\n {filteredPairList && Object.keys(filteredPairList).length === 0 && (\n \n No results\n \n )}\n {filteredPairList &&\n filteredPairList.slice(0, pairsShown).map((pair) => {\n //format incorrect names\n updateNameData(pair)\n return (\n \n \n \n \n {pair.token0.symbol + '-' + pair.token1.symbol} Pair\n \n \n \n )\n })}\n 3 && Object.keys(filteredPairList).length >= pairsShown)}\n >\n {\n setPairsShown(pairsShown + 5)\n }}\n >\n See more...\n \n \n
\n \n Tokens\n \n
\n {Object.keys(filteredTokenList).length === 0 && (\n \n No results\n \n )}\n {filteredTokenList.slice(0, tokensShown).map((token) => {\n // update displayed names\n updateNameData({ token0: token })\n return (\n \n \n \n \n \n ()\n \n \n \n )\n })}\n\n 3 && Object.keys(filteredTokenList).length >= tokensShown)}\n >\n {\n setTokensShown(tokensShown + 5)\n }}\n >\n See more...\n \n \n
\n
\n
\n )\n}\n\nexport default Search\n","import React, { useState, useMemo, useEffect, useCallback } from 'react'\nimport styled from 'styled-components'\nimport { useUserTransactions, useUserPositions, useMiningPositions } from '../contexts/User'\nimport TxnList from '../components/TxnList'\nimport Panel from '../components/Panel'\nimport { formattedNum } from '../utils'\nimport Row, { AutoRow, RowFixed, RowBetween } from '../components/Row'\nimport { AutoColumn } from '../components/Column'\nimport UserChart from '../components/UserChart'\nimport PairReturnsChart from '../components/PairReturnsChart'\nimport PositionList from '../components/PositionList'\nimport MiningPositionList from '../components/MiningPositionList'\nimport { TYPE } from '../Theme'\nimport { ButtonDropdown, ButtonLight } from '../components/ButtonStyled'\nimport { PageWrapper, ContentWrapper, StyledIcon } from '../components'\nimport DoubleTokenLogo from '../components/DoubleLogo'\nimport { Bookmark, Activity } from 'react-feather'\nimport Link from '../components/Link'\nimport { FEE_WARNING_TOKENS, usedChain } from '../constants'\nimport { BasicLink } from '../components/Link'\nimport { useMedia } from 'react-use'\nimport Search from '../components/Search'\nimport { useSavedAccounts } from '../contexts/LocalStorage'\nimport { ExplorerDataType, getExplorerLink } from '../utils/etherscan'\n\nconst AccountWrapper = styled.div`\n background-color: rgba(255, 255, 255, 0.2);\n padding: 6px 16px;\n border-radius: 100px;\n display: flex;\n align-items: center;\n justify-content: center;\n`\n\nconst Header = styled.div``\n\nconst DashboardWrapper = styled.div`\n width: 100%;\n`\n\nconst DropdownWrapper = styled.div`\n position: relative;\n margin-bottom: 1rem;\n border: 1px solid #edeef2;\n border-radius: 12px;\n`\n\nconst Flyout = styled.div`\n position: absolute;\n top: 38px;\n left: -1px;\n width: 100%;\n background-color: ${({ theme }) => theme.bg1};\n z-index: 999;\n border-bottom-right-radius: 10px;\n border-bottom-left-radius: 10px;\n padding-top: 4px;\n border: 1px solid #edeef2;\n border-top: none;\n`\n\nconst MenuRow = styled(Row)`\n width: 100%;\n padding: 12px 0;\n padding-left: 12px;\n :hover {\n cursor: pointer;\n background-color: ${({ theme }) => theme.bg2};\n }\n`\n\nconst PanelWrapper = styled.div`\n grid-template-columns: 1fr;\n grid-template-rows: max-content;\n gap: 6px;\n display: inline-grid;\n width: 100%;\n align-items: start;\n`\n\nconst Warning = styled.div`\n background-color: ${({ theme }) => theme.bg2};\n color: ${({ theme }) => theme.text1};\n padding: 1rem;\n font-weight: 600;\n border-radius: 10px;\n margin-bottom: 1rem;\n width: calc(100% - 2rem);\n`\n\nfunction AccountPage({ account }) {\n // get data for this account\n const transactions = useUserTransactions(account)\n const positions = useUserPositions(account)\n const miningPositions = useMiningPositions(account)\n\n // get data for user stats\n const transactionCount = transactions?.swaps?.length + transactions?.burns?.length + transactions?.mints?.length\n\n // get derived totals\n let totalSwappedUSD = useMemo(() => {\n return transactions?.swaps\n ? transactions?.swaps.reduce((total, swap) => {\n return total + parseFloat(swap.amountUSD)\n }, 0)\n : 0\n }, [transactions])\n\n // if any position has token from fee warning list, show warning\n const [showWarning, setShowWarning] = useState(false)\n useEffect(() => {\n if (positions) {\n for (let i = 0; i < positions.length; i++) {\n if (\n FEE_WARNING_TOKENS.includes(positions[i].pair.token0.id) ||\n FEE_WARNING_TOKENS.includes(positions[i].pair.token1.id)\n ) {\n setShowWarning(true)\n }\n }\n }\n }, [positions])\n\n // settings for list view and dropdowns\n const hideLPContent = positions && positions.length === 0\n const [showDropdown, setShowDropdown] = useState(false)\n const [activePosition, setActivePosition] = useState()\n\n const dynamicPositions = activePosition ? [activePosition] : positions\n\n const aggregateFees = dynamicPositions?.reduce(function (total, position) {\n return total + position.fees.sum\n }, 0)\n\n const positionValue = useMemo(() => {\n return dynamicPositions\n ? dynamicPositions.reduce((total, position) => {\n return (\n total +\n (parseFloat(position?.liquidityTokenBalance) / parseFloat(position?.pair?.totalSupply)) *\n position?.pair?.reserveUSD\n )\n }, 0)\n : null\n }, [dynamicPositions])\n\n useEffect(() => {\n window.scrollTo({\n behavior: 'smooth',\n top: 0,\n })\n }, [])\n\n const below600 = useMedia('(max-width: 600px)')\n\n // adding/removing account from saved accounts\n const [savedAccounts, addAccount, removeAccount] = useSavedAccounts()\n const isBookmarked = savedAccounts.includes(account)\n const handleBookmarkClick = useCallback(() => {\n ;(isBookmarked ? removeAccount : addAccount)(account)\n }, [account, isBookmarked, addAccount, removeAccount])\n\n return (\n \n \n \n \n {'Accounts '}→{' '}\n \n {' '}\n {account?.slice(0, 42)}{' '}\n \n \n {!below600 && }\n \n
\n \n \n {account?.slice(0, 6) + '...' + account?.slice(38, 42)}\n \n View on PolygonScan\n \n \n \n \n \n \n \n \n
\n \n {showWarning && Fees cannot currently be calculated for pairs that include AMPL.}\n {!hideLPContent && (\n \n setShowDropdown(!showDropdown)} open={showDropdown}>\n {!activePosition && (\n \n \n \n \n All Positions\n \n )}\n {activePosition && (\n \n \n \n {activePosition.pair.token0.symbol}-{activePosition.pair.token1.symbol} Position\n \n \n )}\n \n {showDropdown && (\n \n \n {positions?.map((p, i) => {\n if (p.pair.token1.symbol === 'WETH') {\n p.pair.token1.symbol = 'ETH'\n }\n if (p.pair.token0.symbol === 'WETH') {\n p.pair.token0.symbol = 'ETH'\n }\n return (\n p.pair.id !== activePosition?.pair.id && (\n {\n setActivePosition(p)\n setShowDropdown(false)\n }}\n key={i}\n >\n \n \n {p.pair.token0.symbol}-{p.pair.token1.symbol} Position\n \n \n )\n )\n })}\n {activePosition && (\n {\n setActivePosition()\n setShowDropdown(false)\n }}\n >\n \n \n \n \n All Positions\n \n \n )}\n \n \n )}\n \n )}\n {!hideLPContent && (\n \n \n \n \n Liquidity (Including Fees)\n
\n \n \n \n {positionValue\n ? formattedNum(positionValue, true)\n : positionValue === 0\n ? formattedNum(0, true)\n : '-'}\n \n \n \n \n \n Fees Earned (Cumulative)\n
\n \n \n \n {aggregateFees ? formattedNum(aggregateFees, true, true) : '-'}\n \n \n \n \n \n )}\n {!hideLPContent && (\n \n \n {activePosition ? (\n \n ) : (\n \n )}\n \n \n )}\n \n Positions\n {' '}\n \n \n \n \n Liquidity Mining Pools\n \n \n {miningPositions && }\n {!miningPositions && (\n \n No Staked Liquidity.\n \n Learn More{' '}\n {' '}\n \n )}\n \n \n Transactions\n {' '}\n \n \n \n \n Wallet Stats\n {' '}\n \n \n \n {totalSwappedUSD ? formattedNum(totalSwappedUSD, true) : '-'}\n Total Value Swapped\n \n \n \n {totalSwappedUSD ? formattedNum(totalSwappedUSD * 0.003, true) : '-'}\n \n Total Fees Paid\n \n \n {transactionCount ? transactionCount : '-'}\n Total Transactions\n \n \n \n \n \n \n )\n}\n\nexport default AccountPage\n","import styled from 'styled-components'\n\nexport const Input = styled.input`\n background-color: none;\n font-size: 20px;\n border-radius: 8px;\n height: 40px;\n outline: none;\n border: 1px solid #e6e6ff;\n &::-webkit-outer-spin-button,\n &::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n ::placeholder {\n color: #b8b8cc;\n }\n color: ${({ theme, color }) => (color === 'red' ? theme.red1 : theme.text1)};\n padding: 10px 22px;\n margin-bottom: 54px;\n @media (max-width: 768px) {\n font-size: 16px;\n }\n`\n","export const formatAmount = (amount: number, minimumFractionDigits = 0, maximumFractionDigits = 10): string => {\n return amount.toLocaleString('en-US', { minimumFractionDigits, maximumFractionDigits })\n}\n","import React from 'react'\nimport { Flex } from 'rebass'\nimport styled from 'styled-components'\nimport { TYPE } from '../../Theme'\nimport { formattedNum, getPoolLink } from '../../utils'\nimport { formatAmount } from '../../utils/formatAmount'\nimport { PrimaryButton } from '../ButtonStyled'\nimport { AutoColumn } from '../Column'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport Link, { BasicLink } from '../Link'\nimport { RowBetween } from '../Row'\n\nexport const Card = styled.div`\n // max-height: 499px;\n max-width: 380px;\n // border-radius: 30px;\n border: 1px solid #e6e6ff;\n // background: radial-gradient(93.65% 93.65% at 58.57% 22.42%, rgba(206, 20, 132, 0.033) 0%, rgba(26, 18, 58, 0) 100%),\n rgba(44, 37, 74, 0.5);\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n // padding: 0px 24px 36px 24px;\n :hover {\n transform: translatey(-5px);\n }\n`\nexport const CardHeader = styled.div`\n width: 100%;\n height: 180px;\n background-color: none;\n padding: 0;\n margin: 0;\n`\n\nexport const Divider = styled.div`\n width: 100%;\n height: 1px;\n background-color: #e6e6ff;\n opacity: 0.9;\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n border-radius: 10px;\n`\n\nexport interface PoolCardProps {\n item: any\n allPairs: any\n}\n\nexport default function PoolCard({ allPairs, item }: PoolCardProps): JSX.Element {\n const pairData = allPairs[item?.id || '']\n return pairData ? (\n \n \n
\n \n \n \n \n {pairData.token0.symbol + '/' + pairData.token1.symbol}\n \n\n \n \n Volume\n Price change\n \n \n {`${formatAmount(+Number(pairData.volumeUSD).toFixed(1))}$`}\n \n {`${formatAmount(+pairData.liquidityChangeUSD.toFixed(2), 2, 2)}%`}\n \n \n \n\n \n\n \n \n {/* */}\n {/* 24H Volume */}\n {/* */}\n {/* {formattedNum(pairData.oneDayVolumeUSD.toFixed(0), true)} */}\n {/* */}\n {/* */}\n {/* */}\n \n TVL\n \n {formattedNum(pairData.reserveUSD || pairData.trackedReserveUSD, true)}\n \n \n \n \n\n \n Provide liquidity\n \n
\n
\n ) : null\n}\n","import { Box } from 'rebass'\nimport styled from 'styled-components'\n\nexport const Container = styled(Box)`\n height: fit-content;\n`\n","var _rect, _rect2, _path, _path2;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgSideBar = function SvgSideBar(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 48,\n height: 48,\n viewBox: \"0 0 48 48\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.5,\n y: 0.5,\n width: 47,\n height: 47,\n rx: 5.5,\n fill: \"white\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.5,\n y: 0.5,\n width: 47,\n height: 47,\n rx: 5.5,\n stroke: \"#E6E6FF\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 19H32\",\n stroke: \"#B8B8CC\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M16 29H32\",\n stroke: \"#B8B8CC\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgSideBar, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/sideBar.9e7b3d16.svg\";\nexport { ForwardRef as ReactComponent };","export const searchPairs = (pairs, searchKey) => {\n const keys = Object.keys(pairs)\n const newPairs = keys.reduce((accum, item) => {\n const currentPair = pairs[item]\n const token0 = pairs[item]?.token0\n const token1 = pairs[item]?.token1\n const name0 = token0.name?.toLowerCase()\n const symbol0 = token0.symbol?.toLowerCase()\n const symbol1 = token1.symbol?.toLowerCase()\n const name1 = token1.name?.toLowerCase()\n const matches =\n name0.includes(searchKey) ||\n name1.includes(searchKey) ||\n symbol0.includes(searchKey) ||\n symbol1.includes(searchKey) ||\n currentPair.id === searchKey ||\n token0.id === searchKey ||\n token1.id === searchKey\n if (matches) {\n return {\n ...accum,\n [item]: currentPair,\n }\n }\n return {\n ...accum,\n }\n }, {})\n return newPairs\n}\n","var _rect, _rect2, _path;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgClose = function SvgClose(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 48,\n height: 48,\n viewBox: \"0 0 48 48\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _rect || (_rect = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.5,\n y: 0.5,\n width: 47,\n height: 47,\n rx: 5.5,\n fill: \"white\"\n })), _rect2 || (_rect2 = /*#__PURE__*/React.createElement(\"rect\", {\n x: 0.5,\n y: 0.5,\n width: 47,\n height: 47,\n rx: 5.5,\n stroke: \"#E6E6FF\"\n })), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M18.3433 18.3431L24.0001 24M24.0001 24L29.657 29.6568M24.0001 24L18.3433 29.6568M24.0001 24L29.657 18.3431\",\n stroke: \"#B8B8CC\",\n strokeWidth: 1.5,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgClose, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/close.f9fb5fe6.svg\";\nexport { ForwardRef as ReactComponent };","import React, { useState } from 'react'\n// import styled from 'styled-components'\nimport LogoDark from '../../assets/newLogo.svg'\nimport { TYPE } from '../../Theme'\nimport { getIxswapAppLink } from '../../utils'\nimport { ButtonIXSGradient } from '../ButtonStyled'\nimport Link, { BasicLink } from '../Link'\nimport { isMobile } from 'react-device-detect'\nimport styled, { CSSObject } from 'styled-components'\nimport { ReactComponent as SideBar } from '../../assets/sideBar.svg'\nimport { ReactComponent as Close } from '../../assets/close.svg'\nimport { StyledIcon } from '..'\nimport { ArrowDown, Bookmark } from 'react-feather'\nimport { ReactComponent as DropDown } from '../../assets/dropDownNew.svg'\n\ninterface HeaderProps {\n hideButton?: boolean\n}\n\ninterface MobileHeaderWrapperProps {\n isOpen: boolean\n theme: CSSObject\n}\n\ninterface MobileHeaderWrapperProps {\n isOpen: boolean\n}\nconst MobileHeaderWrapper = styled.div`\n ${({ theme }) => theme.flexColumn}\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n background: ${({ theme }) => theme.onlyLight};\n margin: 0 10px; /* Add margin to the left and right */\n transform: translateX(${({ isOpen }) => (isOpen ? '0' : '-100%')});\n transition: transform 0.3s ease-in-out;\n z-index: 23;\n`\n\nconst HeaderWrapper = styled.div`\n ${({ theme }) => theme.flexRowNoWrap}\n width: 100%;\n height: 50px;\n justify-content: space-between;\n position: fixed;\n padding: 33px 15px;\n top: 0;\n z-index: 3;\n display: grid;\n grid-template-columns: auto 1fr 200px 10px;\n gap: 200px;\n align-items: center;\n background: ${({ theme }) => theme.onlyLight};\n display: none;\n\n @media (min-width: 768px) {\n display: grid;\n }\n`\n\n// ... (other imports)\n\nconst MenuIcon = styled.div`\n display: flex;\n flex-direction: column;\n cursor: pointer;\n margin-right: 20px;\n div {\n width: 25px;\n height: 3px;\n background: ${({ theme }) => theme.textColor};\n margin: 3px 0;\n transition: transform 0.3s ease-in-out;\n }\n\n ${({ isOpen }) =>\n isOpen &&\n `\n div:nth-child(1) {\n transform: rotate(-45deg) translate(-5px, 6px);\n }\n div:nth-child(2) {\n opacity: 0;\n }\n div:nth-child(3) {\n transform: rotate(45deg) translate(-5px, -6px);\n }\n `}\n\n // Remove margin from right side of SideBar\n margin-left: auto; // Add this line\n`\n\n// ... (rest of the code)\n\nconst MobileLinksContainer = styled.div`\n display: flex;\n flex-direction: column;\n align-items: baseline;\n margin-top: 60px;\n width: calc(100% - 20px); /* Adjust width to consider the left and right margin */\n`\n\nconst MobileMenuItem = styled.a`\n position: relative;\n padding: 12px 16px;\n text-decoration: none;\n color: black;\n display: block;\n font-size: 20px;\n font-weight: 700;\n margin: 10px 20px;\n width: -webkit-fill-available;\n\n &:hover {\n color: #6666ff;\n }\n\n &::after {\n content: '';\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n height: 1px;\n background-color: #e6e6ff;\n }\n`\n\nconst Title = styled.a`\n display: flex;\n align-items: center;\n pointer-events: auto;\n justify-self: flex-start;\n margin-right: 12px;\n width: fit-content;\n :hover {\n cursor: pointer;\n }\n`\n\nconst IXSwapButton = styled.a`\n text-align: center;\n display: flex;\n align-items: center;\n justify-content: center;\n align-self: center;\n color: #ffffff;\n background: #6666ff;\n border-radius: 6px;\n text-decoration: none;\n // padding: 10px;\n`\n\nconst IXSIcon = styled.div``\n\nconst LinksContainer = styled.div`\n display: flex;\n align-items: center;\n`\n\nconst DropdownMenu = styled.div`\n position: absolute;\n display: none;\n flex-direction: column;\n background-color: #f9f9f9;\n min-width: 160px;\n z-index: 1;\n`\n\n// const FarmingDropdown = styled.div`\n// position: relative;\n// display: inline-block;\n\n// &:hover ${DropdownMenu} {\n// display: flex;\n// }\n// `\n\nconst MenuItem = styled.a`\n padding: 12px 16px;\n text-decoration: none;\n color: black;\n display: block;\n font-size: 13px;\n &:hover {\n color: #6666ff;\n }\n`\n\nconst Spacer = styled.div`\n flex-grow: 1;\n`\n\nconst FarmingDropdownMenu = styled(DropdownMenu)`\n position: absolute;\n top: 100%;\n left: 0;\n display: none;\n flex-direction: column;\n background-color: #f9f9f9;\n min-width: 160px;\n z-index: 1;\n`\n\nconst FarmingDropdown = styled.div`\n position: relative;\n display: inline-block;\n\n &:hover ${FarmingDropdownMenu} {\n display: flex;\n }\n`\n\nexport default function Header({ hideButton = false }) {\n const [isOpen, setIsOpen] = useState(false)\n\n const toggleMenu = () => {\n setIsOpen(!isOpen)\n }\n\n const closeMenu = () => {\n setIsOpen(false)\n }\n return (\n <>\n {isMobile ? (\n <>\n
\n \n <img style={{ marginLeft: '20px' }} width={'120px'} src={LogoDark} alt=\"logo\" />\n \n \n \n \n
\n \n \n \n \n Charts\n \n Launchpad\n Security Tokens\n Liquidity Pools\n Swap/Trade\n {/* Farming\n Live Pools\n Token Sale Distributions */}\n\n \n Farming\n \n Live Pools\n Token Sale Distributions\n \n \n \n {' '}\n {/* \n

\n Go to IXSwap Prime\n

\n
*/}\n \n ) : (\n \n \n <img style={{ marginLeft: '40px' }} width={'180px'} src={LogoDark} alt=\"logo\" />\n \n \n Charts\n Launchpad\n Security Tokens\n Liquidity Pools\n Swap/Trade\n \n {/* */}\n {/* Farming {/1* *1/} */}\n {/* */}\n {/* {/1* *1/} */}\n {/* */}\n \n Live Pools\n Token Sale Distributions\n \n \n \n \n {/* {!hideButton && (\n \n

\n Go to IXSwap Prime\n

\n
\n )} */}\n
\n )}\n \n )\n}\n","import styled from 'styled-components'\nimport { ArrowLeft } from 'react-feather'\nimport { Link } from 'react-router-dom'\nimport React, { ReactNode } from 'react'\n\nexport const StyledInternalLink = styled(Link)`\n text-decoration: none;\n cursor: pointer;\n color: ${({ theme }) => theme.text2};\n font-weight: 600;\n\n :hover {\n text-decoration: underline;\n }\n\n :focus {\n outline: none;\n text-decoration: underline;\n }\n\n :active {\n text-decoration: none;\n }\n`\n\nconst BackArrowLink = styled(StyledInternalLink)`\n display: flex;\n align-items: center;\n color: ${({ theme }) => theme.text6};\n\n &:hover {\n text-decoration: none;\n }\n`\n\nexport function BackArrow({ to, children }: { to: string; children: ReactNode }) {\n return (\n \n \n {children}\n \n )\n}\n\nexport const SvgIconWrapper = styled.div<{ size?: number }>`\n ${({ theme }) => theme.flexColumnNoWrap};\n align-items: center;\n justify-content: center;\n & > img,\n span {\n height: ${({ size }) => (size ? size + 'px' : '32px')};\n width: ${({ size }) => (size ? size + 'px' : '32px')};\n }\n`\n","var _circle, _circle2, _circle3;\n\nvar _excluded = [\"svgRef\", \"title\"];\n\nfunction _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nimport React from \"react\";\n\nvar SvgShowMore = function SvgShowMore(_ref) {\n var svgRef = _ref.svgRef,\n title = _ref.title,\n props = _objectWithoutProperties(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 12,\n height: 2,\n viewBox: \"0 0 12 2\",\n fill: \"none\",\n ref: svgRef\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", null, title) : null, _circle || (_circle = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 1,\n cy: 1,\n r: 1,\n fill: \"#6666FF\"\n })), _circle2 || (_circle2 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 6,\n cy: 1,\n r: 1,\n fill: \"#6666FF\"\n })), _circle3 || (_circle3 = /*#__PURE__*/React.createElement(\"circle\", {\n cx: 11,\n cy: 1,\n r: 1,\n fill: \"#6666FF\"\n })));\n};\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(function (props, ref) {\n return /*#__PURE__*/React.createElement(SvgShowMore, _extends({\n svgRef: ref\n }, props));\n});\nexport default __webpack_public_path__ + \"static/media/show-more.273d9a85.svg\";\nexport { ForwardRef as ReactComponent };","import React from 'react'\nimport LoadingThin from '../../assets/images/loader_thin.svg'\nimport styled, { keyframes } from 'styled-components'\nimport { SvgIconWrapper } from '../../Theme/components'\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`\n\nconst StyledRotate = styled.div`\n animation: 2s ${rotate} linear infinite;\n`\n\n/**\n * Takes in custom size and stroke for circle color, default to primary color as fill,\n * need ...rest for layered styles on top\n */\nexport const LoaderThin = ({ size = 16 }: { size?: number; stroke?: string; thin?: boolean; [k: string]: any }) => {\n return (\n \n \n {'Loading...'}\n \n \n )\n}\n","import React from 'react'\nimport { Flex } from 'rebass'\nimport styled from 'styled-components'\nimport { TYPE } from '../../Theme'\nimport { formattedNum, getPoolLink } from '../../utils'\nimport { formatAmount } from '../../utils/formatAmount'\nimport { PrimaryButton } from '../ButtonStyled'\nimport { AutoColumn } from '../Column'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport Link, { BasicLink } from '../Link'\nimport { RowBetween } from '../Row'\n\nexport const Card = styled.div`\n max-height: 499px;\n max-width: 380px;\n // border-radius: 30px;\n border: 1px solid #e6e6ff;\n // background: radial-gradient(93.65% 93.65% at 58.57% 22.42%, rgba(206, 20, 132, 0.033) 0%, rgba(26, 18, 58, 0) 100%),\n rgba(44, 37, 74, 0.5);\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n padding: 20px 36px 36px 24px;\n :hover {\n transform: translatey(-5px);\n }\n`\n\nexport const Divider = styled.div`\n width: 100%;\n height: 1px;\n background-color: #e6e6ff;\n opacity: 0.9;\n backdrop-filter: blur(4px);\n -webkit-backdrop-filter: blur(4px);\n border-radius: 10px;\n`\n\nexport interface CryptoCardProps {\n item: any\n allPairs: any\n}\n\nexport default function CryptoCard({ allPairs, item }: CryptoCardProps): JSX.Element {\n const pairData = allPairs[item?.id || '']\n return pairData ? (\n \n {/* */}\n \n \n \n {pairData.token0.symbol + '/' + pairData.token1.symbol}\n \n \n \n \n {/* */}\n \n \n Volume\n Price change\n \n \n {`${formatAmount(+Number(pairData.volumeUSD).toFixed(1))}$`}\n 0 ? '#0EC080' : +pairData.liquidityChangeUSD < 0 ? '#FF6D6D' : '#292933',\n }}\n >\n {`${formatAmount(+pairData.liquidityChangeUSD.toFixed(2), 2, 2)}%`}\n \n \n \n \n \n \n {/* */}\n {/* 24H Volume */}\n {/* */}\n {/* {formattedNum(pairData.oneDayVolumeUSD.toFixed(0), true)} */}\n {/* */}\n {/* */}\n {/* */}\n \n TVL\n \n {formattedNum(pairData.reserveUSD || pairData.trackedReserveUSD, true)}\n \n \n \n \n \n Provide liquidity\n \n \n ) : null\n}\n","import 'feather-icons'\nimport React, { useEffect, useState } from 'react'\nimport styled from 'styled-components'\nimport { FullWrapper, PageWrapper } from '../components'\nimport { ButtonGradientBorder } from '../components/ButtonStyled'\nimport Column from '../components/Column'\nimport { Input } from '../components/Input'\nimport { BasicLink } from '../components/Link'\nimport PoolCard, { Divider } from '../components/PoolCard'\nimport Row, { RowBetween, RowFixed } from '../components/Row'\nimport { useGlobalData } from '../contexts/GlobalData'\nimport { shouldFilterOutPair, usePairs } from '../contexts/PairData'\nimport { TYPE } from '../Theme'\nimport { Container } from '../Theme/wrappers'\nimport { searchPairs } from '../utils/filter'\nimport Header from '../components/Header'\nimport LocalLoader from '../components/LocalLoader'\nimport { LoaderThin } from '../components/LoaderThin'\nimport { formatAmount } from '../utils/formatAmount'\nimport { ReactComponent as ShowMore } from '../assets/show-more.svg'\nimport CryptoCard from '../components/CryptoCard'\nimport { ButtonDark } from '../components/ButtonStyled'\nimport Link from '../components/Link'\nimport { isMobile } from 'react-device-detect'\nimport { TOKEN_BLACKLIST } from '../constants'\n\nexport const Grid = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 1fr);\n grid-gap: 32px;\n\n @media screen and (max-width: 1080px) {\n grid-template-columns: 1fr 1fr;\n }\n\n @media screen and (max-width: 540px) {\n grid-template-columns: 1fr;\n }\n`\nexport const PairTabs = {\n CRYPTO: 'Crypto',\n SECURITY: 'Security',\n ALL: 'All',\n}\n\nfunction AllPairsPage() {\n const [searchValue, setSearchValue] = useState('')\n\n useEffect(() => {\n window.scrollTo(0, 0)\n }, [])\n const { totalValueLocked, totalValueLockedSecurity, totalValueLockedCrypto } = useGlobalData()\n const { secPairs = {}, cryptoPairs = {} } = usePairs()\n\n const [filteredSecPairs, setFilteredSecPairs] = useState({})\n const [filteredCryptoPairs, setFilteredCryptoPairs] = useState({})\n\n const onSearchChange = (e) => {\n const search = e.currentTarget.value\n setSearchValue(search)\n const normalizedSearch = search.trim()?.toLowerCase()\n if (normalizedSearch.length === 0) {\n setFilteredSecPairs({})\n setFilteredCryptoPairs({})\n }\n if (normalizedSearch?.length < 2) {\n return\n }\n const newSec = searchPairs(secPairs, normalizedSearch)\n const newCrypto = searchPairs(cryptoPairs, normalizedSearch)\n if (newSec) {\n setFilteredSecPairs(newSec)\n }\n if (newCrypto) {\n setFilteredCryptoPairs(newCrypto)\n }\n }\n\n const visibleSec = Object.keys(filteredSecPairs).length || searchValue.length ? filteredSecPairs : secPairs\n const visibleCrypto =\n Object.keys(filteredCryptoPairs).length || searchValue.length ? filteredCryptoPairs : cryptoPairs\n const showSec = Object.keys(visibleSec).length\n const showCrypto = Object.keys(visibleCrypto).length\n\n return (\n <>\n
\n \n \n {/* \n \n {' '}\n Launch IXSwap App\n
\n */}\n \n {/* */}\n\n <>\n {isMobile ? (\n <>\n
\n \n Security pools\n \n \n Security Pools are decentralized financial mechanisms in the realm of cryptocurrencies designed to\n enhance the security and stability of digital asset transactions. These pools serve as a\n collective resource where participants contribute their funds to mitigate risks associated with\n various crypto-related activities.\n \n
\n\n Total Value locked:\n \n {Boolean(showSec) && (\n \n ${formatAmount(+totalValueLockedSecurity.toFixed(0))}\n \n )}\n {!showSec && (\n \n \n \n )}\n \n \n ) : (\n <>\n {' '}\n \n \n Security pools\n \n {/* \n \n Total Value locked:\n \n {Boolean(showSec) && (\n \n ${formatAmount(+totalValueLockedSecurity.toFixed(0))}\n \n )}\n\n {!showSec && (\n \n \n \n )}\n */}\n \n

In Maintainance mode

\n {/* \n Security Pools are decentralized financial mechanisms in the realm of cryptocurrencies designed to\n enhance the security and stability of digital asset transactions. These pools serve as a collective\n resource where participants contribute their funds to mitigate risks associated with various\n crypto-related activities.\n */}\n \n )}\n {/* Rest of the code */}\n\n \n {/* \n \n My ETH Rewards\n \n \n 0.015\n \n */}\n \n {/* {Boolean(showSec) && (\n \n {Object.keys(visibleSec)\n .slice(0, 6)\n .map((item, index) => (\n \n ))}\n \n )}\n\n {!showSec && (\n \n \n \n \n \n )}\n \n \n \n Show all\n \n \n */}\n\n \n \n\n <>\n {/* \n Crypto pools\n \n \n\n \n \n \n Total Value locked:\n \n {showCrypto && (\n \n ${formatAmount(+totalValueLockedCrypto.toFixed(0))}\n \n )}\n\n {!showCrypto && (\n \n \n \n )}\n */}\n {/* \n \n My ETH Rewards\n \n \n 0.015\n \n */}\n {/* */}\n\n {isMobile ? (\n <>\n \n \n Crypto pools\n \n \n \n Crypto Pools, also known as liquidity pools, are collective pools of digital assets held by\n participants in the cryptocurrency ecosystem. These pools enable individuals to contribute their\n cryptocurrencies or tokens to a shared liquidity pool, which in turn facilitates various\n decentralized financial activities.\n \n Total Value locked:\n \n {showCrypto && (\n \n ${formatAmount(+totalValueLockedCrypto.toFixed(0))}\n \n )}\n\n {!showSec && (\n \n \n \n )}\n \n \n ) : (\n <>\n {' '}\n \n \n Crypto pools\n \n \n Total Value locked:\n {showCrypto && (\n \n ${formatAmount(+totalValueLockedCrypto.toFixed(0))}\n \n )}\n\n {!showSec && (\n \n \n \n )}\n \n \n \n Crypto Pools, also known as liquidity pools, are collective pools of digital assets held by\n participants in the cryptocurrency ecosystem. These pools enable individuals to contribute their\n cryptocurrencies or tokens to a shared liquidity pool, which in turn facilitates various\n decentralized financial activities.\n \n \n )}\n\n {showCrypto && (\n \n {Object.keys(visibleCrypto)\n .filter((poolId) => !shouldFilterOutPair(visibleCrypto[poolId]))\n .slice(0, 6)\n .map((item, index) => {\n return (\n \n )\n })}\n \n )}\n\n {!showCrypto && (\n \n \n \n \n \n )}\n \n \n \n Show all\n \n \n \n \n
\n \n \n \n )\n}\n\nexport default AllPairsPage\n","import React, { FC } from 'react'\nimport styled, { css } from 'styled-components'\n\nimport arrowIcon from '../../assets/images/chevron.svg'\n\ninterface Props {\n page: number\n totalPages: number\n onPageChange: (data: number) => void\n}\n\nexport const Pagination: FC = ({ page, onPageChange, totalPages }: Props) => {\n const nextPage = () => page < totalPages && onPageChange(page + 1)\n const prevPage = () => page - 1 > 0 && onPageChange(page - 1)\n\n return (\n \n \n \n {page} of {totalPages}\n \n \n \n )\n}\n\nconst Button = styled.div<{ disabled?: boolean }>`\n cursor: pointer;\n width: 32px;\n height: 32px;\n background-color: none;\n display: flex;\n align-items: center;\n justify-content: center;\n ${({ disabled }) =>\n disabled &&\n css`\n opacity: 0.5;\n cursor: not-allowed;\n `}\n > img {\n width: 12px;\n height: 12px;\n }\n`\n\nconst Text = styled.div`\n color: #b8b8cc;\n font-size: 13px;\n min-width: 20px;\n text-align: right;\n`\n\nconst Next = styled.img``\n\nconst Prev = styled.img`\n transform: rotate(-180deg);\n`\n\nconst Container = styled.div`\n display: flex;\n align-items: center;\n justify-content: flex-end;\n > :first-child {\n margin-right: 15px;\n }\n > :last-child {\n margin-left: 15px;\n }\n`\n","import React, { FC, ReactElement } from 'react'\nimport styled, { css } from 'styled-components'\n\ninterface Props {\n style?: Record\n header: ReactElement\n body: ReactElement\n}\n\nexport const Table: FC = ({ header, body, style }: Props) => (\n \n {header}\n {body}\n \n)\n\nconst rowStyle = css`\n position: relative;\n display: grid;\n\n > div:first-child {\n padding-left: 22px;\n }\n\n > div {\n display: flex;\n align-items: center;\n padding: 20px 10px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n`\n\nexport const HeaderRow = styled.div`\n ${rowStyle};\n > div {\n padding: 10px 12px;\n font-weight: 300;\n font-size: 16px;\n color: ${({ theme: { text2 } }) => text2};\n }\n`\n\nexport const BodyRow = styled.div`\n ${rowStyle};\n border-bottom: 1px solid #e6e6ff;\n margin-bottom: 8px;\n // background-color: rgba(39, 31, 74, 0.3);\n`\n\nconst Wrap = styled.div`\n overflow-x: auto;\n > :last-child {\n margin-bottom: 0px;\n }\n`\n\nexport const CellPrimary = styled.div`\n font-weight: bold;\n cursor: pointer;\n background-color: var(--black0);\n`\n\nexport const CellSecondary = styled.div`\n color: var(--black70);\n background-color: var(--black0);\n`\n","import React, { FC, useState, useEffect, memo } from 'react'\nimport { Flex } from 'rebass'\nimport styled from 'styled-components'\nimport { TYPE } from '../../Theme'\nimport { formattedNum } from '../../utils'\nimport { formatAmount } from '../../utils/formatAmount'\nimport { ButtonIXSSecondaryGradient } from '../ButtonStyled'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport { BasicLink } from '../Link'\nimport { Pagination } from '../Pagination'\nimport { BodyRow, HeaderRow, Table } from '../Table'\n\nconst headerCells = ['Name', 'Volume', 'Price change', '24H Volume', 'TVL', '']\n\nexport interface IPoolToken {\n id: string\n name: string\n symbol: string\n}\n\ninterface IPoolPair {\n id: string\n token0: IPoolToken\n token1: IPoolToken\n oneDayVolumeUSD: number\n volumeUSD: number\n trackedReserveUSD: number\n liquidityChangeUSD: number\n reserveUSD: string\n}\n\ninterface BodyProps extends TableProps {\n page: number\n pageLimit: number\n}\n\ninterface TableProps {\n items: IPoolPair[]\n}\n\nconst Header = () => {\n return (\n \n {headerCells.map((cell) => (\n
{cell}
\n ))}\n
\n )\n}\n\nconst Body: FC = ({ items, page, pageLimit }: BodyProps) => {\n return (\n <>\n {items\n .slice((page - 1) * pageLimit, page * pageLimit)\n .map(\n ({ id, token0, token1, volumeUSD, liquidityChangeUSD, oneDayVolumeUSD, trackedReserveUSD, reserveUSD }) => (\n \n \n \n \n {token0.symbol + '/' + token1.symbol}\n \n \n
\n \n {`$${formatAmount(Number(volumeUSD), 1, 1)}`}\n \n
\n
\n 0 ? 'green' : liquidityChangeUSD < 0 ? 'red' : 'green' }}\n fontSize={13}\n lineHeight=\"30px\"\n >\n {`${formatAmount(liquidityChangeUSD, 2, 2)}%`}\n \n
\n
\n \n {`$${formatAmount(oneDayVolumeUSD, 0, 0)}`}\n \n
\n
\n \n {`${formattedNum(reserveUSD || trackedReserveUSD, true)}`}\n \n
\n
\n {/* */}\n \n Details\n \n {/* */}\n
\n
\n )\n )}\n \n )\n}\n\nexport const PairsTable: FC = ({ items }: TableProps) => {\n const [page, setPage] = useState(1)\n const pageLimit = 10\n const totalPages = Math.ceil(items.length / pageLimit)\n\n const onPageChange = (newPage: number) => {\n setPage(newPage)\n }\n\n useEffect(() => {\n setPage(1)\n }, [items])\n\n return (\n <>\n {items.length === 0 ? (\n No data\n ) : (\n \n } header={
} />\n \n \n )}\n \n )\n}\n\nexport const NoData = styled.div`\n font-weight: 600;\n color: ${({ theme: { text2 } }) => text2};\n text-align: center;\n`\n\nexport const Container = styled.div`\n display: grid;\n grid-template-columns: 100%;\n grid-gap: 50px;\n`\n\nexport const StyledHeaderRow = styled(HeaderRow)`\n grid-template-columns: 1.5fr repeat(5, 0.8fr);\n min-width: 1300px;\n`\n\nconst StyledBodyRow = styled(BodyRow)`\n grid-template-columns: 1.5fr repeat(5, 0.8fr);\n min-width: 1300px;\n cursor: pointer;\n // :hover {\n // border: 1px solid ${({ theme: { bg7 } }) => bg7};\n // }\n > div {\n display: flex;\n justify-content: start;\n }\n`\n","import React, { FC, useState, useEffect } from 'react'\nimport styled from 'styled-components'\n\nimport { BodyRow, Table } from '../Table'\nimport { TYPE } from '../../Theme'\nimport { Pagination } from '../Pagination'\nimport { HeaderRow } from '../Table'\nimport { RowFixed } from '../Row'\nimport Column from '../Column'\nimport { IPoolToken, NoData, Container } from '../PairsTable'\nimport { getTransactionType } from '../TxnList'\nimport { formattedNum, formatTime } from '../../utils'\nimport { Divider } from '../PoolCard'\n\nexport const SortText = styled.button`\n ${({ active }: { active: boolean }) => `\n cursor: pointer;\n font-weight: ${active ? 600 : 300};\n margin-right: 0.75rem !important;\n border: none;\n background-color: transparent;\n font-size: 16px;\n line-height: 24px;\n padding: 0px;\n color: ${active ? '#292933' : '#8F8FB2'};\n margin-top: ${active ? '4px' : '0px'};\n outline: none;\n\n @media screen and (max-width: 600px) {\n font-size: 14px;\n }\n `}\n`\n\nexport const ActiveSortItemBottom = styled.div`\n height: 2px;\n background: #6666ff;\n width: 100%;\n`\n\nconst headerCells = ['Total value', 'Token amount', 'Token amount', 'Account', 'Time']\n\nconst TXN_TYPE = {\n ALL: 'All',\n SWAP: 'Swap',\n ADD: 'Mint',\n REMOVE: 'Burn',\n}\n\nconst sortItems = [\n {\n title: 'All',\n value: TXN_TYPE.ALL,\n },\n {\n title: 'Swaps',\n value: TXN_TYPE.SWAP,\n },\n {\n title: 'Adds',\n value: TXN_TYPE.ADD,\n },\n {\n title: 'Removes',\n value: TXN_TYPE.REMOVE,\n },\n]\ninterface IPairTransaction {\n __typename: string\n amount0?: string\n amount1?: string\n amount0In?: string\n amount0Out?: string\n amount1In?: string\n amount1Out?: string\n amountUSD: string\n pair: {\n token0: IPoolToken\n token1: IPoolToken\n }\n sender?: string\n to?: string\n transaction: {\n id: string\n timestamp: string\n }\n}\n\ninterface BodyProps extends TableProps {\n page: number\n pageLimit: number\n}\n\ninterface HeaderProps {\n txFilter: string\n handleFilterChange: (newTxFilter: string) => void\n}\n\ninterface TableProps {\n items: IPairTransaction[]\n}\n\nconst Header: FC = ({ txFilter, handleFilterChange }: HeaderProps) => {\n return (\n \n \n {sortItems.map(({ title, value }) => (\n \n {\n handleFilterChange(value)\n }}\n active={txFilter === value}\n >\n {title}\n \n {txFilter === value && }\n \n ))}\n \n {headerCells.map((cell, id) => (\n
\n {cell}\n
\n ))}\n
\n )\n}\n\nconst Body: FC = ({ items, page, pageLimit }: BodyProps) => {\n return (\n <>\n {items\n .slice((page - 1) * pageLimit, page * pageLimit)\n .map(\n ({\n __typename,\n amount0,\n amount1,\n amount0In,\n amount0Out,\n amount1In,\n amount1Out,\n amountUSD,\n pair,\n transaction,\n to,\n sender,\n }) => {\n const netToken0 = Number(amount0Out) - Number(amount0In)\n const netToken1 = Number(amount1Out) - Number(amount1In)\n\n let token0Symbol = pair.token0.symbol\n let token1Symbol = pair.token1.symbol\n let token0Amount = amount0\n let token1Amount = amount1\n\n if (__typename == TXN_TYPE.SWAP) {\n if (netToken0 < 0) {\n token0Symbol = pair.token0.symbol\n token1Symbol = pair.token1.symbol\n token0Amount = Math.abs(netToken0).toString()\n token1Amount = Math.abs(netToken1).toString()\n } else if (netToken1 < 0) {\n token0Symbol = pair.token1.symbol\n token1Symbol = pair.token0.symbol\n token0Amount = Math.abs(netToken1).toString()\n token1Amount = Math.abs(netToken0).toString()\n }\n }\n\n return (\n \n
\n \n {getTransactionType(__typename, token0Symbol, token1Symbol)}\n \n
\n
\n \n {`${formattedNum(amountUSD, true)}`}\n \n
\n
\n \n {' '}\n {`${formattedNum(token0Amount)} ${token0Symbol}`}\n \n
\n
\n \n {`${formattedNum(token1Amount)} ${token1Symbol}`}\n \n
\n
\n {/* */}\n \n {sender && sender.slice(0, 6) + '...' + sender.slice(38, 42)}\n {to && to.slice(0, 6) + '...' + to.slice(38, 42)}\n \n {/* */}\n
\n
\n \n {`${formatTime(+transaction.timestamp)}`}\n \n
\n
\n )\n }\n )}\n \n )\n}\n\nexport const PairTransactionsTable: FC = ({ items }: TableProps) => {\n const [page, setPage] = useState(1)\n const [filteredItems, setFilteredItems] = useState(items)\n const pageLimit = 10\n const [totalPages, setTotalPages] = useState(Math.ceil(items.length / pageLimit))\n const [txFilter, setTxFilter] = useState(TXN_TYPE.ALL)\n\n const handleFilterChange = (newTxFilter: string) => {\n if (txFilter === newTxFilter) return\n const newFilteredItems =\n newTxFilter === TXN_TYPE.ALL ? items : items.filter(({ __typename }) => __typename === newTxFilter)\n\n setPage(1)\n setFilteredItems(newFilteredItems)\n setTotalPages(Math.ceil(newFilteredItems.length / pageLimit))\n setTxFilter(newTxFilter)\n }\n\n const onPageChange = (newPage: number) => {\n setPage(newPage)\n }\n\n return (\n <>\n {items.length === 0 ? (\n No data\n ) : (\n \n }\n header={
}\n />\n \n \n )}\n \n )\n}\n\nexport const StyledHeaderRow = styled(HeaderRow)`\n grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;\n min-width: 1170px;\n`\n\nconst StyledBodyRow = styled(BodyRow)`\n grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr;\n min-width: 1170px;\n background: transparent;\n margin-bottom: 0px;\n border: none;\n border-bottom: 1px solid #e6e6ff;\n > div {\n display: flex;\n justify-content: start;\n }\n`\n\nconst Wallet = styled.div`\n background: ${({ theme: { background1 } }) => background1};\n -webkit-background-clip: text;\n background-clip: text;\n -webkit-text-fill-color: transparent;\n`\n","import 'feather-icons'\nimport React, { useEffect, useMemo, useState } from 'react'\nimport { Flex, Text } from 'rebass'\nimport styled from 'styled-components'\nimport { StringParam, useQueryParams } from 'use-query-params'\nimport { FullWrapper, PageWrapper } from '../components'\nimport Column from '../components/Column'\nimport Header from '../components/Header'\n\nimport { Input } from '../components/Input'\nimport { PairsTable } from '../components/PairsTable'\nimport { ActiveSortItemBottom, SortText } from '../components/PairTransactionsTable'\nimport Row, { RowFixed } from '../components/Row'\nimport { useGlobalData } from '../contexts/GlobalData'\nimport { shouldFilterOutPair, usePairs } from '../contexts/PairData'\nimport { TYPE } from '../Theme'\nimport { Container } from '../Theme/wrappers'\nimport { searchPairs } from '../utils/filter'\nimport { PairTabs } from './AllPairsPage'\nimport LocalLoader from '../components/LocalLoader'\nimport { LoaderThin } from '../components/LoaderThin'\nimport { BasicLink } from '../components/Link'\nimport { formatAmount } from '../utils/formatAmount'\nimport { ButtonDark } from '../components/ButtonStyled'\nimport { isMobile } from 'react-device-detect'\nimport { useHistory } from 'react-router-dom'\nexport const Grid = styled.div`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n gap: 32px;\n\n @media screen and (max-width: 540px) {\n grid-template-columns: 1fr;\n }\n`\nexport const pairTabFilters = [PairTabs.SECURITY, PairTabs.CRYPTO]\n\nfunction AllPoolsPage({ type = PairTabs.CRYPTO }) {\n const [searchValue, setSearchValue] = useState('')\n const history = useHistory()\n\n useEffect(() => {\n window.scrollTo(0, 0)\n }, [])\n\n const onSearchChange = (e) => {\n const search = e.currentTarget.value\n setSearchValue(search)\n const normalizedSearch = search.trim()?.toLowerCase()\n if (normalizedSearch.length === 0) {\n setFilteredPairs({})\n }\n if (normalizedSearch?.length < 2) {\n return\n }\n const newPairs = searchPairs(usedPairs, normalizedSearch)\n if (newPairs) {\n setFilteredPairs(newPairs)\n }\n }\n\n const { secPairs = {}, cryptoPairs = {} } = usePairs()\n const usedPairs = useMemo(() => {\n if (type === PairTabs.SECURITY) {\n return secPairs\n }\n return cryptoPairs\n }, [cryptoPairs, secPairs, type])\n\n const [filteredPairs, setFilteredPairs] = useState({})\n\n const visiblePools = Object.keys(filteredPairs).length || searchValue.length ? filteredPairs : usedPairs\n const { totalValueLockedSecurity, totalValueLockedCrypto } = useGlobalData()\n const tvl = useMemo(() => {\n switch (type) {\n case PairTabs.SECURITY:\n return totalValueLockedSecurity\n default:\n return totalValueLockedCrypto\n }\n }, [type, totalValueLockedCrypto, totalValueLockedSecurity])\n return (\n <>\n
\n \n \n \n {/* */}\n\n history.goBack()} style={{ gap: '5px', cursor: 'pointer', marginTop: '70px' }}>\n ← Back\n \n {/* \n Back\n */}\n {/* */}\n\n \n \n \n \n \n {PairTabs.SECURITY} Pools\n \n \n {type === PairTabs.SECURITY && }\n \n \n \n \n \n \n {PairTabs.CRYPTO} Pools\n \n \n {type === PairTabs.CRYPTO && }\n \n \n \n\n {isMobile ? (\n \n \n \n {type === 'Security' ? 'In Maintainance mode' : `${type} pools`}\n \n {type === 'Crypto' ? (\n \n Crypto Pools, also known as liquidity pools, are collective pools of digital assets held by\n participants in the cryptocurrency ecosystem. These pools enable individuals to contribute their\n cryptocurrencies or tokens to a shared liquidity pool, which in turn facilitates various\n decentralized financial activities.\n \n ) : (\n \n {/* Security Pools are decentralized financial mechanisms in the realm of cryptocurrencies designed to\n enhance the security and stability of digital asset transactions. These pools serve as a\n collective resource where participants contribute their funds to mitigate risks associated with\n various crypto-related activities. */}\n \n )}\n \n\n {type === 'Crypto' ? (\n \n \n Total Value locked:\n \n {visiblePools && Object.keys(visiblePools)?.length !== 0 && (\n \n ${formatAmount(tvl, 0, 0)}\n \n )}\n {!visiblePools ||\n (Object.keys(visiblePools)?.length === 0 && (\n \n \n \n ))}\n \n ) : null}\n {/* \n \n My ETH Rewards\n \n \n 0.015\n \n */}\n \n ) : (\n \n \n \n {type === 'Security' ? 'In Maintainance mode' : `${type} pools`}\n \n {type === 'Crypto' ? (\n \n Crypto Pools, also known as liquidity pools, are collective pools of digital assets held by\n participants in the cryptocurrency ecosystem. These pools enable individuals to contribute their\n cryptocurrencies or tokens to a shared liquidity pool, which in turn facilitates various\n decentralized financial activities.\n \n ) : (\n \n {/* Security Pools are decentralized financial mechanisms in the realm of cryptocurrencies designed to\n enhance the security and stability of digital asset transactions. These pools serve as a\n collective resource where participants contribute their funds to mitigate risks associated with\n various crypto-related activities. */}\n \n )}\n \n\n {type === 'Crypto' ? (\n \n \n Total Value locked:\n \n {visiblePools && Object.keys(visiblePools)?.length !== 0 && (\n \n ${formatAmount(tvl, 0, 0)}\n \n )}\n {!visiblePools ||\n (Object.keys(visiblePools)?.length === 0 && (\n \n \n \n ))}\n \n ) : null}\n\n {/* \n \n My ETH Rewards\n \n \n 0.015\n \n */}\n \n )}\n\n {type === 'Crypto' ? (\n <>\n \n\n {visiblePools &&\n Object.keys(visiblePools)?.length !== 0 &&\n (type === PairTabs.CRYPTO ? (\n visiblePools[poolId] && !shouldFilterOutPair(visiblePools[poolId]))\n .map((poolId) => visiblePools[poolId])}\n />\n ) : (\n \n ))}\n\n {!visiblePools ||\n (Object.keys(visiblePools)?.length === 0 && (\n \n \n \n ))}\n \n ) : null}\n \n \n \n \n )\n}\n\nexport default AllPoolsPage\n","import React, { useState, useEffect, useMemo } from 'react'\nimport styled from 'styled-components'\nimport dayjs from 'dayjs'\nimport utc from 'dayjs/plugin/utc'\n\nimport { Box, Flex, Text } from 'rebass'\nimport TokenLogo from '../TokenLogo'\nimport { CustomLink } from '../Link'\nimport Row from '../Row'\nimport { Divider } from '..'\n\nimport { formattedNum, formattedPercent } from '../../utils'\nimport { useMedia } from 'react-use'\nimport { withRouter } from 'react-router-dom'\nimport { TOKEN_BLACKLIST } from '../../constants'\nimport FormattedName from '../FormattedName'\nimport { TYPE } from '../../Theme'\n\ndayjs.extend(utc)\n\nconst PageButtons = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 2em;\n margin-bottom: 2em;\n`\n\nconst Arrow = styled.div`\n color: ${({ theme }) => theme.primary1};\n opacity: ${(props) => (props.faded ? 0.3 : 1)};\n padding: 0 20px;\n user-select: none;\n :hover {\n cursor: pointer;\n }\n`\n\nconst List = styled(Box)`\n -webkit-overflow-scrolling: touch;\n`\n\nconst DashGrid = styled.div`\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 100px 1fr 1fr;\n grid-template-areas: 'name liq vol';\n padding: 0 1.125rem;\n\n > * {\n justify-content: flex-end;\n\n &:first-child {\n justify-content: flex-start;\n text-align: left;\n width: 100px;\n }\n }\n\n @media screen and (min-width: 680px) {\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 180px 1fr 1fr 1fr;\n grid-template-areas: 'name symbol liq vol ';\n\n > * {\n justify-content: flex-end;\n width: 100%;\n\n &:first-child {\n justify-content: flex-start;\n }\n }\n }\n\n @media screen and (min-width: 1080px) {\n display: grid;\n grid-gap: 0.5em;\n grid-template-columns: 1.5fr 0.6fr 1fr 1fr 1fr 1fr;\n grid-template-areas: 'name symbol liq vol price change';\n }\n`\n\nconst ListWrapper = styled.div``\n\nconst ClickableText = styled(Text)`\n text-align: end;\n &:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n user-select: none;\n color: ${({ theme }) => theme.text1} !important;\n @media screen and (max-width: 640px) {\n font-size: 0.85rem;\n }\n`\n\nconst DataText = styled(Flex)`\n align-items: center;\n text-align: center;\n color: ${({ theme }) => theme.text1} !important;\n\n & > * {\n font-size: 14px;\n }\n\n @media screen and (max-width: 600px) {\n font-size: 12px;\n }\n`\n\nconst SORT_FIELD = {\n LIQ: 'totalLiquidityUSD',\n VOL: 'oneDayVolumeUSD',\n VOL_UT: 'oneDayVolumeUT',\n SYMBOL: 'symbol',\n NAME: 'name',\n PRICE: 'priceUSD',\n CHANGE: 'priceChangeUSD',\n}\n\n// @TODO rework into virtualized list\nfunction TopTokenList({ tokens, itemMax = 10, useTracked = false }) {\n // page state\n const [page, setPage] = useState(1)\n const [maxPage, setMaxPage] = useState(1)\n\n // sorting\n const [sortDirection, setSortDirection] = useState(true)\n const [sortedColumn, setSortedColumn] = useState(SORT_FIELD.VOL)\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below680 = useMedia('(max-width: 680px)')\n const below600 = useMedia('(max-width: 600px)')\n\n useEffect(() => {\n setMaxPage(1) // edit this to do modular\n setPage(1)\n }, [tokens])\n\n const formattedTokens = useMemo(() => {\n return (\n tokens &&\n Object.keys(tokens)\n .filter((key) => {\n return !TOKEN_BLACKLIST.includes(key)\n })\n .map((key) => tokens[key])\n )\n }, [tokens])\n\n useEffect(() => {\n if (tokens && formattedTokens) {\n let extraPages = 1\n if (formattedTokens.length % itemMax === 0) {\n extraPages = 0\n }\n setMaxPage(Math.floor(formattedTokens.length / itemMax) + extraPages)\n }\n }, [tokens, formattedTokens, itemMax])\n\n const filteredList = useMemo(() => {\n return (\n formattedTokens &&\n formattedTokens\n .sort((a, b) => {\n if (sortedColumn === SORT_FIELD.SYMBOL || sortedColumn === SORT_FIELD.NAME) {\n return a[sortedColumn] > b[sortedColumn] ? (sortDirection ? -1 : 1) * 1 : (sortDirection ? -1 : 1) * -1\n }\n return parseFloat(a[sortedColumn]) > parseFloat(b[sortedColumn])\n ? (sortDirection ? -1 : 1) * 1\n : (sortDirection ? -1 : 1) * -1\n })\n .slice(itemMax * (page - 1), page * itemMax)\n )\n }, [formattedTokens, itemMax, page, sortDirection, sortedColumn])\n\n const ListItem = ({ item, index }) => {\n return (\n \n \n \n {!below680 &&
{index}
}\n \n \n \n \n
\n
\n {!below680 && (\n \n \n \n )}\n {formattedNum(item.totalLiquidityUSD, true)}\n {formattedNum(item.oneDayVolumeUSD, true)}\n {!below1080 && (\n \n {formattedNum(item.priceUSD, true)}\n \n )}\n {!below1080 && {formattedPercent(item.priceChangeUSD)}}\n
\n )\n }\n\n return (\n \n \n \n {\n setSortedColumn(SORT_FIELD.NAME)\n setSortDirection(sortedColumn !== SORT_FIELD.NAME ? true : !sortDirection)\n }}\n >\n {below680 ? 'Symbol' : 'Name'} {sortedColumn === SORT_FIELD.NAME ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n {!below680 && (\n \n {\n setSortedColumn(SORT_FIELD.SYMBOL)\n setSortDirection(sortedColumn !== SORT_FIELD.SYMBOL ? true : !sortDirection)\n }}\n >\n Symbol {sortedColumn === SORT_FIELD.SYMBOL ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n\n \n {\n setSortedColumn(SORT_FIELD.LIQ)\n setSortDirection(sortedColumn !== SORT_FIELD.LIQ ? true : !sortDirection)\n }}\n >\n Liquidity {sortedColumn === SORT_FIELD.LIQ ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n \n {\n setSortedColumn(useTracked ? SORT_FIELD.VOL_UT : SORT_FIELD.VOL)\n setSortDirection(\n sortedColumn !== (useTracked ? SORT_FIELD.VOL_UT : SORT_FIELD.VOL) ? true : !sortDirection\n )\n }}\n >\n Volume (24hrs)\n {sortedColumn === (useTracked ? SORT_FIELD.VOL_UT : SORT_FIELD.VOL) ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n {!below1080 && (\n \n {\n setSortedColumn(SORT_FIELD.PRICE)\n setSortDirection(sortedColumn !== SORT_FIELD.PRICE ? true : !sortDirection)\n }}\n >\n Price {sortedColumn === SORT_FIELD.PRICE ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n {!below1080 && (\n \n {\n setSortedColumn(SORT_FIELD.CHANGE)\n setSortDirection(sortedColumn !== SORT_FIELD.CHANGE ? true : !sortDirection)\n }}\n >\n Price Change (24hrs)\n {sortedColumn === SORT_FIELD.CHANGE ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n \n \n \n {filteredList &&\n filteredList.map((item, index) => {\n return (\n
\n \n \n
\n )\n })}\n
\n \n
setPage(page === 1 ? page : page - 1)}>\n \n
\n {'Page ' + page + ' of ' + maxPage}\n
setPage(page === maxPage ? page : page + 1)}>\n \n
\n
\n
\n )\n}\n\nexport default withRouter(TopTokenList)\n","import React, { useEffect } from 'react'\nimport 'feather-icons'\n\nimport TopTokenList from '../components/TokenList'\nimport { TYPE } from '../Theme'\nimport Panel from '../components/Panel'\nimport { useAllTokenData } from '../contexts/TokenData'\nimport { PageWrapper, FullWrapper } from '../components'\nimport { RowBetween } from '../components/Row'\nimport Search from '../components/Search'\nimport { useMedia } from 'react-use'\nimport Header from '../components/Header'\n// import CheckBox from '../components/Checkbox'\n// import QuestionHelper from '../components/QuestionHelper'\n\nfunction AllTokensPage() {\n const allTokens = useAllTokenData()\n\n useEffect(() => {\n window.scrollTo(0, 0)\n }, [])\n\n const below600 = useMedia('(max-width: 800px)')\n\n // const [useTracked, setUseTracked] = useState(true)\n\n return (\n <>\n
\n \n \n \n Top Tokens\n {!below600 && }\n \n {/* \n setUseTracked(!useTracked)} text={'Hide untracked tokens'} />\n \n */}\n \n \n \n \n \n \n )\n}\n\nexport default AllTokensPage\n","import React from 'react'\nimport styled from 'styled-components'\nimport { useCopyClipboard } from '../../hooks'\nimport { CheckCircle, Copy } from 'react-feather'\nimport { StyledIcon } from '..'\n\nconst CopyIcon = styled.div`\n color: #aeaeae;\n flex-shrink: 0;\n margin-right: 1rem;\n margin-left: 0.5rem;\n text-decoration: none;\n :hover,\n :active,\n :focus {\n text-decoration: none;\n opacity: 0.8;\n cursor: pointer;\n }\n`\nconst TransactionStatusText = styled.span`\n margin-left: 0.25rem;\n ${({ theme }) => theme.flexRowNoWrap};\n align-items: center;\n color: black;\n`\n\nexport default function CopyHelper({ toCopy }) {\n const [isCopied, setCopied] = useCopyClipboard()\n\n return (\n setCopied(toCopy)}>\n {isCopied ? (\n \n \n \n \n \n ) : (\n \n \n \n \n \n )}\n \n )\n}\n","import React, { useCallback, useState } from 'react'\nimport styled from 'styled-components'\nimport Popover, { PopoverProps } from '../Popover'\n\nconst Wrapper = styled.span`\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nconst TooltipContainer = styled.div`\n width: 228px;\n padding: 0.6rem 1rem;\n line-height: 150%;\n font-weight: 400;\n`\n\ninterface TooltipProps extends Omit {\n text: string\n}\n\nexport function Tooltip({ text, ...rest }: TooltipProps) {\n return {text}} {...rest} />\n}\n\nexport default function HoverText({ text, children }: { text: string; children: any }) {\n const [show, setShow] = useState(false)\n const open = useCallback(() => setShow(true), [setShow])\n const close = useCallback(() => setShow(false), [setShow])\n\n return (\n \n \n \n {children}\n \n \n \n )\n}\n","import React, { useEffect, useRef, useState } from 'react'\nimport { useMedia } from 'react-use'\nimport { Flex } from 'rebass'\nimport { Area, AreaChart, Bar, BarChart, ResponsiveContainer, Tooltip, XAxis, YAxis } from 'recharts'\nimport styled from 'styled-components'\nimport { EmptyCard } from '..'\nimport { timeframeOptions } from '../../constants'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\nimport { useHourlyRateData, usePairChartData, usePairData } from '../../contexts/PairData'\nimport { TYPE } from '../../Theme'\nimport { formattedNum, getTimeframe, toK, toNiceDate, toNiceDateYear } from '../../utils'\nimport Column from '../Column'\nimport DropdownSelect from '../DropdownSelect'\nimport { ActiveSortItemBottom, SortText } from '../PairTransactionsTable'\nimport { RowBetween, RowStart } from '../Row'\n\nconst ChartWrapper = styled.div`\n height: 100%;\n max-height: 340px;\n\n @media screen and (max-width: 600px) {\n min-height: 200px;\n }\n`\n\nconst CHART_VIEW = {\n VOLUME: 'Volume',\n LIQUIDITY: 'Liquidity',\n TVL: 'TVL',\n PRICE: 'Price',\n}\n\nconst filterItems = [\n {\n value: CHART_VIEW.VOLUME,\n },\n {\n value: CHART_VIEW.TVL,\n },\n {\n value: CHART_VIEW.PRICE,\n },\n]\nconst timeFrames = [\n { value: timeframeOptions.WEEK, key: '1W' },\n { value: timeframeOptions.MONTH, key: '1M' },\n {\n value: timeframeOptions.ALL_TIME,\n key: 'All',\n },\n]\nconst PairChart = ({ address, color, base0, base1 }) => {\n const [chartFilter, setChartFilter] = useState(CHART_VIEW.VOLUME)\n\n const [timeWindow, setTimeWindow] = useState(timeframeOptions.MONTH)\n\n const [darkMode] = useDarkModeManager()\n const textColor = darkMode ? '#8F8FB2' : 'black'\n\n // update the width on a window resize\n const ref = useRef()\n const isClient = typeof window === 'object'\n const [width, setWidth] = useState(ref?.current?.container?.clientWidth)\n const [height, setHeight] = useState(ref?.current?.container?.clientHeight)\n useEffect(() => {\n if (!isClient) {\n return false\n }\n function handleResize() {\n setWidth(ref?.current?.container?.clientWidth ?? width)\n setHeight(ref?.current?.container?.clientHeight ?? height)\n }\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [height, isClient, width]) // Empty array ensures that effect is only run on mount and unmount\n\n // get data for pair, and rates\n const pairData = usePairData(address)\n let chartData = usePairChartData(address)\n const hourlyData = useHourlyRateData(address, timeWindow)\n const hourlyRate0 = hourlyData && hourlyData[0]\n const hourlyRate1 = hourlyData && hourlyData[1]\n\n const below1600 = useMedia('(max-width: 1600px)')\n const below1080 = useMedia('(max-width: 1080px)')\n const below600 = useMedia('(max-width: 600px)')\n const [latestValue, setLatestValue] = useState()\n let utcStartTime = getTimeframe(timeWindow)\n chartData = chartData?.filter((entry) => entry.date >= utcStartTime)\n if (chartData && chartData.length === 0) {\n return (\n \n \n No historical data yet\n {' '}\n \n )\n }\n\n const aspect = below1080 ? 60 / 20 : below1600 ? 60 / 28 : 60 / 22\n const initializeLatestvalue = (selectedKey) => {\n if (chartData?.length) {\n if (selectedKey === CHART_VIEW.VOLUME) {\n if (chartData[chartData.length - 1].dailyVolumeUSD !== undefined) {\n setLatestValue(chartData[chartData.length - 1].dailyVolumeUSD)\n }\n }\n if (selectedKey === CHART_VIEW.TVL) {\n if (chartData[chartData.length - 1].reserveUSD !== undefined) {\n setLatestValue(chartData[chartData.length - 1].reserveUSD)\n }\n }\n }\n }\n return (\n \n {below600 ? (\n \n \n \n \n ) : (\n \n \n \n {timeFrames.map(({ key, value }) => (\n \n {\n setTimeWindow(value)\n }}\n active={timeWindow === value}\n >\n {key}\n \n {timeWindow === value && }\n \n ))}\n \n \n {filterItems.map(({ value }) => (\n \n {\n setTimeWindow(timeframeOptions.ALL_TIME)\n initializeLatestvalue(value)\n setChartFilter(value)\n }}\n active={chartFilter === value}\n >\n {value}\n \n {chartFilter === value && }\n \n ))}\n \n \n \n {formattedNum(latestValue)} $\n \n \n )}\n {chartFilter === CHART_VIEW.TVL && (\n \n \n \n \n \n \n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={['dataMin', 'dataMax']}\n />\n '$' + toK(tick)}\n axisLine={false}\n tickLine={false}\n interval=\"preserveEnd\"\n minTickGap={80}\n yAxisId={0}\n tickMargin={16}\n tick={{ fill: textColor }}\n />\n {\n if (setLatestValue && latestValue !== val) {\n setLatestValue(val)\n }\n return formattedNum(val, true)\n }}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n )}\n\n {chartFilter === CHART_VIEW.VOLUME && (\n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={['dataMin', 'dataMax']}\n />\n '$' + toK(tick)}\n tickLine={false}\n interval=\"preserveEnd\"\n orientation=\"right\"\n minTickGap={80}\n yAxisId={0}\n tick={{ fill: textColor }}\n />\n {\n if (setLatestValue && latestValue !== val) {\n setLatestValue(val)\n }\n\n return formattedNum(val, true)\n }}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n )}\n\n {chartFilter === CHART_VIEW.PRICE && (\n \n )}\n \n )\n}\n\nexport default PairChart\n","import 'feather-icons'\nimport { AlertCircle } from 'react-feather'\nimport styled from 'styled-components'\nimport Panel from '../Panel'\n\nexport const DashboardWrapper = styled.div`\n width: 100%;\n`\nexport const Wallet = styled.div`\n background: ${({ theme: { background1 } }) => background1};\n -webkit-background-clip: text;\n background-clip: text;\n -webkit-text-fill-color: transparent;\n`\n\nexport const PanelWrapper = styled.div`\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: max-content;\n gap: 6px;\n display: inline-grid;\n width: 100%;\n align-items: start;\n @media screen and (max-width: 1024px) {\n grid-template-columns: 1fr;\n align-items: stretch;\n > * {\n /* grid-column: 1 / 4; */\n }\n\n > * {\n &:first-child {\n width: 100%;\n }\n }\n }\n`\n\nexport const TokenDetailsLayout = styled.div`\n display: inline-grid;\n width: 100%;\n grid-template-columns: auto auto auto auto 1fr;\n column-gap: 60px;\n align-items: start;\n\n &:last-child {\n align-items: center;\n justify-items: end;\n }\n @media screen and (max-width: 1024px) {\n grid-template-columns: 1fr;\n align-items: stretch;\n > * {\n /* grid-column: 1 / 4; */\n margin-bottom: 1rem;\n }\n\n &:last-child {\n align-items: start;\n justify-items: start;\n }\n }\n`\n\nexport const FixedPanel = styled(Panel)`\n width: fit-content;\n padding: 12px 16px;\n border-radius: 6px;\n // border-width: 2px;\n background-color: none;\n border: 1px solid #e6e6ff;\n // border-color: ${({ theme }) => theme.bg8};\n :hover {\n cursor: pointer;\n // background-color: ${({ theme }) => theme.bg8};\n }\n`\n\nexport const HoverSpan = styled.span`\n :hover {\n cursor: pointer;\n opacity: 0.7;\n }\n`\n\nexport const WarningIcon = styled(AlertCircle)`\n stroke: ${({ theme }) => theme.text1};\n height: 16px;\n width: 16px;\n opacity: 0.6;\n`\n\nexport const WarningGrouping = styled.div`\n opacity: ${({ disabled }) => disabled && '0.4'};\n pointer-events: ${({ disabled }) => disabled && 'none'};\n`\n","import React from 'react'\nimport 'feather-icons'\nimport styled from 'styled-components'\nimport { Text } from 'rebass'\nimport { AlertTriangle } from 'react-feather'\nimport { RowBetween, RowFixed } from '../Row'\nimport { ButtonDark } from '../ButtonStyled'\nimport { AutoColumn } from '../Column'\nimport { Hover } from '..'\nimport Link from '../Link'\nimport { useMedia } from 'react-use'\nimport { usedChain } from '../../constants'\nimport { ExplorerDataType, getExplorerLink } from '../../utils/etherscan'\n\nconst WarningWrapper = styled.div`\n border-radius: 20px;\n border: 1px solid #f82d3a;\n background: rgba(248, 45, 58, 0.05);\n padding: 1rem;\n color: #f82d3a;\n display: ${({ show }) => !show && 'none'};\n margin: 0 2rem 2rem 2rem;\n position: relative;\n\n @media screen and (max-width: 800px) {\n width: 80% !important;\n margin-left: 5%;\n }\n`\n\nconst StyledWarningIcon = styled(AlertTriangle)`\n min-height: 20px;\n min-width: 20px;\n stroke: red;\n`\n\nexport default function Warning({ type, show, setShow, address }) {\n const below800 = useMedia('(max-width: 800px)')\n\n const textContent = below800 ? (\n
\n \n Anyone can create and name any ERC20 token on Ethereum, including creating fake versions of existing tokens and\n tokens that claim to represent projects that do not have a token.\n \n \n Similar to Etherscan, this site automatically tracks analytics for all ERC20 tokens independent of token\n integrity. Please do your own research before interacting with any ERC20 token.\n \n
\n ) : (\n \n Anyone can create and name any ERC20 token on Ethereum, including creating fake versions of existing tokens and\n tokens that claim to represent projects that do not have a token. Similar to Etherscan, this site automatically\n tracks analytics for all ERC20 tokens independent of token integrity. Please do your own research before\n interacting with any ERC20 token.\n \n )\n\n return (\n \n \n \n \n \n Token Safety Alert\n \n \n {textContent}\n {below800 ? (\n
\n \n \n View {type === 'token' ? 'token' : 'pair'} contract on Etherscan\n \n \n \n
\n setShow(false)}>\n I understand\n \n \n
\n ) : (\n \n \n \n View {type === 'token' ? 'token' : 'pair'} contract on Etherscan\n \n \n setShow(false)}>\n I understand\n \n \n )}\n \n \n )\n}\n","import 'feather-icons'\nimport { transparentize } from 'polished'\nimport React, { useEffect } from 'react'\nimport { Bookmark, PlusCircle } from 'react-feather'\nimport { withRouter } from 'react-router-dom'\nimport { useMedia } from 'react-use'\nimport { Hover } from '../components'\nimport { ButtonDark, ButtonLight } from '../components/ButtonStyled'\nimport Column, { AutoColumn } from '../components/Column'\nimport CopyHelper from '../components/Copy'\nimport DoubleTokenLogo from '../components/DoubleLogo'\nimport FormattedName from '../components/FormattedName'\nimport HoverText from '../components/HoverText'\nimport {\n BlockedMessageWrapper,\n BlockedWrapper,\n ContentWrapperLarge,\n PageWrapper,\n StyledIcon,\n} from '../components/index'\nimport Link, { BasicLink } from '../components/Link'\nimport Loader from '../components/LocalLoader'\nimport PairChart from '../components/PairChart'\nimport Panel from '../components/Panel'\nimport {\n DashboardWrapper,\n FixedPanel,\n HoverSpan,\n PanelWrapper,\n TokenDetailsLayout,\n Wallet,\n WarningGrouping,\n WarningIcon,\n} from '../components/PoolPage/styleds'\nimport { AutoRow, RowBetween, RowFixed } from '../components/Row'\nimport Search from '../components/Search'\nimport TokenLogo from '../components/TokenLogo'\nimport TxnList from '../components/TxnList'\nimport Warning from '../components/Warning'\nimport { BLOCKED_WARNINGS, PAIR_BLACKLIST, UNTRACKED_COPY, usedChain } from '../constants'\nimport { useEthPrice } from '../contexts/GlobalData'\nimport { usePathDismissed, useSavedPairs } from '../contexts/LocalStorage'\nimport { usePairData, usePairTransactions } from '../contexts/PairData'\nimport { useColor } from '../hooks'\nimport { ThemedBackground, TYPE } from '../Theme'\nimport { formattedNum, formattedPercent, getPoolLink, getSwapLink, shortenAddress } from '../utils'\nimport { ExplorerDataType, getExplorerLink } from '../utils/etherscan'\n\nfunction PairPage({ pairAddress, history }) {\n const {\n token0,\n token1,\n reserve0,\n reserve1,\n reserveUSD,\n trackedReserveUSD,\n oneDayVolumeUSD,\n volumeChangeUSD,\n oneDayVolumeUntracked,\n volumeChangeUntracked,\n liquidityChangeUSD,\n } = usePairData(pairAddress)\n\n useEffect(() => {\n document.querySelector('body').scrollTo(0, 0)\n }, [])\n\n const transactions = usePairTransactions(pairAddress)\n const backgroundColor = useColor(pairAddress)\n\n const formattedLiquidity = reserveUSD ? formattedNum(reserveUSD, true) : formattedNum(trackedReserveUSD, true)\n const usingUntrackedLiquidity = !trackedReserveUSD && !!reserveUSD\n const liquidityChange = formattedPercent(liquidityChangeUSD)\n\n // volume\n const volume = !!oneDayVolumeUSD ? formattedNum(oneDayVolumeUSD, true) : formattedNum(oneDayVolumeUntracked, true)\n const usingUtVolume = oneDayVolumeUSD === 0 && !!oneDayVolumeUntracked\n const volumeChange = formattedPercent(!usingUtVolume ? volumeChangeUSD : volumeChangeUntracked)\n\n const showUSDWaning = usingUntrackedLiquidity | usingUtVolume\n\n // get fees\t // get fees\n const fees =\n oneDayVolumeUSD || oneDayVolumeUSD === 0\n ? usingUtVolume\n ? formattedNum(oneDayVolumeUntracked * 0.003, true)\n : formattedNum(oneDayVolumeUSD * 0.003, true)\n : '-'\n\n // token data for usd\n const [ethPrice] = useEthPrice()\n const token0USD =\n token0?.derivedETH && ethPrice ? formattedNum(parseFloat(token0.derivedETH) * parseFloat(ethPrice), true) : ''\n\n const token1USD =\n token1?.derivedETH && ethPrice ? formattedNum(parseFloat(token1.derivedETH) * parseFloat(ethPrice), true) : ''\n\n // rates\n const token0Rate = reserve0 && reserve1 ? formattedNum(reserve1 / reserve0) : '-'\n const token1Rate = reserve0 && reserve1 ? formattedNum(reserve0 / reserve1) : '-'\n\n // formatted symbols for overflow\n const formattedSymbol0 = token0?.symbol.length > 6 ? token0?.symbol.slice(0, 5) + '...' : token0?.symbol\n const formattedSymbol1 = token1?.symbol.length > 6 ? token1?.symbol.slice(0, 5) + '...' : token1?.symbol\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below900 = useMedia('(max-width: 900px)')\n const below600 = useMedia('(max-width: 600px)')\n\n const [dismissed, markAsDismissed] = usePathDismissed(history.location.pathname)\n\n useEffect(() => {\n window.scrollTo({\n behavior: 'smooth',\n top: 0,\n })\n }, [])\n\n const [savedPairs, addPair] = useSavedPairs()\n\n // const listedTokens = useListedTokens()\n\n if (PAIR_BLACKLIST.includes(pairAddress)) {\n return (\n \n \n \n \n {BLOCKED_WARNINGS[pairAddress] ?? `This pair is not supported.`}\n \n {`More about ${shortenAddress(pairAddress)}`}\n \n \n \n )\n }\n\n return (\n \n \n \n \n \n \n \n {'Pairs '}→ {token0?.symbol}-{token1?.symbol}\n \n {!below600 && }\n \n \n \n \n \n \n \n {token0 && token1 && (\n \n )}{' '}\n \n {token0 && token1 ? (\n <>\n history.push(`/token/${token0?.id}`)}>{token0.symbol}\n -\n history.push(`/token/${token1?.id}`)}>\n {token1.symbol}\n {' '}\n Pair\n \n ) : (\n ''\n )}\n \n \n \n \n {!!!savedPairs[pairAddress] && !below1080 ? (\n addPair(pairAddress, token0.id, token1.id, token0.symbol, token1.symbol)}>\n \n \n \n \n ) : !below1080 ? (\n \n \n \n ) : (\n <>\n )}\n\n \n + Add Liquidity\n \n \n \n Trade\n \n \n \n
\n
\n \n history.push(`/token/${token0?.id}`)}>\n \n \n \n {token0 && token1\n ? `1 ${formattedSymbol0} = ${token0Rate} ${formattedSymbol1} ${\n parseFloat(token0?.derivedETH) ? '(' + token0USD + ')' : ''\n }`\n : '-'}\n \n \n \n history.push(`/token/${token1?.id}`)}>\n \n \n \n {token0 && token1\n ? `1 ${formattedSymbol1} = ${token1Rate} ${formattedSymbol0} ${\n parseFloat(token1?.derivedETH) ? '(' + token1USD + ')' : ''\n }`\n : '-'}\n \n \n \n \n <>\n {!below1080 && (\n \n \n Pair Stats\n \n {showUSDWaning ? (\n \n \n \n ) : null}\n \n )}\n \n \n \n \n Total Liquidity \n
\n \n \n \n {formattedLiquidity}\n \n {liquidityChange}\n \n \n \n \n \n \n Volume (24hrs) \n
\n \n \n \n {volume}\n \n {volumeChange}\n \n \n \n \n \n \n Fees (24hrs)\n
\n \n \n \n {fees}\n \n {volumeChange}\n \n \n \n \n \n \n Pooled Tokens\n
\n \n history.push(`/token/${token0?.id}`)} fade={true}>\n \n \n \n \n {reserve0 ? formattedNum(reserve0) : ''}{' '}\n \n \n \n \n \n history.push(`/token/${token1?.id}`)} fade={true}>\n \n \n \n \n {reserve1 ? formattedNum(reserve1) : ''}{' '}\n \n \n \n \n \n \n \n \n \n \n \n \n Transactions\n {' '}\n \n {transactions ? : }\n \n \n Pair Information{' '}\n \n \n \n \n Pair Name\n \n \n \n -\n \n \n \n \n \n Pair Address\n \n \n \n {pairAddress.slice(0, 6) + '...' + pairAddress.slice(38, 42)}\n \n \n \n \n \n \n \n \n {' '}\n Address\n \n \n \n \n \n {token0 && token0.id.slice(0, 6) + '...' + token0.id.slice(38, 42)}\n \n \n \n \n \n \n \n \n {' '}\n Address\n \n \n \n {token1 && token1.id.slice(0, 6) + '...' + token1.id.slice(38, 42)}\n \n \n \n \n \n View on PolygonScan ↗\n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default withRouter(PairPage)\n","import 'feather-icons'\nimport { transparentize } from 'polished'\nimport React, { useEffect } from 'react'\nimport { withRouter } from 'react-router-dom'\nimport { useMedia } from 'react-use'\nimport { Flex } from 'rebass'\nimport styled from 'styled-components'\nimport { ButtonGradientBorder, ButtonIXSGradient, ButtonIXSSecondaryGradient } from '../components/ButtonStyled'\nimport Column, { AutoColumn } from '../components/Column'\nimport CopyHelper from '../components/Copy'\nimport FormattedName from '../components/FormattedName'\nimport Header from '../components/Header'\nimport { BlockedMessageWrapper, BlockedWrapper, ContentWrapperLarge, PageWrapper } from '../components/index'\nimport Link, { BasicLink } from '../components/Link'\nimport PairChart from '../components/PairChart'\nimport { PairTransactionsTable } from '../components/PairTransactionsTable'\nimport { Card as StyledPoolCard, Divider } from '../components/PoolCard'\nimport { FixedPanel, TokenDetailsLayout } from '../components/PoolPage/styleds'\nimport { AutoRow, RowBetween, RowFixed } from '../components/Row'\nimport TokenLogo from '../components/TokenLogo'\nimport { BLOCKED_WARNINGS, PAIR_BLACKLIST, usedChain } from '../constants'\nimport { useEthPrice } from '../contexts/GlobalData'\nimport { usePairData, usePairs, usePairTransactions } from '../contexts/PairData'\nimport { useColor } from '../hooks'\nimport { ThemedBackground, TYPE } from '../Theme'\nimport { capitalize, formattedNum, formattedPercent, getPoolLink, getSwapLink, shortenAddress } from '../utils'\nimport { ExplorerDataType, getExplorerLink } from '../utils/etherscan'\nimport DoubleTokenLogo from '../components/DoubleLogo'\n\nexport const CardsGrid = styled.div`\n display: grid;\n grid-template-columns: 1fr 3fr;\n grid-gap: 33px;\n\n @media screen and (max-width: 1024px) {\n grid-template-columns: 1fr;\n }\n`\n\nexport const Card = styled(StyledPoolCard)`\n padding: 42px 32px 0px 32px;\n width: 100%;\n height: 100%;\n max-width: -webkit-fill-available;\n max-height: 468px;\n height: 468px;\n background-color: #ffffff;\n background: #ffffff;\n margin-bottom: 20px;\n\n @media screen and (max-width: 1080px) {\n max-height: auto;\n height: auto;\n margin-bottom: 40px;\n }\n`\n\nfunction PoolPage({ pairAddress, history }) {\n const {\n token0,\n token1,\n reserve0,\n reserve1,\n reserveUSD,\n trackedReserveUSD,\n oneDayVolumeUSD,\n oneDayVolumeUntracked,\n liquidityChangeUSD,\n volumeChangeUSD,\n volumeChangeUntracked,\n } = usePairData(pairAddress)\n\n useEffect(() => {\n document.querySelector('body').scrollTo(0, 0)\n }, [])\n\n const transactions = usePairTransactions(pairAddress)\n const backgroundColor = useColor(pairAddress)\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below540 = useMedia('(max-width: 540px)')\n const below1600 = useMedia('(max-width: 1600px)')\n const below900 = useMedia('(max-width: 900px)')\n\n const aspect = below1080 ? 60 / 28 : below1600 ? 60 / 28 : 60 / 22\n\n const formattedLiquidity = reserveUSD ? formattedNum(reserveUSD, true) : formattedNum(trackedReserveUSD, true)\n\n // volume\n const volume = !!oneDayVolumeUSD ? formattedNum(oneDayVolumeUSD, true) : formattedNum(oneDayVolumeUntracked, true)\n const usingUtVolume = oneDayVolumeUSD === 0 && !!oneDayVolumeUntracked\n const volumeChange = formattedPercent(!usingUtVolume ? volumeChangeUSD : volumeChangeUntracked)\n const { secPairs = {} } = usePairs()\n const isSecPair = Boolean(secPairs[pairAddress])\n const type = isSecPair ? 'security' : 'crypto'\n // get fees\t // get fees\n const fees =\n oneDayVolumeUSD || oneDayVolumeUSD === 0\n ? usingUtVolume\n ? formattedNum(oneDayVolumeUntracked * 0.003, true)\n : formattedNum(oneDayVolumeUSD * 0.003, true)\n : '-'\n\n useEffect(() => {\n window.scrollTo({\n behavior: 'smooth',\n top: 0,\n })\n }, [])\n const [ethPrice] = useEthPrice()\n const token0USD =\n token0?.derivedETH && ethPrice ? formattedNum(parseFloat(token0.derivedETH) * parseFloat(ethPrice), true) : ''\n\n const token1USD =\n token1?.derivedETH && ethPrice ? formattedNum(parseFloat(token1.derivedETH) * parseFloat(ethPrice), true) : ''\n // rates\n const token0Rate = reserve0 && reserve1 ? formattedNum(reserve1 / reserve0) : '-'\n const token1Rate = reserve0 && reserve1 ? formattedNum(reserve0 / reserve1) : '-'\n\n // formatted symbols for overflow\n const formattedSymbol0 = token0?.symbol.length > 6 ? token0?.symbol.slice(0, 5) + '...' : token0?.symbol\n const formattedSymbol1 = token1?.symbol.length > 6 ? token1?.symbol.slice(0, 5) + '...' : token1?.symbol\n const liquidityChange = formattedPercent(liquidityChangeUSD)\n\n if (PAIR_BLACKLIST.includes(pairAddress)) {\n return (\n \n \n \n \n {BLOCKED_WARNINGS[pairAddress] ?? `This pair is not supported.`}\n \n {`More about ${shortenAddress(pairAddress)}`}\n \n \n \n )\n }\n\n return (\n <>\n
\n \n \n \n {/* \n \n Home →\n \n {capitalize(type)} {'pools'}\n \n → {token0?.symbol}-{token1?.symbol}\n \n */}\n {token0 && (\n <>\n \n \n {' '}\n \n {token0?.symbol}/{token1?.symbol}\n \n \n \n \n \n \n Add liquidity\n \n \n \n \n \n \n Trade\n \n \n \n \n \n \n history.push(`/token/${token0?.id}`)}>\n \n \n \n {token0 && token1\n ? `1 ${formattedSymbol0} = ${token0Rate} ${formattedSymbol1} ${\n parseFloat(token0?.derivedETH) ? '(' + token0USD + ')' : ''\n }`\n : '-'}\n \n \n \n history.push(`/token/${token1?.id}`)}>\n \n \n \n {token0 && token1\n ? `1 ${formattedSymbol1} = ${token1Rate} ${formattedSymbol0} ${\n parseFloat(token1?.derivedETH) ? '(' + token1USD + ')' : ''\n }`\n : '-'}\n \n \n \n \n history.goBack()} style={{ gap: '5px', cursor: 'pointer' }}>\n ← Back\n \n\n \n \n Total Tokens Locked\n\n \n \n \n \n {token0?.symbol}\n \n \n \n \n {reserve0 ? `${formattedNum(reserve0 / 1000000)}m` : ''}{' '}\n \n \n \n\n \n \n \n \n {token1?.symbol}\n \n \n \n \n {reserve1 ? `${formattedNum(reserve1 / 1000000)}m` : ''}{' '}\n \n \n \n\n \n\n \n \n TVL\n \n \n {formattedLiquidity}\n {liquidityChange}\n \n \n \n \n \n Volume 24h\n \n \n {volume}\n {volumeChange}\n \n \n \n \n \n 24h Fees\n \n \n {fees}\n {volumeChange}\n \n \n \n \n \n \n \n\n \n Transactions\n \n\n {transactions && (\n +b.transaction.timestamp - +a.transaction.timestamp\n )}\n />\n )}\n \n )}\n\n {token0 && token1 ? (\n <>\n \n Pair Information\n \n \n \n \n Pair Name\n \n \n \n -\n \n \n \n \n \n Pair Address\n \n \n {pairAddress.slice(0, 6) + '...' + pairAddress.slice(38, 42)}\n \n \n \n \n \n \n \n {' '}\n Address\n \n \n \n {token0 && token0.id.slice(0, 6) + '...' + token0.id.slice(38, 42)}\n \n \n \n \n \n \n {' '}\n Address\n \n \n \n {token1 && token1.id.slice(0, 6) + '...' + token1.id.slice(38, 42)}\n \n \n \n \n View on PolygonScan ↗\n \n \n \n \n ) : (\n

Loading...

\n )}\n
\n
\n \n )\n}\n\nexport default withRouter(PoolPage)\n","import React, { useState, useEffect } from 'react'\nimport { useMedia } from 'react-use'\nimport dayjs from 'dayjs'\nimport LocalLoader from '../LocalLoader'\nimport utc from 'dayjs/plugin/utc'\nimport { Box, Flex, Text } from 'rebass'\nimport styled from 'styled-components'\n\nimport { CustomLink } from '../Link'\nimport { Divider } from '../../components'\nimport { withRouter } from 'react-router-dom'\nimport { formattedNum, formattedPercent } from '../../utils'\nimport DoubleTokenLogo from '../DoubleLogo'\nimport FormattedName from '../FormattedName'\nimport QuestionHelper from '../QuestionHelper'\nimport { TYPE } from '../../Theme'\nimport { PAIR_BLACKLIST } from '../../constants'\nimport { AutoColumn } from '../Column'\n\ndayjs.extend(utc)\n\nconst PageButtons = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n margin-top: 2em;\n margin-bottom: 0.5em;\n`\n\nconst Arrow = styled.div`\n color: ${({ theme }) => theme.primary1};\n opacity: ${(props) => (props.faded ? 0.3 : 1)};\n padding: 0 20px;\n user-select: none;\n :hover {\n cursor: pointer;\n }\n`\n\nconst List = styled(Box)`\n -webkit-overflow-scrolling: touch;\n`\n\nconst DashGrid = styled.div`\n display: grid;\n grid-gap: 1em;\n grid-template-columns: 100px 1fr 1fr;\n grid-template-areas: 'name liq vol';\n padding: 0 1.125rem;\n\n opacity: ${({ fade }) => (fade ? '0.6' : '1')};\n\n > * {\n justify-content: flex-end;\n\n :first-child {\n justify-content: flex-start;\n text-align: left;\n width: 20px;\n }\n }\n\n @media screen and (min-width: 740px) {\n padding: 0 1.125rem;\n grid-template-columns: 1.5fr 1fr 1fr;\n grid-template-areas: ' name liq vol pool ';\n }\n\n @media screen and (min-width: 1080px) {\n padding: 0 1.125rem;\n grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;\n grid-template-areas: ' name liq vol volWeek fees apy';\n }\n\n @media screen and (min-width: 1200px) {\n grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr;\n grid-template-areas: ' name liq vol volWeek fees apy';\n }\n`\n\nconst ListWrapper = styled.div``\n\nconst ClickableText = styled(Text)`\n color: ${({ theme }) => theme.text1};\n &:hover {\n cursor: pointer;\n opacity: 0.6;\n }\n text-align: end;\n user-select: none;\n`\n\nconst DataText = styled(Flex)`\n align-items: center;\n text-align: center;\n color: ${({ theme }) => theme.text1};\n\n & > * {\n font-size: 14px;\n }\n\n @media screen and (max-width: 600px) {\n font-size: 12px;\n }\n`\n\nconst SORT_FIELD = {\n LIQ: 0,\n VOL: 1,\n VOL_7DAYS: 3,\n FEES: 4,\n APY: 5,\n}\n\nconst FIELD_TO_VALUE = (field, useTracked) => {\n switch (field) {\n case SORT_FIELD.LIQ:\n return useTracked ? 'trackedReserveUSD' : 'reserveUSD'\n case SORT_FIELD.VOL:\n return useTracked ? 'oneDayVolumeUSD' : 'oneDayVolumeUntracked'\n case SORT_FIELD.VOL_7DAYS:\n return useTracked ? 'oneWeekVolumeUSD' : 'oneWeekVolumeUntracked'\n case SORT_FIELD.FEES:\n return useTracked ? 'oneDayVolumeUSD' : 'oneDayVolumeUntracked'\n default:\n return 'trackedReserveUSD'\n }\n}\n\nexport const formatDataText = (value, trackedValue, supressWarning = false) => {\n const showUntracked = value !== '$0' && !trackedValue & !supressWarning\n return (\n \n
{value}
\n \n {showUntracked ? 'untracked' : ' '}\n \n
\n )\n}\n\nfunction PairList({ pairs, color, disbaleLinks, maxItems = 10, useTracked = false }) {\n const below600 = useMedia('(max-width: 600px)')\n const below740 = useMedia('(max-width: 740px)')\n const below1080 = useMedia('(max-width: 1080px)')\n\n // pagination\n const [page, setPage] = useState(1)\n const [maxPage, setMaxPage] = useState(1)\n const ITEMS_PER_PAGE = maxItems\n\n // sorting\n const [sortDirection, setSortDirection] = useState(true)\n const [sortedColumn, setSortedColumn] = useState(SORT_FIELD.LIQ)\n\n useEffect(() => {\n setMaxPage(1) // edit this to do modular\n setPage(1)\n }, [pairs])\n\n useEffect(() => {\n if (pairs) {\n let extraPages = 1\n if (Object.keys(pairs).length % ITEMS_PER_PAGE === 0) {\n extraPages = 0\n }\n setMaxPage(Math.floor(Object.keys(pairs).length / ITEMS_PER_PAGE) + extraPages)\n }\n }, [ITEMS_PER_PAGE, pairs])\n\n const ListItem = ({ pairAddress, index }) => {\n const pairData = pairs[pairAddress]\n\n if (pairData && pairData.token0 && pairData.token1) {\n const liquidity = formattedNum(\n !!pairData.trackedReserveUSD ? pairData.trackedReserveUSD : pairData.reserveUSD,\n true\n )\n\n const volume = formattedNum(\n pairData.oneDayVolumeUSD ? pairData.oneDayVolumeUSD : pairData.oneDayVolumeUntracked,\n true\n )\n\n const apy = formattedPercent(\n ((pairData.oneDayVolumeUSD ? pairData.oneDayVolumeUSD : pairData.oneDayVolumeUntracked) * 0.003 * 365 * 100) /\n (pairData.oneDayVolumeUSD ? pairData.trackedReserveUSD : pairData.reserveUSD)\n )\n\n const weekVolume = formattedNum(\n pairData.oneWeekVolumeUSD ? pairData.oneWeekVolumeUSD : pairData.oneWeekVolumeUntracked,\n true\n )\n\n const fees = formattedNum(\n pairData.oneDayVolumeUSD ? pairData.oneDayVolumeUSD * 0.003 : pairData.oneDayVolumeUntracked * 0.003,\n true\n )\n\n return (\n \n \n {!below600 &&
{index}
}\n \n \n \n \n
\n {formatDataText(liquidity, pairData.trackedReserveUSD)}\n {formatDataText(volume, pairData.oneDayVolumeUSD)}\n {!below1080 && {formatDataText(weekVolume, pairData.oneWeekVolumeUSD)}}\n {!below1080 && {formatDataText(fees, pairData.oneDayVolumeUSD)}}\n {!below1080 && (\n \n {formatDataText(apy, pairData.oneDayVolumeUSD, pairData.oneDayVolumeUSD === 0)}\n \n )}\n
\n )\n } else {\n return ''\n }\n }\n\n const pairList =\n pairs &&\n Object.keys(pairs)\n .filter(\n (address) => !PAIR_BLACKLIST.includes(address) && (useTracked ? !!pairs[address].trackedReserveUSD : true)\n )\n .sort((addressA, addressB) => {\n const pairA = pairs[addressA]\n const pairB = pairs[addressB]\n if (sortedColumn === SORT_FIELD.APY) {\n const apy0 = parseFloat(pairA.oneDayVolumeUSD * 0.003 * 356 * 100) / parseFloat(pairA.reserveUSD)\n const apy1 = parseFloat(pairB.oneDayVolumeUSD * 0.003 * 356 * 100) / parseFloat(pairB.reserveUSD)\n return apy0 > apy1 ? (sortDirection ? -1 : 1) * 1 : (sortDirection ? -1 : 1) * -1\n }\n return parseFloat(pairA[FIELD_TO_VALUE(sortedColumn, useTracked)]) >\n parseFloat(pairB[FIELD_TO_VALUE(sortedColumn, useTracked)])\n ? (sortDirection ? -1 : 1) * 1\n : (sortDirection ? -1 : 1) * -1\n })\n .slice(ITEMS_PER_PAGE * (page - 1), page * ITEMS_PER_PAGE)\n .map((pairAddress, index) => {\n return (\n pairAddress && (\n
\n \n \n
\n )\n )\n })\n\n return (\n \n \n \n Name\n \n \n {\n setSortedColumn(SORT_FIELD.LIQ)\n setSortDirection(sortedColumn !== SORT_FIELD.LIQ ? true : !sortDirection)\n }}\n >\n Liquidity {sortedColumn === SORT_FIELD.LIQ ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n \n {\n setSortedColumn(SORT_FIELD.VOL)\n setSortDirection(sortedColumn !== SORT_FIELD.VOL ? true : !sortDirection)\n }}\n >\n Volume (24hrs)\n {sortedColumn === SORT_FIELD.VOL ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n {!below1080 && (\n \n {\n setSortedColumn(SORT_FIELD.VOL_7DAYS)\n setSortDirection(sortedColumn !== SORT_FIELD.VOL_7DAYS ? true : !sortDirection)\n }}\n >\n Volume (7d) {sortedColumn === SORT_FIELD.VOL_7DAYS ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n {!below1080 && (\n \n {\n setSortedColumn(SORT_FIELD.FEES)\n setSortDirection(sortedColumn !== SORT_FIELD.FEES ? true : !sortDirection)\n }}\n >\n Fees (24hr) {sortedColumn === SORT_FIELD.FEES ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n )}\n {!below1080 && (\n \n {\n setSortedColumn(SORT_FIELD.APY)\n setSortDirection(sortedColumn !== SORT_FIELD.APY ? true : !sortDirection)\n }}\n >\n 1y Fees / Liquidity {sortedColumn === SORT_FIELD.APY ? (!sortDirection ? '↑' : '↓') : ''}\n \n \n \n )}\n \n \n {!pairList ? : pairList}\n \n {\n setPage(page === 1 ? page : page - 1)\n }}\n >\n \n
\n {'Page ' + page + ' of ' + maxPage}\n {\n setPage(page === maxPage ? page : page + 1)\n }}\n >\n \n
\n \n \n )\n}\n\nexport default withRouter(PairList)\n","import React, { useState, useEffect, useRef } from 'react'\nimport { createChart, CrosshairMode } from 'lightweight-charts'\nimport dayjs from 'dayjs'\nimport { formattedNum } from '../../utils'\nimport { usePrevious } from 'react-use'\nimport styled from 'styled-components'\nimport { Play } from 'react-feather'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\n\nconst IconWrapper = styled.div`\n position: absolute;\n right: 10px;\n color: ${({ theme }) => theme.text1}\n border-radius: 3px;\n height: 16px;\n width: 16px;\n padding: 0px;\n bottom: 10px;\n display: flex;\n align-items: center;\n justify-content: center;\n :hover {\n cursor: pointer;\n opacity: 0.7;\n }\n`\n\nconst CandleStickChart = ({\n data,\n width,\n height = 300,\n base,\n margin = true,\n valueFormatter = (val) => formattedNum(val, true),\n}) => {\n // reference for DOM element to create with chart\n const ref = useRef()\n\n const formattedData = data?.map((entry) => {\n return {\n time: parseFloat(entry.timestamp),\n open: parseFloat(entry.open),\n low: parseFloat(entry.open),\n close: parseFloat(entry.close),\n high: parseFloat(entry.close),\n }\n })\n\n if (formattedData && formattedData.length > 0) {\n formattedData.push({\n time: dayjs().unix(),\n open: parseFloat(formattedData[formattedData.length - 1].close),\n close: parseFloat(base),\n low: Math.min(parseFloat(base), parseFloat(formattedData[formattedData.length - 1].close)),\n high: Math.max(parseFloat(base), parseFloat(formattedData[formattedData.length - 1].close)),\n })\n }\n\n // pointer to the chart object\n const [chartCreated, setChartCreated] = useState(false)\n const dataPrev = usePrevious(data)\n\n const [darkMode] = useDarkModeManager()\n const textColor = darkMode ? 'white' : 'black'\n const previousTheme = usePrevious(darkMode)\n\n // reset the chart if theme switches\n useEffect(() => {\n if (chartCreated && previousTheme !== darkMode) {\n // remove the tooltip element\n let tooltip = document.getElementById('tooltip-id')\n let node = document.getElementById('test-id')\n node.removeChild(tooltip)\n chartCreated.resize(0, 0)\n setChartCreated()\n }\n }, [chartCreated, darkMode, previousTheme])\n\n useEffect(() => {\n if (data !== dataPrev && chartCreated) {\n // remove the tooltip element\n let tooltip = document.getElementById('tooltip-id')\n let node = document.getElementById('test-id')\n node.removeChild(tooltip)\n chartCreated.resize(0, 0)\n setChartCreated()\n }\n }, [chartCreated, data, dataPrev])\n\n // if no chart created yet, create one with options and add to DOM manually\n useEffect(() => {\n if (!chartCreated) {\n const chart = createChart(ref.current, {\n width: width,\n height: height,\n layout: {\n backgroundColor: 'transparent',\n textColor: textColor,\n },\n grid: {\n vertLines: {\n color: 'rgba(197, 203, 206, 0.5)',\n },\n horzLines: {\n color: 'rgba(197, 203, 206, 0.5)',\n },\n },\n crosshair: {\n mode: CrosshairMode.Normal,\n },\n rightPriceScale: {\n borderColor: 'rgba(197, 203, 206, 0.8)',\n visible: true,\n },\n timeScale: {\n borderColor: 'rgba(197, 203, 206, 0.8)',\n },\n localization: {\n priceFormatter: (val) => formattedNum(val),\n },\n })\n\n var candleSeries = chart.addCandlestickSeries({\n upColor: 'green',\n downColor: 'red',\n borderDownColor: 'red',\n borderUpColor: 'green',\n wickDownColor: 'red',\n wickUpColor: 'green',\n })\n\n candleSeries.setData(formattedData)\n\n var toolTip = document.createElement('div')\n toolTip.setAttribute('id', 'tooltip-id')\n toolTip.className = 'three-line-legend'\n ref.current.appendChild(toolTip)\n toolTip.style.display = 'block'\n toolTip.style.left = (margin ? 116 : 10) + 'px'\n toolTip.style.top = 50 + 'px'\n toolTip.style.backgroundColor = 'transparent'\n\n // get the title of the chart\n function setLastBarText() {\n toolTip.innerHTML = base\n ? `
` + valueFormatter(base) + '
'\n : ''\n }\n setLastBarText()\n\n // update the title when hovering on the chart\n chart.subscribeCrosshairMove(function (param) {\n if (\n param === undefined ||\n param.time === undefined ||\n param.point.x < 0 ||\n param.point.x > width ||\n param.point.y < 0 ||\n param.point.y > height\n ) {\n setLastBarText()\n } else {\n var price = param.seriesPrices.get(candleSeries).close\n const time = dayjs.unix(param.time).format('MM/DD h:mm A')\n toolTip.innerHTML =\n `
` +\n valueFormatter(price) +\n `` +\n time +\n ' UTC' +\n '' +\n '
'\n }\n })\n\n chart.timeScale().fitContent()\n\n setChartCreated(chart)\n }\n }, [chartCreated, formattedData, width, height, valueFormatter, base, margin, textColor])\n\n // responsiveness\n useEffect(() => {\n if (width) {\n chartCreated && chartCreated.resize(width, height)\n chartCreated && chartCreated.timeScale().scrollToPosition(0)\n }\n }, [chartCreated, height, width])\n\n return (\n
\n
\n \n {\n chartCreated && chartCreated.timeScale().fitContent()\n }}\n />\n \n
\n )\n}\n\nexport default CandleStickChart\n","import React, { useState, useRef, useEffect } from 'react'\nimport styled from 'styled-components'\nimport { Area, XAxis, YAxis, ResponsiveContainer, Tooltip, AreaChart, BarChart, Bar } from 'recharts'\nimport { AutoRow, RowBetween, RowFixed } from '../Row'\n\nimport { toK, toNiceDate, toNiceDateYear, formattedNum, getTimeframe } from '../../utils'\nimport { OptionButton } from '../ButtonStyled'\nimport { darken } from 'polished'\nimport { useMedia, usePrevious } from 'react-use'\nimport { timeframeOptions } from '../../constants'\nimport { useTokenChartData, useTokenPriceData } from '../../contexts/TokenData'\nimport DropdownSelect from '../DropdownSelect'\nimport CandleStickChart from '../CandleChart'\nimport LocalLoader from '../LocalLoader'\nimport { AutoColumn } from '../Column'\nimport { Activity } from 'react-feather'\nimport { useDarkModeManager } from '../../contexts/LocalStorage'\nimport { flip } from '@popperjs/core'\n\nconst ChartWrapper = styled.div`\n height: 100%;\n min-height: 300px;\n\n @media screen and (max-width: 600px) {\n min-height: 200px;\n }\n`\n\nconst PriceOption = styled(OptionButton)`\n border-radius: 2px;\n`\n\nconst CHART_VIEW = {\n VOLUME: 'Volume',\n LIQUIDITY: 'Liquidity',\n PRICE: 'Price',\n LINE_PRICE: 'Price (Line)',\n}\n\nconst DATA_FREQUENCY = {\n DAY: 'DAY',\n HOUR: 'HOUR',\n LINE: 'LINE',\n}\n\nconst TokenChart = ({ address, color, base, price }) => {\n // settings for the window and candle width\n const [chartFilter, setChartFilter] = useState(CHART_VIEW.PRICE)\n const [frequency, setFrequency] = useState(DATA_FREQUENCY.HOUR)\n\n const [darkMode] = useDarkModeManager()\n const textColor = darkMode ? 'white' : 'black'\n\n // reset view on new address\n const addressPrev = usePrevious(address)\n useEffect(() => {\n if (address !== addressPrev && addressPrev) {\n setChartFilter(CHART_VIEW.LIQUIDITY)\n }\n }, [address, addressPrev])\n\n let chartData = useTokenChartData(address)\n\n const [timeWindow, setTimeWindow] = useState(timeframeOptions.WEEK)\n const prevWindow = usePrevious(timeWindow)\n\n // hourly and daily price data based on the current time window\n const hourlyWeek = useTokenPriceData(address, timeframeOptions.WEEK, 3600)\n const hourlyMonth = useTokenPriceData(address, timeframeOptions.MONTH, 3600)\n const hourlyAll = useTokenPriceData(address, timeframeOptions.ALL_TIME, 3600)\n const dailyWeek = useTokenPriceData(address, timeframeOptions.WEEK, 86400)\n const dailyMonth = useTokenPriceData(address, timeframeOptions.MONTH, 86400)\n const dailyAll = useTokenPriceData(address, timeframeOptions.ALL_TIME, 86400)\n\n const priceData =\n timeWindow === timeframeOptions.MONTH\n ? // monthly selected\n frequency === DATA_FREQUENCY.DAY\n ? dailyMonth\n : hourlyMonth\n : // weekly selected\n timeWindow === timeframeOptions.WEEK\n ? frequency === DATA_FREQUENCY.DAY\n ? dailyWeek\n : hourlyWeek\n : // all time selected\n frequency === DATA_FREQUENCY.DAY\n ? dailyAll\n : hourlyAll\n\n // switch to hourly data when switched to week window\n useEffect(() => {\n if (timeWindow === timeframeOptions.WEEK && prevWindow && prevWindow !== timeframeOptions.WEEK) {\n setFrequency(DATA_FREQUENCY.HOUR)\n }\n }, [prevWindow, timeWindow])\n\n // switch to daily data if switche to month or all time view\n useEffect(() => {\n if (timeWindow === timeframeOptions.MONTH && prevWindow && prevWindow !== timeframeOptions.MONTH) {\n setFrequency(DATA_FREQUENCY.DAY)\n }\n if (timeWindow === timeframeOptions.ALL_TIME && prevWindow && prevWindow !== timeframeOptions.ALL_TIME) {\n setFrequency(DATA_FREQUENCY.DAY)\n }\n }, [prevWindow, timeWindow])\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below600 = useMedia('(max-width: 600px)')\n\n let utcStartTime = getTimeframe(timeWindow)\n const domain = [(dataMin) => (dataMin > utcStartTime ? dataMin : utcStartTime), 'dataMax']\n const aspect = below1080 ? 60 / 32 : below600 ? 60 / 42 : 60 / 22\n\n chartData = chartData?.filter((entry) => entry.date >= utcStartTime)\n\n // update the width on a window resize\n const ref = useRef()\n const isClient = typeof window === 'object'\n const [width, setWidth] = useState(ref?.current?.container?.clientWidth)\n useEffect(() => {\n if (!isClient) {\n return false\n }\n function handleResize() {\n setWidth(ref?.current?.container?.clientWidth ?? width)\n }\n window.addEventListener('resize', handleResize)\n return () => window.removeEventListener('resize', handleResize)\n }, [isClient, width]) // Empty array ensures that effect is only run on mount and unmount\n\n return (\n \n {below600 ? (\n \n \n \n \n ) : (\n \n \n
\n setChartFilter(CHART_VIEW.LIQUIDITY)}\n style={{ marginRight: '6px' }}\n >\n Liquidity\n \n setChartFilter(CHART_VIEW.VOLUME)}\n style={{ marginRight: '6px' }}\n >\n Volume\n \n {\n setChartFilter(CHART_VIEW.PRICE)\n }}\n >\n Price\n \n
\n {chartFilter === CHART_VIEW.PRICE && (\n \n {\n setTimeWindow(timeframeOptions.MONTH)\n setFrequency(DATA_FREQUENCY.DAY)\n }}\n >\n D\n \n setFrequency(DATA_FREQUENCY.HOUR)}\n >\n H\n \n setFrequency(DATA_FREQUENCY.LINE)}\n >\n \n \n \n )}\n
\n \n setTimeWindow(timeframeOptions.WEEK)}\n >\n 1W\n \n setTimeWindow(timeframeOptions.MONTH)}\n >\n 1M\n \n setTimeWindow(timeframeOptions.ALL_TIME)}\n >\n All\n \n \n \n )}\n {chartFilter === CHART_VIEW.LIQUIDITY && chartData && (\n \n \n \n \n \n \n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={['dataMin', 'dataMax']}\n />\n '$' + toK(tick)}\n axisLine={false}\n tickLine={false}\n interval=\"preserveEnd\"\n minTickGap={80}\n yAxisId={0}\n tick={{ fill: textColor }}\n />\n formattedNum(val, true)}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n )}\n {chartFilter === CHART_VIEW.PRICE &&\n (frequency === DATA_FREQUENCY.LINE ? (\n \n \n \n \n \n \n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: 'black' }}\n type={'number'}\n domain={domain}\n />\n '$' + toK(tick)}\n axisLine={false}\n tickLine={false}\n interval=\"preserveEnd\"\n minTickGap={80}\n yAxisId={0}\n tick={{ fill: 'black' }}\n />\n formattedNum(val, true)}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n ) : priceData ? (\n \n \n \n ) : (\n \n ))}\n\n {chartFilter === CHART_VIEW.VOLUME && (\n \n \n toNiceDate(tick)}\n dataKey=\"date\"\n tick={{ fill: textColor }}\n type={'number'}\n domain={['dataMin', 'dataMax']}\n />\n '$' + toK(tick)}\n tickLine={false}\n orientation=\"right\"\n interval=\"preserveEnd\"\n minTickGap={80}\n yAxisId={0}\n tick={{ fill: textColor }}\n />\n formattedNum(val, true)}\n labelFormatter={(label) => toNiceDateYear(label)}\n labelStyle={{ paddingTop: 4 }}\n contentStyle={{\n padding: '10px 14px',\n borderRadius: 10,\n borderColor: color,\n color: 'black',\n }}\n wrapperStyle={{ top: -70, left: -10 }}\n />\n \n \n \n )}\n
\n )\n}\n\nexport default TokenChart\n","import React from 'react'\nimport styled from 'styled-components'\nimport { TYPE } from '../../Theme'\nimport { RowFixed } from '../Row'\n\nconst StyleCheckbox = styled.input`\n background: ${({ theme }) => theme.bg2};\n\n :before {\n background: #f35429;\n }\n\n :hover {\n cursor: pointer;\n }\n`\n\nconst ButtonText = styled(TYPE.main)`\n cursor: pointer;\n :hover {\n opacity: 0.6;\n }\n`\n\nconst CheckBox = ({ checked, setChecked, text }) => {\n return (\n \n \n \n {text}\n \n \n )\n}\n\nexport default CheckBox\n","import React, { useState } from 'react'\nimport 'feather-icons'\nimport { withRouter } from 'react-router-dom'\nimport { Text } from 'rebass'\nimport styled from 'styled-components'\nimport Link from '../components/Link'\nimport Panel from '../components/Panel'\nimport TokenLogo from '../components/TokenLogo'\nimport PairList from '../components/PairList'\nimport Loader from '../components/LocalLoader'\nimport { AutoRow, RowBetween, RowFixed } from '../components/Row'\nimport Column, { AutoColumn } from '../components/Column'\nimport { ButtonLight, ButtonDark } from '../components/ButtonStyled'\nimport TxnList from '../components/TxnList'\nimport TokenChart from '../components/TokenChart'\nimport { BasicLink } from '../components/Link'\nimport Search from '../components/Search'\nimport { formattedNum, formattedPercent, getPoolLink, getSwapLink, localNumber } from '../utils'\nimport { useTokenData, useTokenTransactions, useTokenPairs } from '../contexts/TokenData'\nimport { TYPE, ThemedBackground } from '../Theme'\nimport { transparentize } from 'polished'\nimport { useColor } from '../hooks'\nimport CopyHelper from '../components/Copy'\nimport { useMedia } from 'react-use'\nimport { useDataForList } from '../contexts/PairData'\nimport { useEffect } from 'react'\nimport Warning from '../components/Warning'\nimport { usePathDismissed, useSavedTokens } from '../contexts/LocalStorage'\nimport { Hover, PageWrapper, ContentWrapper, StyledIcon, BlockedWrapper, BlockedMessageWrapper } from '../components'\nimport { PlusCircle, Bookmark, AlertCircle } from 'react-feather'\nimport FormattedName from '../components/FormattedName'\nimport { useListedTokens } from '../contexts/Application'\nimport HoverText from '../components/HoverText'\nimport { UNTRACKED_COPY, TOKEN_BLACKLIST, BLOCKED_WARNINGS, usedChain } from '../constants'\nimport QuestionHelper from '../components/QuestionHelper'\nimport Checkbox from '../components/Checkbox'\nimport { shortenAddress } from '../utils'\nimport { ExplorerDataType, getExplorerLink } from '../utils/etherscan'\nimport Header from '../components/Header'\n\nconst DashboardWrapper = styled.div`\n width: 100%;\n`\n\nconst PanelWrapper = styled.div`\n grid-template-columns: repeat(3, 1fr);\n grid-template-rows: max-content;\n gap: 6px;\n display: inline-grid;\n width: 100%;\n align-items: start;\n @media screen and (max-width: 1024px) {\n grid-template-columns: 1fr;\n align-items: stretch;\n > * {\n /* grid-column: 1 / 4; */\n }\n\n > * {\n &:first-child {\n width: 100%;\n }\n }\n }\n`\n\nconst TokenDetailsLayout = styled.div`\n display: inline-grid;\n width: 100%;\n grid-template-columns: auto auto auto 1fr;\n column-gap: 30px;\n align-items: start;\n\n &:last-child {\n align-items: center;\n justify-items: end;\n }\n @media screen and (max-width: 1024px) {\n grid-template-columns: 1fr;\n align-items: stretch;\n > * {\n /* grid-column: 1 / 4; */\n margin-bottom: 1rem;\n }\n\n &:last-child {\n align-items: start;\n justify-items: start;\n }\n }\n`\n\nconst WarningIcon = styled(AlertCircle)`\n stroke: ${({ theme }) => theme.text1};\n height: 16px;\n width: 16px;\n opacity: 0.6;\n`\n\nconst WarningGrouping = styled.div`\n opacity: ${({ disabled }) => disabled && '0.4'};\n pointer-events: ${({ disabled }) => disabled && 'none'};\n`\n\nfunction TokenPage({ address, history }) {\n const {\n id,\n name,\n symbol,\n priceUSD,\n oneDayVolumeUSD,\n totalLiquidityUSD,\n volumeChangeUSD,\n oneDayVolumeUT,\n volumeChangeUT,\n priceChangeUSD,\n liquidityChangeUSD,\n oneDayTxns,\n txnChange,\n } = useTokenData(address)\n\n useEffect(() => {\n document.querySelector('body').scrollTo(0, 0)\n }, [])\n\n // detect color from token\n const backgroundColor = useColor(id, symbol)\n\n const allPairs = useTokenPairs(address)\n\n // pairs to show in pair list\n const fetchedPairsList = useDataForList(allPairs)\n\n // all transactions with this token\n const transactions = useTokenTransactions(address)\n\n // price\n const price = priceUSD ? formattedNum(priceUSD, true) : ''\n const priceChange = priceChangeUSD ? formattedPercent(priceChangeUSD) : ''\n\n // volume\n const volume = formattedNum(!!oneDayVolumeUSD ? oneDayVolumeUSD : oneDayVolumeUT, true)\n\n const usingUtVolume = oneDayVolumeUSD === 0 && !!oneDayVolumeUT\n const volumeChange = formattedPercent(!usingUtVolume ? volumeChangeUSD : volumeChangeUT)\n\n // liquidity\n const liquidity = formattedNum(totalLiquidityUSD, true)\n const liquidityChange = formattedPercent(liquidityChangeUSD)\n\n // transactions\n const txnChangeFormatted = formattedPercent(txnChange)\n\n const below1080 = useMedia('(max-width: 1080px)')\n const below800 = useMedia('(max-width: 800px)')\n const below600 = useMedia('(max-width: 600px)')\n const below500 = useMedia('(max-width: 500px)')\n\n // format for long symbol\n const LENGTH = below1080 ? 10 : 16\n const formattedSymbol = symbol?.length > LENGTH ? symbol.slice(0, LENGTH) + '...' : symbol\n\n const [dismissed, markAsDismissed] = usePathDismissed(history.location.pathname)\n const [savedTokens, addToken, removeToken] = useSavedTokens()\n const listedTokens = useListedTokens()\n\n useEffect(() => {\n window.scrollTo({\n behavior: 'smooth',\n top: 0,\n })\n }, [])\n\n const [useTracked, setUseTracked] = useState(true)\n\n if (TOKEN_BLACKLIST.includes(address)) {\n return (\n \n \n \n \n {BLOCKED_WARNINGS[address] ?? `This token is not supported.`}\n \n {`More about ${shortenAddress(address)}`}\n \n \n \n )\n }\n\n return (\n <>\n
\n \n \n \n \n \n {/* \n \n {'Tokens '}→ {symbol}\n \n \n \n ({address.slice(0, 8) + '...' + address.slice(36, 42)})\n \n \n \n {!below600 && } */}\n \n \n \n \n \n \n <>\n {' '}\n \n \n \n \n {' '}\n

\n {' '}\n {formattedSymbol ? `${formattedSymbol}` : ''}\n

\n \n
\n
\n\n \n \n {!savedTokens[address] && !below800 ? (\n addToken(address, symbol)}>\n \n \n \n \n ) : (\n removeToken(address)}>\n \n \n )}\n \n + Add Liquidity\n \n \n \n Trade\n \n \n \n \n \n \n {!below1080 && (\n <>\n \n {price}\n \n 0 ? '#0EC080' : priceChangeUSD < 0 ? '#FF6D6D' : '#666680',\n padding: '8px 15px',\n color: '#FFFFFF',\n borderRadius: '6px',\n textAlign: 'center',\n fontWeight: 'bold',\n }}\n >\n {priceChangeUSD?.toFixed(2)}%\n \n \n )}\n \n <>\n {!below1080 && (\n \n {/* \n Token Stats\n */}\n {usingUtVolume && (\n \n \n \n )}\n \n )}\n \n {below1080 && price && (\n \n \n \n Price\n
\n \n \n {' '}\n \n {price}\n \n {priceChange}\n \n \n \n )}\n \n \n \n Total Liquidity\n
\n \n \n \n {liquidity}\n \n {liquidityChange}\n \n \n \n \n \n \n Volume (24hrs)\n
\n \n \n \n {volume}\n \n {volumeChange}\n \n \n \n\n \n \n \n Transactions (24hrs)\n
\n \n \n \n {oneDayTxns ? localNumber(oneDayTxns) : 0}\n \n {txnChangeFormatted}\n \n \n \n \n \n \n \n \n\n \n Top Pairs\n \n setUseTracked(!useTracked)}\n text={'Hide untracked pairs'}\n />\n \n \n \n \n {address && fetchedPairsList ? (\n \n ) : (\n \n )}\n \n \n Transactions
\n \n \n {transactions ? : }\n \n <>\n \n Token Information{' '}\n \n \n \n \n Symbol\n \n \n \n \n \n Name\n \n \n \n \n \n Address\n \n \n {address.slice(0, 8) + '...' + address.slice(36, 42)}\n \n \n \n \n \n \n View on PolygonScan ↗\n \n \n \n \n \n \n \n \n \n \n )\n}\n\nexport default withRouter(TokenPage)\n","import React, { useState } from 'react'\nimport { ApolloProvider } from 'react-apollo'\nimport { BrowserRouter, Redirect, Route, Switch } from 'react-router-dom'\nimport styled from 'styled-components'\nimport { QueryParamProvider } from 'use-query-params'\nimport { client } from './apollo/client'\nimport GoogleAnalyticsReporter from './components/analytics/GoogleAnalyticsReporter'\nimport LocalLoader from './components/LocalLoader'\nimport { PAIR_BLACKLIST, TOKEN_BLACKLIST } from './constants'\nimport { useLatestBlocks } from './contexts/Application'\nimport { useGlobalChartData, useGlobalData } from './contexts/GlobalData'\nimport AccountPage from './pages/AccountPage'\nimport AllPairsPage, { PairTabs } from './pages/AllPairsPage'\nimport AllPoolsPage from './pages/AllPoolsPage'\nimport AllTokensPage from './pages/AllTokensPage'\nimport PairPage from './pages/PairPage'\nimport PoolPage from './pages/PoolPage'\nimport TokenPage from './pages/TokenPage'\nimport { isAddress } from './utils'\n\nconst AppWrapper = styled.div``\nconst ContentWrapper = styled.div`\n padding-top: 50px;\n\n @media screen and (max-width: 1080px) {\n max-width: 100vw;\n overflow: hidden;\n }\n`\n\nconst Center = styled.div`\n z-index: 9999;\n transition: width 0.25s ease;\n background-color: ${({ theme }) => theme.onlyLight};\n`\n\nconst WarningWrapper = styled.div`\n width: 100%;\n display: flex;\n justify-content: center;\n`\n\nconst WarningBanner = styled.div`\n background-color: #ff6871;\n padding: 1.5rem;\n color: white;\n width: 100%;\n text-align: center;\n font-weight: 500;\n`\n\n/**\n * Wrap the component with the header and sidebar pinned tab\n */\nconst LayoutWrapper = ({ children, savedOpen, setSavedOpen }) => {\n return (\n <>\n \n
{children}
\n
\n \n )\n}\n\nconst BLOCK_DIFFERENCE_THRESHOLD = 30\n\nfunction App() {\n const [savedOpen, setSavedOpen] = useState(false)\n\n const globalData = useGlobalData()\n const globalChartData = useGlobalChartData()\n const [latestBlock, headBlock] = useLatestBlocks()\n\n // show warning\n const showWarning = headBlock && latestBlock ? headBlock - latestBlock > BLOCK_DIFFERENCE_THRESHOLD : false\n\n return (\n \n \n {showWarning && (\n \n \n {`Warning: The data on this site has only synced to Ethereum block ${latestBlock} (out of ${headBlock}). Please check back soon.`}\n \n \n )}\n {globalData &&\n Object.keys(globalData).length > 0 &&\n globalChartData &&\n Object.keys(globalChartData).length > 0 ? (\n \n \n \n \n {\n if (\n isAddress(match.params.tokenAddress?.toLowerCase()) &&\n !Object.keys(TOKEN_BLACKLIST).includes(match.params.tokenAddress?.toLowerCase())\n ) {\n return (\n \n \n \n )\n } else {\n return \n }\n }}\n />\n \n \n \n \n \n \n \n \n \n \n {\n if (\n isAddress(match.params.pairAddress?.toLowerCase()) &&\n !Object.keys(PAIR_BLACKLIST).includes(match.params.pairAddress?.toLowerCase())\n ) {\n return (\n \n \n \n )\n } else {\n return \n }\n }}\n />\n {\n if (\n isAddress(match.params.pairAddress?.toLowerCase()) &&\n !Object.keys(PAIR_BLACKLIST).includes(match.params.pairAddress?.toLowerCase())\n ) {\n return (\n \n \n \n )\n } else {\n return \n }\n }}\n />\n {\n if (isAddress(match.params.accountAddress?.toLowerCase())) {\n return (\n \n \n \n )\n } else {\n return \n }\n }}\n />\n\n \n \n \n \n \n \n \n \n \n \n\n \n \n \n \n \n\n {/* \n \n \n \n */}\n\n \n \n \n \n ) : (\n \n )}\n \n \n )\n}\n\nexport default App\n","import React from 'react'\nimport ReactDOM from 'react-dom'\nimport ReactGA from 'react-ga'\nimport { isMobile } from 'react-device-detect'\nimport ThemeProvider, { GlobalStyle } from './Theme'\nimport LocalStorageContextProvider, { Updater as LocalStorageContextUpdater } from './contexts/LocalStorage'\nimport TokenDataContextProvider, { Updater as TokenDataContextUpdater } from './contexts/TokenData'\nimport GlobalDataContextProvider from './contexts/GlobalData'\nimport PairDataContextProvider, { Updater as PairDataContextUpdater } from './contexts/PairData'\nimport SecTokenContextProvider, { Updater as SecTokenUpdater } from './contexts/SecTokens'\nimport ApplicationContextProvider from './contexts/Application'\nimport UserContextProvider from './contexts/User'\nimport App from './App'\n\n// initialize GA\nconst GOOGLE_ANALYTICS_ID = process.env.REACT_APP_GOOGLE_ANALYTICS_ID\n\nif (typeof GOOGLE_ANALYTICS_ID === 'string') {\n ReactGA.initialize(GOOGLE_ANALYTICS_ID, {\n gaOptions: {\n storage: 'none',\n storeGac: false,\n },\n })\n ReactGA.set({\n anonymizeIp: true,\n customBrowserType: !isMobile\n ? 'desktop'\n : 'web3' in window || 'ethereum' in window\n ? 'mobileWeb3'\n : 'mobileRegular',\n })\n} else {\n ReactGA.initialize('test', { testMode: true, debug: true })\n}\n\nfunction ContextProviders({ children }) {\n return (\n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n )\n}\n\nfunction Updaters() {\n return (\n <>\n \n \n \n \n \n )\n}\n\nReactDOM.render(\n \n \n \n <>\n \n \n \n \n ,\n document.getElementById('root')\n)\n"],"sourceRoot":""}