@wireio/stake 2.4.2 → 2.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wireio/stake",
3
- "version": "2.4.2",
3
+ "version": "2.4.3",
4
4
  "description": "LIQ Staking Module for Wire Network",
5
5
  "homepage": "https://gitea.gitgo.app/Wire/sdk-stake",
6
6
  "license": "FSL-1.1-Apache-2.0",
@@ -107,11 +107,10 @@ export class EthereumStakingClient implements IStakingClient {
107
107
  * @param amount Amount in wei (or something convertible to BigNumber).
108
108
  * @returns transaction hash
109
109
  */
110
- async getPendingWithdraws(): Promise<WithdrawReceipt[]> {
110
+ async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
111
111
  this.ensureUser();
112
- const address = await this.address!;
113
-
114
- return await this.receiptClient.fetchWithdrawReceipts(address);
112
+ const owner = address ?? await this.address!;
113
+ return await this.receiptClient.fetchWithdrawReceipts(owner);
115
114
  }
116
115
 
117
116
  /**
@@ -274,9 +274,10 @@ export class SolanaStakingClient implements IStakingClient {
274
274
  * Enumerate withdrawal receipt NFTs held by the user (queued/ready/claimed).
275
275
  * Mirrors the ETH getPendingWithdraws helper for UI parity.
276
276
  */
277
- async getPendingWithdraws(address?: SolPubKey): Promise<WithdrawReceipt[]> {
277
+ async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
278
278
  this.ensureUser();
279
- const owner = address ?? this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
279
+ const owner = address ? new SolPubKey(address) :
280
+ this.squadsVaultPDA ?? this.anchor.wallet.publicKey;
280
281
  return await this.convertClient.fetchWithdrawReceipts(owner);
281
282
  }
282
283
 
package/src/types.ts CHANGED
@@ -47,7 +47,7 @@ export interface IStakingClient {
47
47
  claimLiqsolRewards?(): Promise<string>
48
48
 
49
49
  /** Enumerate withdrawal receipt NFTs held by the user (queued/ready/claimed). */
50
- getPendingWithdraws(): Promise<WithdrawReceipt[]>
50
+ getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]>
51
51
 
52
52
  /** Fetch the complete user portfolio */
53
53
  getPortfolio(): Promise<Portfolio | null>;