Skip to content

Commit a12eb7b

Browse files
authored
fix(xc-admin-frontend): pass pubkey to initPublisher method (#2051)
1 parent d1d73d4 commit a12eb7b

File tree

1 file changed

+6
-4
lines changed
  • governance/xc_admin/packages/xc_admin_frontend/components/tabs

1 file changed

+6
-4
lines changed

governance/xc_admin/packages/xc_admin_frontend/components/tabs/General.tsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,16 +396,17 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
396396

397397
// create add publisher instruction if there are any publishers
398398
for (const publisherKey of newChanges.priceAccounts[0].publishers) {
399+
const publisherPubKey = new PublicKey(publisherKey)
399400
instructions.push(
400401
await pythProgramClient.methods
401-
.addPublisher(new PublicKey(publisherKey))
402+
.addPublisher(publisherPubKey)
402403
.accounts({
403404
fundingAccount,
404405
priceAccount: priceAccountKey,
405406
})
406407
.instruction()
407408
)
408-
await initPublisher(publisherKey)
409+
await initPublisher(publisherPubKey)
409410
}
410411

411412
// create set min publisher instruction if there are any publishers
@@ -565,16 +566,17 @@ const General = ({ proposerServerUrl }: { proposerServerUrl: string }) => {
565566

566567
// add instructions to add new publishers
567568
for (const publisherKey of publisherKeysToAdd) {
569+
const publisherPubKey = new PublicKey(publisherKey)
568570
instructions.push(
569571
await pythProgramClient.methods
570-
.addPublisher(new PublicKey(publisherKey))
572+
.addPublisher(publisherPubKey)
571573
.accounts({
572574
fundingAccount,
573575
priceAccount: new PublicKey(prev.priceAccounts[0].address),
574576
})
575577
.instruction()
576578
)
577-
await initPublisher(publisherKey)
579+
await initPublisher(publisherPubKey)
578580
}
579581
}
580582
}

0 commit comments

Comments
 (0)