Skip to content

Commit 5039e5c

Browse files
authored
support updating transferable, cancelable flags (#290)
* support updating transferable flags * expose cancelable by sender
1 parent 02c50d0 commit 5039e5c

File tree

12 files changed

+43
-8
lines changed

12 files changed

+43
-8
lines changed

lerna.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"packages": [
33
"packages/*"
44
],
5-
"version": "8.0.2",
5+
"version": "8.1.0",
66
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
77
"command": {
88
"run": {

packages/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/common",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "Common utilities and types used by streamflow packages.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"type": "module",

packages/distributor/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/distributor",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "JavaScript SDK to interact with Streamflow Airdrop protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/cjs/index.cjs",

packages/eslint-config/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/eslint-config",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "ESLint configuration for Streamflow protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"engines": {

packages/launchpad/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/launchpad",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "JavaScript SDK to interact with Streamflow Launchpad protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/cjs/index.cjs",

packages/staking/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/staking",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "JavaScript SDK to interact with Streamflow Staking protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/cjs/index.cjs",

packages/stream/common/contractUtils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,6 @@ export const isTokenLock = (streamData: {
110110
!streamData.cancelableBySender &&
111111
!streamData.cancelableByRecipient &&
112112
!streamData.transferableBySender &&
113-
!streamData.transferableByRecipient &&
114113
(isCliffCloseToDepositedAmount(streamData) ||
115114
isDynamicLock(streamData.minPrice, streamData.maxPrice, streamData.minPercentage, streamData.maxPercentage))
116115
);

packages/stream/common/types.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ export interface IUpdateData extends IInteractData {
7474
enableAutomaticWithdrawal?: boolean;
7575
withdrawFrequency?: BN;
7676
amountPerPeriod?: BN;
77+
78+
// supported only on Solana
79+
transferableBySender?: boolean;
80+
transferableByRecipient?: boolean;
81+
cancelableBySender?: boolean;
7782
}
7883

7984
export type ICancelData = IInteractData;

packages/stream/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@streamflow/stream",
3-
"version": "8.0.2",
3+
"version": "8.1.0",
44
"description": "JavaScript SDK to interact with Streamflow protocol.",
55
"homepage": "https://github.com/streamflow-finance/js-sdk/",
66
"main": "./dist/cjs/index.cjs",

packages/stream/solana/instructionTypes.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ export interface IUpdateStreamLayout {
9494
enable_automatic_withdrawal?: number;
9595
withdraw_frequency?: Uint8Array;
9696
amount_per_period?: Uint8Array;
97+
transferable_by_sender?: number;
98+
transferable_by_recipient?: number;
99+
cancelable_by_sender?: number;
97100
}
98101

99102
export interface ITopupStreamLayout {

0 commit comments

Comments
 (0)