Skip to content

Commit 69ea428

Browse files
committed
go
1 parent e93943a commit 69ea428

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

apps/staking/src/api.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

453453
const MOCK_DELAY = 500;

governance/pyth_staking_sdk/src/pyth-staking-client.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)