Skip to content

Commit

Permalink
fix ata checks (set from string and not from object) (#125)
Browse files Browse the repository at this point in the history
* fix ata checks (set from string and not from object)
  • Loading branch information
Yolley authored Jan 16, 2024
1 parent 441cd7b commit f2c485c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/stream/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@streamflow/stream",
"version": "5.9.7",
"version": "5.9.8",
"description": "JavaScript SDK to interact with Streamflow protocol.",
"main": "dist/index.js",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
Expand Down
7 changes: 4 additions & 3 deletions packages/stream/solana/StreamClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -957,18 +957,18 @@ export default class SolanaStreamClient extends BaseStreamClient {
if (!checkTokenAccounts) {
return;
}
const checkedKeys: Set<PublicKey> = new Set();
const checkedKeys: Set<string> = new Set();
// TODO: optimize fetching and maps/arrays
const accountArrays = [
[data.sender, data.senderTokens],
[data.recipient, data.recipientTokens],
[data.partner, data.partnerTokens],
[data.streamflowTreasury, data.streamflowTreasuryTokens],
].filter((value) => {
if (checkedKeys.has(value[1])) {
if (checkedKeys.has(value[1].toBase58())) {
return false;
}
checkedKeys.add(value[1]);
checkedKeys.add(value[1].toBase58());
return true;
});
const response = await this.connection.getMultipleAccountsInfo(
Expand All @@ -988,6 +988,7 @@ export default class SolanaStreamClient extends BaseStreamClient {
);
}
}
throw new Error();
}

/**
Expand Down

0 comments on commit f2c485c

Please sign in to comment.