@@ -386,6 +386,7 @@ export const snapshotDataToVolumeData = (
386386 chain : TrackerChain ,
387387 currency : TokenAmountType | Currency ,
388388 tokenPrices : TokenPrices ,
389+ period : PeriodOption ,
389390) => {
390391 const snapshots = getSnapshots ( data ) ;
391392 const { first, last } = getFirstAndLastSnapshot ( snapshots ) ;
@@ -411,7 +412,7 @@ export const snapshotDataToVolumeData = (
411412 let difference = new BigNumber ( 0 ) ;
412413 let differenceStandard = new BigNumber ( 0 ) ;
413414 let differenceQuote = new BigNumber ( 0 ) ;
414- if ( lastEntry && firstEntry ) {
415+ if ( lastEntry && firstEntry && period !== PeriodOption . ALL ) {
415416 differenceQuote = new BigNumber (
416417 getQuoteAmount ( lastEntry , currency , assetsData , tokenPrices ) ,
417418 ) . minus (
@@ -508,6 +509,7 @@ export const snapshotDataToAllChainVolumeData = (
508509 type : TrackerVolumeType ,
509510 currency : TokenAmountType | Currency ,
510511 tokenPrices : TokenPrices ,
512+ period : PeriodOption ,
511513) => {
512514 const assetsData = getAssetsData ( data ) ;
513515 let sum = new BigNumber ( 0 ) ;
@@ -519,6 +521,7 @@ export const snapshotDataToAllChainVolumeData = (
519521 chain ,
520522 currency ,
521523 tokenPrices ,
524+ period ,
522525 ) ;
523526 sum = sum . plus ( difference ) ;
524527 records = mergeAmountRecords ( assetsData , records , amountRecords ) ;
0 commit comments