File tree Expand file tree Collapse file tree 2 files changed +26
-3
lines changed
governance/pyth_staking_sdk/src Expand file tree Collapse file tree 2 files changed +26
-3
lines changed Original file line number Diff line number Diff line change @@ -435,7 +435,7 @@ export const reassignPublisherAccount = async (
435435 targetAccount : PublicKey ,
436436 publisherKey : PublicKey ,
437437) : Promise < void > => {
438- return client . setPublisherStakeAccount (
438+ return client . reassignPublisherStakeAccount (
439439 publisherKey ,
440440 stakeAccount ,
441441 targetAccount ,
@@ -447,7 +447,7 @@ export const optPublisherOut = async (
447447 stakeAccount : PublicKey ,
448448 publisherKey : PublicKey ,
449449) : Promise < void > => {
450- await client . setPublisherStakeAccount ( publisherKey , stakeAccount , undefined ) ;
450+ await client . removePublisherStakeAccount ( stakeAccount , publisherKey ) ;
451451} ;
452452
453453const MOCK_DELAY = 500 ;
Original file line number Diff line number Diff line change @@ -644,7 +644,7 @@ export class PythStakingClient {
644644 } ;
645645 }
646646
647- public async setPublisherStakeAccount (
647+ async setPublisherStakeAccount (
648648 publisher : PublicKey ,
649649 stakeAccountPositions : PublicKey ,
650650 newStakeAccountPositions : PublicKey | undefined ,
@@ -661,4 +661,27 @@ export class PythStakingClient {
661661 await sendTransaction ( [ instruction ] , this . connection , this . wallet ) ;
662662 return ;
663663 }
664+
665+ public async reassignPublisherStakeAccount (
666+ publisher : PublicKey ,
667+ stakeAccountPositions : PublicKey ,
668+ newStakeAccountPositions : PublicKey ,
669+ ) {
670+ return this . setPublisherStakeAccount (
671+ publisher ,
672+ stakeAccountPositions ,
673+ newStakeAccountPositions ,
674+ ) ;
675+ }
676+
677+ public async removePublisherStakeAccount (
678+ publisher : PublicKey ,
679+ stakeAccountPositions : PublicKey ,
680+ ) {
681+ return this . setPublisherStakeAccount (
682+ publisher ,
683+ stakeAccountPositions ,
684+ undefined ,
685+ ) ;
686+ }
664687}
You can’t perform that action at this time.
0 commit comments