diff --git a/lerna.json b/lerna.json index fb33258c..ac9280c8 100644 --- a/lerna.json +++ b/lerna.json @@ -2,6 +2,6 @@ "packages": [ "packages/*" ], - "version": "5.6.1", + "version": "5.6.2", "$schema": "node_modules/lerna/schemas/lerna-schema.json" } \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index ccba9b1c..1483914e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22169,7 +22169,7 @@ }, "packages/stream": { "name": "@streamflow/stream", - "version": "5.6.0", + "version": "5.6.2", "dependencies": { "@manahippo/aptos-wallet-adapter": "1.0.6", "@mysten/sui.js": "^0.40.0", diff --git a/packages/stream/aptos/StreamClient.ts b/packages/stream/aptos/StreamClient.ts index e905fb6d..78c946d2 100644 --- a/packages/stream/aptos/StreamClient.ts +++ b/packages/stream/aptos/StreamClient.ts @@ -260,10 +260,11 @@ export default class AptosStreamClient extends BaseStreamClient { return multipleStreamData.recipients.map((recipient) => { const acc = new AptosAccount(); // Generate random address as seeds for deriving "escrow" account const seeds = acc.address(); - const metadataId = AptosAccount.getResourceAccountAddress( - wallet.address, - seeds.toUint8Array() - ); + const encoder = new TextEncoder(); + // A workaround to pass a String in seeds because different wallets seem + // to serialize vector differently and String should be safer that Uin8Array + const actualSeeds = encoder.encode(seeds.hex()); + const metadataId = AptosAccount.getResourceAccountAddress(wallet.address, actualSeeds); return [ metadataId.toString(), { @@ -271,7 +272,7 @@ export default class AptosStreamClient extends BaseStreamClient { function: `${this.programId}::protocol::create`, type_arguments: [multipleStreamData.tokenId], arguments: [ - seeds.toUint8Array(), + seeds.hex(), recipient.amount.toString(), multipleStreamData.period, recipient.amountPerPeriod.toString(), diff --git a/packages/stream/package.json b/packages/stream/package.json index 96b57b65..2da9d4db 100644 --- a/packages/stream/package.json +++ b/packages/stream/package.json @@ -1,6 +1,6 @@ { "name": "@streamflow/stream", - "version": "5.6.1", + "version": "5.6.2", "description": "JavaScript SDK to interact with Streamflow protocol.", "main": "dist/index.js", "homepage": "https://github.com/streamflow-finance/js-sdk/",