@@ -2,7 +2,7 @@ import { SubgraphDeploymentID, formatGRT, commify } from '@graphprotocol/common-
22import yaml from 'yaml'
33import { GluegunPrint } from 'gluegun'
44import { table , getBorderCharacters } from 'table'
5- import { OutputFormat , parseOutputFormat , pickFields , wrapCell } from './command-helpers'
5+ import { OutputFormat , parseOutputFormat , pickFields , wrapCell , formatDecimals } from './command-helpers'
66import { IndexerManagementClient } from '@graphprotocol/indexer-common'
77import gql from 'graphql-tag'
88import {
@@ -151,7 +151,7 @@ export const displayIndexerAllocations = (
151151 : table (
152152 [
153153 Object . keys ( allocations [ 0 ] ) ,
154- ...allocations . map ( allocation => Object . values ( allocation ) . map ( value => wrapCell ( value , wrapWidth ) ) ) ,
154+ ...allocations . map ( allocation => Object . values ( allocation ) . map ( formatDecimals ) . map ( value => wrapCell ( value , wrapWidth ) ) ) ,
155155 ] ,
156156 {
157157 border : getBorderCharacters ( 'norc' ) ,
@@ -167,7 +167,7 @@ export const displayIndexerAllocation = (
167167 ? JSON . stringify ( allocation , null , 2 )
168168 : outputFormat === OutputFormat . Yaml
169169 ? yaml . stringify ( allocation ) . trim ( )
170- : table ( [ Object . keys ( allocation ) , Object . values ( allocation ) . map ( value => wrapCell ( value , wrapWidth ) ) ] , {
170+ : table ( [ Object . keys ( allocation ) , Object . values ( allocation ) . map ( formatDecimals ) . map ( value => wrapCell ( value , wrapWidth ) ) ] , {
171171 border : getBorderCharacters ( 'norc' ) ,
172172 } ) . trim ( )
173173
0 commit comments