@streamflow/stream 9.0.3 → 9.0.4
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/dist/cjs/index.cjs +14 -4
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/solana/index.cjs +14 -4
- package/dist/cjs/solana/index.cjs.map +1 -1
- package/dist/esm/index.js +14 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/solana/index.js +14 -4
- package/dist/esm/solana/index.js.map +1 -1
- package/package.json +4 -4
package/dist/esm/solana/index.js
CHANGED
|
@@ -3561,10 +3561,20 @@ var SolanaStreamClient = class extends BaseStreamClient {
|
|
|
3561
3561
|
const accounts = await this.connection.getProgramAccounts(this.programId, {
|
|
3562
3562
|
filters
|
|
3563
3563
|
});
|
|
3564
|
-
|
|
3565
|
-
|
|
3566
|
-
|
|
3567
|
-
|
|
3564
|
+
const mapped = await Promise.all(
|
|
3565
|
+
accounts.map(async ({ pubkey, account }) => {
|
|
3566
|
+
const stream = decodeStream(account.data);
|
|
3567
|
+
if (this.isAlignedUnlock(pubkey, stream.sender)) {
|
|
3568
|
+
const alignedProxy = await this.alignedProxyProgram.account.contract.fetch(
|
|
3569
|
+
deriveContractPDA(this.alignedProxyProgram.programId, pubkey)
|
|
3570
|
+
);
|
|
3571
|
+
invariant(alignedProxy, "Couldn't get aligned proxy account info");
|
|
3572
|
+
return { publicKey: pubkey, account: new AlignedContract(stream, alignedProxy) };
|
|
3573
|
+
}
|
|
3574
|
+
return { publicKey: pubkey, account: new Contract(stream) };
|
|
3575
|
+
})
|
|
3576
|
+
);
|
|
3577
|
+
return mapped;
|
|
3568
3578
|
}
|
|
3569
3579
|
/**
|
|
3570
3580
|
* Attempts updating the stream auto withdrawal params and amount per period
|