From bbde1f7edca3a552ae59a0e5344f2d6476454f59 Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Fri, 8 Jul 2022 19:41:49 +0200 Subject: [PATCH 1/9] feat: add cancel stream function --- .../src/payment/erc777-stream.ts | 50 ++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index 01a627db93..3135e27660 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -15,7 +15,7 @@ export const resolverAddress = '0x913bbCFea2f347a24cfCA441d483E7CBAc8De3Db'; /** * Processes a transaction to pay an ERC777 stream Request. * @param request - * @param signerOrProvider the Web3 provider, or signer. Defaults to window.ethereum. + * @param signer the Web3 provider, or signer. Defaults to window.ethereum. * @param overrides optionally, override default transaction values, like gas. */ export async function payErc777StreamRequest( @@ -60,3 +60,51 @@ export async function payErc777StreamRequest( const batchCall = sf.batchCall([streamPayOp]); return batchCall.exec(superSigner); } +/** + * Processes a transaction to cancel an ERC777 stream paying a Request. + * @param request + * @param signer the Web3 provider, or signer. Defaults to window.ethereum. + * @param overrides optionally, override default transaction values, like gas. + */ +export async function cancelErc777StreamRequest( + request: ClientTypes.IRequestData, + signer: Signer, + overrides?: Overrides, +): Promise { + const id = getPaymentNetworkExtension(request)?.id; + if (id !== ExtensionTypes.ID.PAYMENT_NETWORK_ERC777_STREAM) { + throw new Error('Not a supported ERC777 payment network request'); + } + validateRequest(request, PaymentTypes.PAYMENT_NETWORK_ID.ERC777_STREAM); + const networkName = + request.currencyInfo.network === 'private' ? 'custom' : request.currencyInfo.network; + const sf = await Framework.create({ + networkName, + provider: signer.provider ?? getProvider(), + dataMode: request.currencyInfo.network === 'private' ? 'WEB3_ONLY' : undefined, + resolverAddress: request.currencyInfo.network === 'private' ? resolverAddress : undefined, + protocolReleaseVersion: request.currencyInfo.network === 'private' ? 'test' : undefined, + }); + const superSigner = sf.createSigner({ + signer: signer, + provider: signer.provider, + }); + const superToken = await sf.loadSuperToken(request.currencyInfo.value); + // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 + // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md + // - use expectedStartDate and recurence to compute offset between stop of invoicing and stop of streaming + // - stop fee streaming + const { paymentReference, paymentAddress } = getRequestPaymentValues(request); + // Superfluid payments of requests use the generic field `userData` to index payments. + // Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, + // in order to speed up the indexing and payment detection. + const streamPayOp = sf.cfaV1.deleteFlow({ + superToken: superToken.address, + sender: await signer.getAddress(), + receiver: paymentAddress, + userData: `0xbeefac${paymentReference}`, + overrides: overrides, + }); + const batchCall = sf.batchCall([streamPayOp]); + return batchCall.exec(superSigner); +} From f0eae90158a7baffd9477fe3befb8eea99d3674d Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Mon, 11 Jul 2022 20:28:35 +0200 Subject: [PATCH 2/9] feat: split logic into functions --- .../src/payment/erc777-stream.ts | 47 ++++++++++++++----- 1 file changed, 34 insertions(+), 13 deletions(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index 3135e27660..9666a12a55 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -11,6 +11,7 @@ import { import { Framework } from '@superfluid-finance/sdk-core'; export const resolverAddress = '0x913bbCFea2f347a24cfCA441d483E7CBAc8De3Db'; +export const userDataPrefix = '0xbeefac'; /** * Processes a transaction to pay an ERC777 stream Request. @@ -41,32 +42,42 @@ export async function payErc777StreamRequest( signer: signer, provider: signer.provider, }); - const superToken = await sf.loadSuperToken(request.currencyInfo.value); // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md + // Below are the SF actions to add in the BatchCall : // - use expectedStartDate to compute offset between start of invoicing and start of streaming // - start fee streaming + const streamPayOp = await startStream(sf, request, overrides); + const batchCall = sf.batchCall([streamPayOp]); + return batchCall.exec(superSigner); +} + +async function startStream( + sf: Framework, + request: ClientTypes.IRequestData, + overrides?: Overrides, +) { + const superToken = await sf.loadSuperToken(request.currencyInfo.value); const { paymentReference, paymentAddress, expectedFlowRate } = getRequestPaymentValues(request); // Superfluid payments of requests use the generic field `userData` to index payments. // Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, // in order to speed up the indexing and payment detection. - const streamPayOp = sf.cfaV1.createFlow({ + return sf.cfaV1.createFlow({ flowRate: expectedFlowRate ?? '0', receiver: paymentAddress, superToken: superToken.address, - userData: `0xbeefac${paymentReference}`, + userData: `${userDataPrefix}${paymentReference}`, overrides: overrides, }); - const batchCall = sf.batchCall([streamPayOp]); - return batchCall.exec(superSigner); } + /** - * Processes a transaction to cancel an ERC777 stream paying a Request. + * Processes a transaction to complete an ERC777 stream paying a Request. * @param request * @param signer the Web3 provider, or signer. Defaults to window.ethereum. * @param overrides optionally, override default transaction values, like gas. */ -export async function cancelErc777StreamRequest( +export async function completeErc777StreamRequest( request: ClientTypes.IRequestData, signer: Signer, overrides?: Overrides, @@ -89,22 +100,32 @@ export async function cancelErc777StreamRequest( signer: signer, provider: signer.provider, }); - const superToken = await sf.loadSuperToken(request.currencyInfo.value); // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md - // - use expectedStartDate and recurence to compute offset between stop of invoicing and stop of streaming + // Below are the SF actions to add in the BatchCall : + // - use expectedEndDate to compute offset between stop of invoicing and stop of streaming // - stop fee streaming + const streamPayOp = await stopStream(sf, signer, request, overrides); + const batchCall = sf.batchCall([streamPayOp]); + return batchCall.exec(superSigner); +} + +async function stopStream( + sf: Framework, + signer: Signer, + request: ClientTypes.IRequestData, + overrides?: Overrides, +) { + const superToken = await sf.loadSuperToken(request.currencyInfo.value); const { paymentReference, paymentAddress } = getRequestPaymentValues(request); // Superfluid payments of requests use the generic field `userData` to index payments. // Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, // in order to speed up the indexing and payment detection. - const streamPayOp = sf.cfaV1.deleteFlow({ + return sf.cfaV1.deleteFlow({ superToken: superToken.address, sender: await signer.getAddress(), receiver: paymentAddress, - userData: `0xbeefac${paymentReference}`, + userData: `${userDataPrefix}${paymentReference}`, overrides: overrides, }); - const batchCall = sf.batchCall([streamPayOp]); - return batchCall.exec(superSigner); } From 6087ea7c1b4ea4b9505ad8566e8cb5693dee9b26 Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 14:36:42 +0200 Subject: [PATCH 3/9] feat: add unit test for stream closing --- .../test/payment/erc777-stream.test.ts | 53 ++++++++++++++++--- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/packages/payment-processor/test/payment/erc777-stream.test.ts b/packages/payment-processor/test/payment/erc777-stream.test.ts index 605e3f03d8..daaf6d058c 100644 --- a/packages/payment-processor/test/payment/erc777-stream.test.ts +++ b/packages/payment-processor/test/payment/erc777-stream.test.ts @@ -10,7 +10,11 @@ import { } from '@requestnetwork/types'; import Utils from '@requestnetwork/utils'; -import { payErc777StreamRequest, resolverAddress } from '../../src/payment/erc777-stream'; +import { + completeErc777StreamRequest, + payErc777StreamRequest, + resolverAddress, +} from '../../src/payment/erc777-stream'; import { getRequestPaymentValues } from '../../src/payment/utils'; const daiABI = require('../abis/fDAIABI'); @@ -120,8 +124,8 @@ describe('erc777-stream', () => { }); }); - describe('payErc777StreamRequest', () => { - it('should pay an ERC777 request with fees', async () => { + describe('Streams management', () => { + it('payErc777StreamRequest should pay an ERC777 request', async () => { let tx; let confirmedTx; // initialize the superfluid framework...put custom and web3 only bc we are using ganache locally @@ -183,18 +187,53 @@ describe('erc777-stream', () => { expect(confirmedTx.status).toBe(1); expect(tx.hash).not.toBeUndefined(); - const wFlowRate = await sf.cfaV1.getNetFlow({ + const walletFlowRate = await sf.cfaV1.getNetFlow({ + superToken: daix.address, + account: wallet.address, + providerOrSigner: provider, + }); + expect(walletFlowRate).toBe(`-${expectedFlowRate}`); + const paymentFlowRate = await sf.cfaV1.getNetFlow({ + superToken: daix.address, + account: paymentAddress, + providerOrSigner: provider, + }); + expect(paymentFlowRate).toBe(expectedFlowRate); + }); + + it('completeErc777StreamRequest should complete an ERC777 request', async () => { + let tx; + let confirmedTx; + // initialize the superfluid framework...put custom and web3 only bc we are using ganache locally + const sf = await Framework.create({ + networkName: 'custom', + provider, + dataMode: 'WEB3_ONLY', + resolverAddress: resolverAddress, + protocolReleaseVersion: 'test', + }); + + // use the framework to get the SuperToken + const daix = await sf.loadSuperToken('fDAIx'); + + // Paying fDAIX stream request + tx = await completeErc777StreamRequest(validRequest, wallet); + confirmedTx = await tx.wait(1); + expect(confirmedTx.status).toBe(1); + expect(tx.hash).not.toBeUndefined(); + + const walletFlowRate = await sf.cfaV1.getNetFlow({ superToken: daix.address, account: wallet.address, providerOrSigner: provider, }); - expect(wFlowRate).toBe(`-${expectedFlowRate}`); - const pFlowRate = await sf.cfaV1.getNetFlow({ + expect(walletFlowRate).toBe('0'); + const paymentFlowRate = await sf.cfaV1.getNetFlow({ superToken: daix.address, account: paymentAddress, providerOrSigner: provider, }); - expect(pFlowRate).toBe(expectedFlowRate); + expect(paymentFlowRate).toBe('0'); }); }); }); From 1c361dd4950a4e1d7cf59cf0df04be3cb415efdf Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 17:32:02 +0200 Subject: [PATCH 4/9] fix: wait 2 seconds of streaming --- packages/payment-processor/test/payment/erc777-stream.test.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/payment-processor/test/payment/erc777-stream.test.ts b/packages/payment-processor/test/payment/erc777-stream.test.ts index daaf6d058c..7255cde1d7 100644 --- a/packages/payment-processor/test/payment/erc777-stream.test.ts +++ b/packages/payment-processor/test/payment/erc777-stream.test.ts @@ -216,6 +216,9 @@ describe('erc777-stream', () => { // use the framework to get the SuperToken const daix = await sf.loadSuperToken('fDAIx'); + // wait 2 seconds of streaming to avoid failing + await new Promise((r) => setTimeout(r, 2000)); + // Paying fDAIX stream request tx = await completeErc777StreamRequest(validRequest, wallet); confirmedTx = await tx.wait(1); From 35cbf5eaefca478553d0fc92bf2ddb4a6fee6b5f Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 18:53:44 +0200 Subject: [PATCH 5/9] fix: refactoring --- .../src/payment/erc777-stream.ts | 96 ++++++++----------- .../test/payment/erc777-stream.test.ts | 6 +- 2 files changed, 43 insertions(+), 59 deletions(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index 9666a12a55..a447977510 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -10,8 +10,11 @@ import { } from './utils'; import { Framework } from '@superfluid-finance/sdk-core'; -export const resolverAddress = '0x913bbCFea2f347a24cfCA441d483E7CBAc8De3Db'; -export const userDataPrefix = '0xbeefac'; +export const RESOLVER_ADDRESS = '0x913bbCFea2f347a24cfCA441d483E7CBAc8De3Db'; +// Superfluid payments of requests use the generic field `userData` to index payments. +// Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, +// in order to speed up the indexing and payment detection. +export const USERDATA_PREFIX = '0xbeefac'; /** * Processes a transaction to pay an ERC777 stream Request. @@ -29,46 +32,15 @@ export async function payErc777StreamRequest( throw new Error('Not a supported ERC777 payment network request'); } validateRequest(request, PaymentTypes.PAYMENT_NETWORK_ID.ERC777_STREAM); - const networkName = - request.currencyInfo.network === 'private' ? 'custom' : request.currencyInfo.network; - const sf = await Framework.create({ - networkName, - provider: signer.provider ?? getProvider(), - dataMode: request.currencyInfo.network === 'private' ? 'WEB3_ONLY' : undefined, - resolverAddress: request.currencyInfo.network === 'private' ? resolverAddress : undefined, - protocolReleaseVersion: request.currencyInfo.network === 'private' ? 'test' : undefined, - }); - const superSigner = sf.createSigner({ - signer: signer, - provider: signer.provider, - }); + const sf = await getSuperFluidFramework(request, signer); // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md // Below are the SF actions to add in the BatchCall : // - use expectedStartDate to compute offset between start of invoicing and start of streaming // - start fee streaming - const streamPayOp = await startStream(sf, request, overrides); + const streamPayOp = await getStartStreamOp(sf, request, overrides); const batchCall = sf.batchCall([streamPayOp]); - return batchCall.exec(superSigner); -} - -async function startStream( - sf: Framework, - request: ClientTypes.IRequestData, - overrides?: Overrides, -) { - const superToken = await sf.loadSuperToken(request.currencyInfo.value); - const { paymentReference, paymentAddress, expectedFlowRate } = getRequestPaymentValues(request); - // Superfluid payments of requests use the generic field `userData` to index payments. - // Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, - // in order to speed up the indexing and payment detection. - return sf.cfaV1.createFlow({ - flowRate: expectedFlowRate ?? '0', - receiver: paymentAddress, - superToken: superToken.address, - userData: `${userDataPrefix}${paymentReference}`, - overrides: overrides, - }); + return batchCall.exec(signer); } /** @@ -87,30 +59,45 @@ export async function completeErc777StreamRequest( throw new Error('Not a supported ERC777 payment network request'); } validateRequest(request, PaymentTypes.PAYMENT_NETWORK_ID.ERC777_STREAM); - const networkName = - request.currencyInfo.network === 'private' ? 'custom' : request.currencyInfo.network; - const sf = await Framework.create({ - networkName, - provider: signer.provider ?? getProvider(), - dataMode: request.currencyInfo.network === 'private' ? 'WEB3_ONLY' : undefined, - resolverAddress: request.currencyInfo.network === 'private' ? resolverAddress : undefined, - protocolReleaseVersion: request.currencyInfo.network === 'private' ? 'test' : undefined, - }); - const superSigner = sf.createSigner({ - signer: signer, - provider: signer.provider, - }); + const sf = await getSuperFluidFramework(request, signer); // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md // Below are the SF actions to add in the BatchCall : // - use expectedEndDate to compute offset between stop of invoicing and stop of streaming // - stop fee streaming - const streamPayOp = await stopStream(sf, signer, request, overrides); + const streamPayOp = await getStopStreamOp(sf, signer, request, overrides); const batchCall = sf.batchCall([streamPayOp]); - return batchCall.exec(superSigner); + return batchCall.exec(signer); +} + +async function getSuperFluidFramework(request: ClientTypes.IRequestData, signer: Signer) { + const isNetworkPrivate = request.currencyInfo.network === 'private'; + const networkName = isNetworkPrivate ? 'custom' : request.currencyInfo.network; + return await Framework.create({ + networkName, + provider: signer.provider ?? getProvider(), + dataMode: isNetworkPrivate ? 'WEB3_ONLY' : undefined, + resolverAddress: isNetworkPrivate ? RESOLVER_ADDRESS : undefined, + protocolReleaseVersion: isNetworkPrivate ? 'test' : undefined, + }); +} +async function getStartStreamOp( + sf: Framework, + request: ClientTypes.IRequestData, + overrides?: Overrides, +) { + const superToken = await sf.loadSuperToken(request.currencyInfo.value); + const { paymentReference, paymentAddress, expectedFlowRate } = getRequestPaymentValues(request); + return sf.cfaV1.createFlow({ + flowRate: expectedFlowRate ?? '0', + receiver: paymentAddress, + superToken: superToken.address, + userData: `${USERDATA_PREFIX}${paymentReference}`, + overrides: overrides, + }); } -async function stopStream( +async function getStopStreamOp( sf: Framework, signer: Signer, request: ClientTypes.IRequestData, @@ -118,14 +105,11 @@ async function stopStream( ) { const superToken = await sf.loadSuperToken(request.currencyInfo.value); const { paymentReference, paymentAddress } = getRequestPaymentValues(request); - // Superfluid payments of requests use the generic field `userData` to index payments. - // Since it's a multi-purpose field, payments will use a fix-prefix heading the payment reference, - // in order to speed up the indexing and payment detection. return sf.cfaV1.deleteFlow({ superToken: superToken.address, sender: await signer.getAddress(), receiver: paymentAddress, - userData: `${userDataPrefix}${paymentReference}`, + userData: `${USERDATA_PREFIX}${paymentReference}`, overrides: overrides, }); } diff --git a/packages/payment-processor/test/payment/erc777-stream.test.ts b/packages/payment-processor/test/payment/erc777-stream.test.ts index 7255cde1d7..b3b175e99d 100644 --- a/packages/payment-processor/test/payment/erc777-stream.test.ts +++ b/packages/payment-processor/test/payment/erc777-stream.test.ts @@ -13,7 +13,7 @@ import Utils from '@requestnetwork/utils'; import { completeErc777StreamRequest, payErc777StreamRequest, - resolverAddress, + RESOLVER_ADDRESS, } from '../../src/payment/erc777-stream'; import { getRequestPaymentValues } from '../../src/payment/utils'; const daiABI = require('../abis/fDAIABI'); @@ -133,7 +133,7 @@ describe('erc777-stream', () => { networkName: 'custom', provider, dataMode: 'WEB3_ONLY', - resolverAddress: resolverAddress, + resolverAddress: RESOLVER_ADDRESS, protocolReleaseVersion: 'test', }); @@ -209,7 +209,7 @@ describe('erc777-stream', () => { networkName: 'custom', provider, dataMode: 'WEB3_ONLY', - resolverAddress: resolverAddress, + resolverAddress: RESOLVER_ADDRESS, protocolReleaseVersion: 'test', }); From fe72c3985302a1faab4c4e74848916733eeea325 Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 18:55:11 +0200 Subject: [PATCH 6/9] Update packages/payment-processor/src/payment/erc777-stream.ts Co-authored-by: Alexandre ABRIOUX --- packages/payment-processor/src/payment/erc777-stream.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index a447977510..c2e2e2cbca 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -19,7 +19,7 @@ export const USERDATA_PREFIX = '0xbeefac'; /** * Processes a transaction to pay an ERC777 stream Request. * @param request - * @param signer the Web3 provider, or signer. Defaults to window.ethereum. + * @param signer the Web3 signer. Defaults to window.ethereum. * @param overrides optionally, override default transaction values, like gas. */ export async function payErc777StreamRequest( From cb58600959047c350cec700aa8a4fe79925f8ba2 Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 18:55:28 +0200 Subject: [PATCH 7/9] Update packages/payment-processor/src/payment/erc777-stream.ts Co-authored-by: Alexandre ABRIOUX --- packages/payment-processor/src/payment/erc777-stream.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index c2e2e2cbca..2539838d57 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -35,7 +35,7 @@ export async function payErc777StreamRequest( const sf = await getSuperFluidFramework(request, signer); // FIXME: according to specs PR https://github.com/RequestNetwork/requestNetwork/pull/688 // in file packages/advanced-logic/specs/payment-network-erc777-stream-0.1.0.md - // Below are the SF actions to add in the BatchCall : + // Below are the SF actions to add in the BatchCall: // - use expectedStartDate to compute offset between start of invoicing and start of streaming // - start fee streaming const streamPayOp = await getStartStreamOp(sf, request, overrides); From 1c9e75e16a3772f2dd5f27b4f6b8ea1d345a3129 Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 18:55:43 +0200 Subject: [PATCH 8/9] Update packages/payment-processor/src/payment/erc777-stream.ts Co-authored-by: Alexandre ABRIOUX --- packages/payment-processor/src/payment/erc777-stream.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payment-processor/src/payment/erc777-stream.ts b/packages/payment-processor/src/payment/erc777-stream.ts index 2539838d57..ef25531180 100644 --- a/packages/payment-processor/src/payment/erc777-stream.ts +++ b/packages/payment-processor/src/payment/erc777-stream.ts @@ -46,7 +46,7 @@ export async function payErc777StreamRequest( /** * Processes a transaction to complete an ERC777 stream paying a Request. * @param request - * @param signer the Web3 provider, or signer. Defaults to window.ethereum. + * @param signer the Web3 signer. Defaults to window.ethereum. * @param overrides optionally, override default transaction values, like gas. */ export async function completeErc777StreamRequest( From ea42d7eb915044890bafdeb630113b658333cabd Mon Sep 17 00:00:00 2001 From: Bertrand Juglas Date: Tue, 12 Jul 2022 18:56:47 +0200 Subject: [PATCH 9/9] Update packages/payment-processor/test/payment/erc777-stream.test.ts Co-authored-by: Alexandre ABRIOUX --- packages/payment-processor/test/payment/erc777-stream.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/payment-processor/test/payment/erc777-stream.test.ts b/packages/payment-processor/test/payment/erc777-stream.test.ts index b3b175e99d..644e71225f 100644 --- a/packages/payment-processor/test/payment/erc777-stream.test.ts +++ b/packages/payment-processor/test/payment/erc777-stream.test.ts @@ -219,7 +219,7 @@ describe('erc777-stream', () => { // wait 2 seconds of streaming to avoid failing await new Promise((r) => setTimeout(r, 2000)); - // Paying fDAIX stream request + // Stopping fDAIX stream request tx = await completeErc777StreamRequest(validRequest, wallet); confirmedTx = await tx.wait(1); expect(confirmedTx.status).toBe(1);