File tree Expand file tree Collapse file tree 2 files changed +23
-25
lines changed
governance/xc_admin/packages/xc_admin_frontend/components/tabs Expand file tree Collapse file tree 2 files changed +23
-25
lines changed Original file line number Diff line number Diff line change @@ -508,22 +508,6 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
508508 )
509509 }
510510
511- // check if minPub has changed
512- if (
513- prev . priceAccounts [ 0 ] . minPub !== newChanges . priceAccounts [ 0 ] . minPub
514- ) {
515- // create update product account instruction
516- instructions . push (
517- await pythProgramClient . methods
518- . setMinPub ( newChanges . priceAccounts [ 0 ] . minPub , [ 0 , 0 , 0 ] )
519- . accounts ( {
520- priceAccount : new PublicKey ( prev . priceAccounts [ 0 ] . address ) ,
521- fundingAccount,
522- } )
523- . instruction ( )
524- )
525- }
526-
527511 // check if maxLatency has changed
528512 if (
529513 prev . priceAccounts [ 0 ] . maxLatency !==
@@ -584,6 +568,22 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
584568 )
585569 await initPublisherInPriceStore ( publisherPubKey )
586570 }
571+
572+ // check if minPub has changed
573+ if (
574+ prev . priceAccounts [ 0 ] . minPub !== newChanges . priceAccounts [ 0 ] . minPub
575+ ) {
576+ // create update product account instruction
577+ instructions . push (
578+ await pythProgramClient . methods
579+ . setMinPub ( newChanges . priceAccounts [ 0 ] . minPub , [ 0 , 0 , 0 ] )
580+ . accounts ( {
581+ priceAccount : new PublicKey ( prev . priceAccounts [ 0 ] . address ) ,
582+ fundingAccount,
583+ } )
584+ . instruction ( )
585+ )
586+ }
587587 }
588588 }
589589
Original file line number Diff line number Diff line change @@ -55,15 +55,13 @@ export const ProposalRow = ({
5555
5656 // set proposal time
5757 if ( ! time ) {
58- connection
59- . getConfirmedSignaturesForAddress2 ( proposal . publicKey )
60- . then ( ( txs ) => {
61- if ( isCancelled ) return
62- const firstBlockTime = txs ?. [ txs . length - 1 ] ?. blockTime
63- if ( firstBlockTime ) {
64- setTime ( new Date ( firstBlockTime * 1000 ) )
65- }
66- } )
58+ connection . getSignaturesForAddress ( proposal . publicKey ) . then ( ( txs ) => {
59+ if ( isCancelled ) return
60+ const firstBlockTime = txs ?. [ txs . length - 1 ] ?. blockTime
61+ if ( firstBlockTime ) {
62+ setTime ( new Date ( firstBlockTime * 1000 ) )
63+ }
64+ } )
6765 }
6866
6967 // calculate instructions summary
You can’t perform that action at this time.
0 commit comments