@@ -264,10 +264,9 @@ const EventDetails = (props: IEventDetails) => {
264
264
) ;
265
265
}
266
266
case "UpdatedDelegation" : {
267
- // from, to, delta, shares, total
268
267
const from : string = props . data [ 0 ] ;
269
268
const to : string = props . data [ 1 ] ;
270
- const delta = props . data [ 2 ] ;
269
+ const increasedDelegation : boolean = props . data [ 2 ] ;
271
270
const shares = noDecimals (
272
271
withDecimals ( ethers . BigNumber . from ( props . data [ 3 ] ) . toString ( ) , 18 )
273
272
) ;
@@ -276,22 +275,19 @@ const EventDetails = (props: IEventDetails) => {
276
275
) ;
277
276
return (
278
277
< div className = "text-xs darken leading-4" >
278
+ < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span > { " " }
279
+ { increasedDelegation ? "more" : "fewer" } { " " }
279
280
{ from . replace ( "0x" , "" ) . toLowerCase ( ) === thisWallet
280
- ? " to "
281
- : " from " } { " " }
281
+ ? "to "
282
+ : "from" } { " " }
282
283
< InternalAddress
283
284
className = "text-xs"
284
285
inline = { true }
285
286
address = {
286
287
from . replace ( "0x" , "" ) . toLowerCase ( ) === thisWallet ? to : from
287
288
}
288
- /> { " " }
289
- < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span > .
289
+ /> { ". " }
290
290
< span className = { props . wide ? "ml-1" : "block" } >
291
- Delta:{ " " }
292
- < span className = "text-color-panel-title" >
293
- { JSON . stringify ( delta ) }
294
- </ span > { " " }
295
291
Total:{ " " }
296
292
< span className = "text-color-panel-title" > { toCurrency ( total ) } </ span > { " " }
297
293
</ span >
@@ -305,20 +301,15 @@ const EventDetails = (props: IEventDetails) => {
305
301
const shares = noDecimals (
306
302
withDecimals ( ethers . BigNumber . from ( props . data [ 2 ] ) . toString ( ) , 18 )
307
303
) ;
308
- const total = noDecimals (
309
- withDecimals ( ethers . BigNumber . from ( props . data [ 3 ] ) . toString ( ) , 18 )
310
- ) ;
311
304
return (
312
305
< div className = "text-xs darken leading-4" >
313
- { from === thisWallet ? " to " : " from " } { " " }
306
+ < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span > { " " }
307
+ { from === thisWallet ? "to" : "from" } { " " }
314
308
< InternalAddress
315
309
className = "text-xs"
316
310
inline = { true }
317
311
address = { from === thisWallet ? to : from }
318
- /> { " " }
319
- < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span >
320
- . Total:{ " " }
321
- < span className = "text-color-panel-title" > { toCurrency ( total ) } </ span > { " " }
312
+ />
322
313
</ div >
323
314
) ;
324
315
}
@@ -380,27 +371,14 @@ const EventDetails = (props: IEventDetails) => {
380
371
const userUnstaked = noDecimals (
381
372
withDecimals ( ethers . BigNumber . from ( props . data [ 2 ] ) . toString ( ) , 18 )
382
373
) ;
383
- const totalShares = noDecimals (
384
- withDecimals ( ethers . BigNumber . from ( props . data [ 3 ] ) . toString ( ) , 18 )
385
- ) ;
386
- const totalStake = noDecimals (
387
- withDecimals ( ethers . BigNumber . from ( props . data [ 4 ] ) . toString ( ) , 18 )
388
- ) ;
389
374
return (
390
375
< div className = "text-xs darken leading-4" >
391
376
< span className = "text-color-panel-title" > { toCurrency ( amount ) } </ span > { " " }
392
- tokens. Unstaked { " " }
377
+ tokens. Total being unstaked { " " }
393
378
< span className = "text-color-panel-title" >
394
379
{ toCurrency ( userUnstaked ) }
395
380
</ span > { " " }
396
- tokens. Total:{ " " }
397
- < span className = "text-color-panel-title" >
398
- { toCurrency ( totalStake ) }
399
- </ span > { " " }
400
- stake,{ " " }
401
- < span className = "text-color-panel-title" >
402
- { toCurrency ( totalShares ) }
403
- </ span > { ". " }
381
+ tokens.
404
382
</ div >
405
383
) ;
406
384
}
@@ -414,23 +392,15 @@ const EventDetails = (props: IEventDetails) => {
414
392
) ;
415
393
const tm = Number . parseInt ( ethers . BigNumber . from ( props . data [ 3 ] ) . toString ( ) ) ;
416
394
const dt = new Date ( tm * 1000 ) ;
417
- const userShares = noDecimals (
418
- withDecimals ( ethers . BigNumber . from ( props . data [ 4 ] ) . toString ( ) , 18 )
419
- ) ;
420
395
return (
421
396
< div className = "text-xs darken leading-4" >
422
397
< span className = "text-color-panel-title" > { toCurrency ( amount ) } </ span > { " " }
423
398
tokens,{ " " }
424
- < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span > { ". " }
399
+ < span className = "text-color-panel-title" > { toCurrency ( shares ) } </ span > { " " }
400
+ voting power{ ". " }
425
401
Scheduled for{ " " }
426
402
< span className = "text-color-panel-title" >
427
403
{ niceDateTime ( dt . toISOString ( ) ) }
428
- </ span > { " " }
429
- < span className = { props . wide ? "ml-1" : "block" } >
430
- User:{ " " }
431
- < span className = "text-color-panel-title" >
432
- { toCurrency ( userShares ) }
433
- </ span > { " " }
434
404
</ span >
435
405
</ div >
436
406
) ;
@@ -530,7 +500,7 @@ const EventDetails = (props: IEventDetails) => {
530
500
< span className = "text-color-panel-title" >
531
501
{ noDecimals ( toCurrency ( amount ) ) }
532
502
</ span > { " " }
533
- tokens,
503
+ tokens,{ " " }
534
504
< span className = "text-color-panel-title" >
535
505
{ noDecimals ( toCurrency ( userUnstaked ) ) }
536
506
</ span > { " " }
0 commit comments