Skip to content

Commit

Permalink
pass checkTokenAccounts flag (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yolley authored Dec 27, 2023
1 parent 58212d2 commit 7379783
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"packages": [
"packages/*"
],
"version": "5.9.1",
"version": "5.9.2",
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
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.1",
"version": "5.9.2",
"description": "JavaScript SDK to interact with Streamflow protocol.",
"main": "dist/index.js",
"homepage": "https://github.com/streamflow-finance/js-sdk/",
Expand Down
8 changes: 4 additions & 4 deletions packages/stream/solana/StreamClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ export default class SolanaStreamClient extends BaseStreamClient {
*/
public async withdraw(
{ id, amount }: IWithdrawData,
{ invoker }: IInteractStreamSolanaExt
{ invoker, checkTokenAccounts }: IInteractStreamSolanaExt
): Promise<ITransactionResult> {
if (!invoker.publicKey) {
throw new Error("Invoker's PublicKey is not available, check passed wallet adapter!");
Expand All @@ -479,7 +479,7 @@ export default class SolanaStreamClient extends BaseStreamClient {

const streamflowTreasuryTokens = await ata(data.mint, STREAMFLOW_TREASURY_PUBLIC_KEY);
const partnerTokens = await ata(data.mint, data.partner);
await this.checkAssociatedTokenAccounts(data, { invoker }, ixs);
await this.checkAssociatedTokenAccounts(data, { invoker, checkTokenAccounts }, ixs);

ixs.push(
withdrawStreamInstruction(amount, this.programId, {
Expand Down Expand Up @@ -516,7 +516,7 @@ export default class SolanaStreamClient extends BaseStreamClient {
*/
public async cancel(
{ id }: ICancelData,
{ invoker }: IInteractStreamSolanaExt
{ invoker, checkTokenAccounts }: IInteractStreamSolanaExt
): Promise<ITransactionResult> {
if (!invoker.publicKey) {
throw new Error("Invoker's PublicKey is not available, check passed wallet adapter!");
Expand All @@ -534,7 +534,7 @@ export default class SolanaStreamClient extends BaseStreamClient {
const partnerTokens = await ata(data.mint, data.partner);

const ixs: TransactionInstruction[] = [];
await this.checkAssociatedTokenAccounts(data, { invoker }, ixs);
await this.checkAssociatedTokenAccounts(data, { invoker, checkTokenAccounts }, ixs);

ixs.push(
cancelStreamInstruction(this.programId, {
Expand Down

0 comments on commit 7379783

Please sign in to comment.