Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
Add basic test for list streams, get single stream and get withdraw-a…
Browse files Browse the repository at this point in the history
…ble amount | export getter methods for easier testing
  • Loading branch information
MexicanSparker committed Aug 30, 2022
1 parent 49da751 commit 4102677
Show file tree
Hide file tree
Showing 5 changed files with 291 additions and 153 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mean-dao/msp",
"version": "3.0.0-alpha.6",
"version": "3.0.0-alpha.7",
"description": "MSP Typescript SDK",
"private": false,
"main": "lib/index.js",
Expand Down
10 changes: 2 additions & 8 deletions src/msp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1344,20 +1344,14 @@ export class MSP {
];
}

/**
* program: Program<Msp>
* treasurer?: PublicKey | undefined
* treasury?: PublicKey | undefined
* beneficiary?: PublicKey | undefined
* category?: Category | undefined
* subCategory?: SubCategory | undefined
*/
const streams = await listStreams(
this.program,
undefined,
vestingTreasury,
undefined,
Category.vesting
);

let totalAllocation = new BN(0);
let streamRate = new BN(0);
for (const stream of streams) {
Expand Down
3 changes: 1 addition & 2 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ export interface ListStreamParams {
treasury?: PublicKey | undefined;
beneficiary?: PublicKey | undefined;
commitment?: Commitment;
friendly?: boolean;
category?: Category;
subCategory?: SubCategory;
}
Expand Down Expand Up @@ -260,7 +259,7 @@ export type Stream = {
feePayedByTreasurer: boolean;
category: Category;
subCategory: SubCategory;
data: any;
data?: any;
};

/**
Expand Down
Loading

0 comments on commit 4102677

Please sign in to comment.