File tree Expand file tree Collapse file tree
packages/apps/job-launcher Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,7 +62,8 @@ export const JobTable = ({
6262 {
6363 id : 'fundAmount' ,
6464 label : 'Fund Amount' ,
65- render : ( { fundAmount } ) => `${ fundAmount } HMT` ,
65+ render : ( { fundAmount, currency } ) =>
66+ `${ Number ( fundAmount ) } ${ currency . toUpperCase ( ) } ` ,
6667 } ,
6768 { id : 'status' , label : 'Status' } ,
6869 {
Original file line number Diff line number Diff line change @@ -133,11 +133,11 @@ export default function JobDetail() {
133133 />
134134 < CardTextRow
135135 label = "Balance"
136- value = { `${ data . details . balance } HMT ` }
136+ value = { `${ data . details . balance } ${ ( data . details . currency ?? '' ) . toUpperCase ( ) } ` }
137137 />
138138 < CardTextRow
139- label = "Paid Out HMT "
140- value = { `${ data . details . paidOut . toString ( ) } HMT ` }
139+ label = "Paid Out"
140+ value = { `${ data . details . paidOut . toString ( ) } ${ data . details . currency ?? '' . toUpperCase ( ) } ` }
141141 />
142142 </ Stack >
143143 </ CardContainer >
@@ -180,7 +180,7 @@ export default function JobDetail() {
180180 />
181181 < CardTextRow
182182 label = "Fund Amount"
183- value = { `${ data . manifest . fundAmount . toString ( ) } HMT ` }
183+ value = { `${ data . manifest . fundAmount . toString ( ) } ${ data . details . currency ?? '' . toUpperCase ( ) } ` }
184184 />
185185 </ Stack >
186186 </ Grid >
Original file line number Diff line number Diff line change @@ -263,6 +263,7 @@ export type JobDetailsResponse = {
263263 manifestHash : string ;
264264 balance : number ;
265265 paidOut : number ;
266+ currency ?: string ;
266267 status : string ;
267268 } ;
268269 manifest : {
Original file line number Diff line number Diff line change @@ -328,6 +328,12 @@ export class CommonDetails {
328328 @Min ( 0 )
329329 public paidOut : number ;
330330
331+ @ApiProperty ( {
332+ description : 'Currency of the job' ,
333+ } )
334+ @IsEnumCaseInsensitive ( EscrowFundToken )
335+ public currency ?: EscrowFundToken ;
336+
331337 @ApiProperty ( {
332338 description : 'Number of tasks (optional)' ,
333339 name : 'amount_of_tasks' ,
@@ -477,6 +483,9 @@ export class JobListDto {
477483 @ApiProperty ( { name : 'fund_amount' } )
478484 public fundAmount : number ;
479485
486+ @ApiProperty ( )
487+ public currency : EscrowFundToken ;
488+
480489 @ApiProperty ( )
481490 public status : JobStatus ;
482491}
Original file line number Diff line number Diff line change @@ -1283,6 +1283,7 @@ export class JobService {
12831283 escrowAddress : job . escrowAddress ,
12841284 network : NETWORKS [ job . chainId as ChainId ] ! . title ,
12851285 fundAmount : job . fundAmount ,
1286+ currency : job . token as EscrowFundToken ,
12861287 status : job . status ,
12871288 } ;
12881289 } ) ;
@@ -1615,6 +1616,7 @@ export class JobService {
16151616 manifestHash,
16161617 balance : Number ( ethers . formatEther ( escrow ?. balance || 0 ) ) ,
16171618 paidOut : Number ( ethers . formatEther ( escrow ?. amountPaid || 0 ) ) ,
1619+ currency : jobEntity . token as EscrowFundToken ,
16181620 status : jobEntity . status ,
16191621 failedReason : jobEntity . failedReason ,
16201622 } ,
You can’t perform that action at this time.
0 commit comments