Skip to content

Commit d43ec68

Browse files
iamsamgibbsjakubcolony
authored andcommitted
Fix: Store streaming payment changes on colony action, and tidy up editStreamingPaymentMotion saga
1 parent 52fb7be commit d43ec68

File tree

5 files changed

+46
-84
lines changed

5 files changed

+46
-84
lines changed

amplify/backend/api/colonycdapp/schema/schema.graphql

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3186,6 +3186,29 @@ type ColonyAction @model @searchable {
31863186
Streaming payment associated with the action, if any
31873187
"""
31883188
streamingPayment: StreamingPayment @hasOne(fields: ["streamingPaymentId"])
3189+
"""
3190+
Changes to the streaming payment associated with the action, if any
3191+
Applicable to `EDIT_STREAMING_PAYMENT` action only
3192+
"""
3193+
streamingPaymentChanges: StreamingPaymentChangeSet
3194+
}
3195+
3196+
type StreamingPaymentChangeSet {
3197+
"""
3198+
The values before the change
3199+
"""
3200+
oldValues: StreamingPaymentChanges!
3201+
"""
3202+
The values before the change
3203+
"""
3204+
newValues: StreamingPaymentChanges!
3205+
}
3206+
3207+
type StreamingPaymentChanges {
3208+
startTime: String!
3209+
endTime: String!
3210+
interval: String!
3211+
amount: String!
31893212
}
31903213

31913214
"""
@@ -3627,32 +3650,6 @@ type StreamingPayment @model {
36273650
"""
36283651
motions: [ColonyMotion]
36293652
@hasMany(indexName: "byStreamingPaymentId", fields: ["id"])
3630-
"""
3631-
List of Streaming Payment changelog entries
3632-
"""
3633-
changelog: [StreamingPaymentChangelog!]
3634-
}
3635-
3636-
type StreamingPaymentChangelog {
3637-
"""
3638-
Transaction hash associated with the changelog entry
3639-
"""
3640-
transactionHash: String!
3641-
"""
3642-
The values before the change
3643-
"""
3644-
oldValues: StreamingPaymentChanges!
3645-
"""
3646-
The values before the change
3647-
"""
3648-
newValues: StreamingPaymentChanges!
3649-
}
3650-
3651-
type StreamingPaymentChanges {
3652-
startTime: String!
3653-
endTime: String!
3654-
interval: String!
3655-
amount: String!
36563653
}
36573654

36583655
type StreamingPaymentMetadata @model {

docker/colony-cdapp-dev-env-block-ingestor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM colony-cdapp-dev-env/base:latest
22

3-
ENV BLOCK_INGESTOR_HASH=56f9fa11ba4f9836744c2a0249b764958b7a8db8
3+
ENV BLOCK_INGESTOR_HASH=dd43a8f4e131ea6bf44a9ee7f120b885c398e2b7
44

55
# Declare volumes to set up metadata
66
VOLUME [ "/colonyCDapp/amplify/mock-data" ]

src/graphql/fragments/streamingPayment.graphql

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ fragment StreamingPayment on StreamingPayment {
2323
amount
2424
timestamp
2525
}
26-
changelog {
27-
transactionHash
28-
oldValues {
29-
...StreamingPaymentChanges
30-
}
31-
newValues {
32-
...StreamingPaymentChanges
33-
}
34-
}
3526
}
3627

3728
fragment StreamingPaymentChanges on StreamingPaymentChanges {

src/graphql/generated.ts

Lines changed: 21 additions & 31 deletions
Large diffs are not rendered by default.

src/redux/sagas/motions/expenditures/editStreamingPaymentMotion.ts

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import {
44
ColonyRole,
55
getPermissionProofs,
66
Id,
7-
type AnyVotingReputationClient,
87
} from '@colony/colony-js';
98
import { call, fork, put, takeEvery } from 'redux-saga/effects';
109

@@ -96,16 +95,6 @@ function* editStreamingPaymentMotion({
9695
throw new Error('Streaming payments extension cannot be found');
9796
}
9897

99-
const votingReputationClient: AnyVotingReputationClient = yield call(
100-
[colonyManager, colonyManager.getClient],
101-
ClientType.VotingReputationClient,
102-
colonyAddress,
103-
);
104-
105-
if (!votingReputationClient) {
106-
throw new Error('Voting reputation extension cannot be found');
107-
}
108-
10998
const multicallData = yield getEditStreamingPaymentMulticallData({
11099
streamingPayment,
111100
colonyClient,
@@ -125,7 +114,7 @@ function* editStreamingPaymentMotion({
125114
colonyClient,
126115
streamingPayment.nativeDomainId,
127116
[ColonyRole.Funding, ColonyRole.Administration],
128-
votingReputationClient.address,
117+
votingReputationAddress,
129118
);
130119

131120
const { skillId } = yield call(
@@ -163,11 +152,6 @@ function* editStreamingPaymentMotion({
163152
branchMask,
164153
siblings,
165154
],
166-
group: {
167-
key: batchKey,
168-
id: meta.id,
169-
index: 1,
170-
},
171155
},
172156
});
173157

0 commit comments

Comments
 (0)