Skip to content

Commit 5742b1f

Browse files
iamsamgibbsjakubcolony
authored andcommitted
Feat: Only update streaming payment metadata changelog if end condition changes via permissions
1 parent d43ec68 commit 5742b1f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/redux/sagas/expenditures/editStreamingPayment.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,11 @@ function* editStreamingPaymentAction({
111111
} = yield waitForTxResult(txChannel);
112112

113113
if (type === ActionTypes.TRANSACTION_SUCCEEDED) {
114-
if (streamingPayment.metadata) {
114+
const hasEndConditionChanged =
115+
endCondition !== undefined &&
116+
endCondition !== streamingPayment.metadata?.endCondition;
117+
118+
if (hasEndConditionChanged && streamingPayment.metadata) {
115119
yield apolloClient.mutate<
116120
UpdateStreamingPaymentMetadataMutation,
117121
UpdateStreamingPaymentMetadataMutationVariables

0 commit comments

Comments
 (0)