@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/lib/stake.browser.js +4 -4
- package/lib/stake.browser.js.map +1 -1
- package/lib/stake.d.ts +3 -3
- package/lib/stake.js +4 -4
- package/lib/stake.js.map +1 -1
- package/lib/stake.m.js +4 -4
- package/lib/stake.m.js.map +1 -1
- package/package.json +1 -1
- package/src/networks/ethereum/ethereum.ts +3 -4
- package/src/networks/solana/solana.ts +3 -2
- package/src/types.ts +1 -1
package/package.json
CHANGED
|
@@ -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
|
|
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?:
|
|
277
|
+
async getPendingWithdraws(address?: string): Promise<WithdrawReceipt[]> {
|
|
278
278
|
this.ensureUser();
|
|
279
|
-
const owner = address
|
|
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>;
|