Ephesus: add optional payment to member remark#4517
Ephesus: add optional payment to member remark#4517Lezek123 merged 17 commits intoJoystream:ephesusfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
There was a problem hiding this comment.
Great job, I would add the following recommendations:
- The extrinsic
member_remarkshould be benchmarked again - I think you should add an edge case, where the extrinsic succeeds but the channel reward account is not found by the QN. Since you have added just the happy path case
| export type ChannelPaymentParams = { | ||
| asMember: MemberId | ||
| msg: IMakeChannelPayment | ||
| payment: [string, BN] |
There was a problem hiding this comment.
| payment: [string, BN] | |
| payment: [string, BN] // [address, amount] |
tests/network-tests/src/fixtures/content/channelPayouts/DirectChannelPaymentHappyCaseFixture.ts
Outdated
Show resolved
Hide resolved
tests/network-tests/src/fixtures/content/channelPayouts/DirectChannelPaymentHappyCaseFixture.ts
Outdated
Show resolved
Hide resolved
tests/network-tests/src/fixtures/content/channelPayouts/DirectChannelPaymentHappyCaseFixture.ts
Show resolved
Hide resolved
...s/src/fixtures/content/channelPayouts/DirectChannelPaymentWithInvalidRewardAccountFixture.ts
Outdated
Show resolved
Hide resolved
...s/src/fixtures/content/channelPayouts/DirectChannelPaymentWithInvalidRewardAccountFixture.ts
Outdated
Show resolved
Hide resolved
| @@ -600,9 +590,13 @@ export async function processChannelPaymentFromMember( | |||
| `queried video based on payee address, EXPECTED: ${channel.id}, ACTUAL: ${video.channel.id}` | |||
There was a problem hiding this comment.
The message here should say that the video's channelId does not match with the channel that was queried based on reward (or payee) account.
Alternatively you can provide channelId as part of the where condition when querying for the video, so that you only search within the correct channel to begin with.
Edit: I now also noticed that you don't return here, the way you do if the video is not found. I think it's better to treat both those cases the same way (ie. if the video does not belong to the channel, the context is invalid and should be set to null)
Lezek123
left a comment
There was a problem hiding this comment.
See previous review (I accidentally submitted it by adding a comment)
Addresses #4507. This PR addresses all the relevant runtime, QN and integration tests work.
depends on Joystream/hydra#513
payment: Option<(T::AccountId, T::Balance)>parameter tomember_remarkextrinsic.MakeChannelPaymentmessage, with an option of adding any of the three payment contexts as described in Idea: Payments directly to channel accounts atlas#3591MakeChannelPayment. Maybe, we can also support sending payment with other existing metaprotocol messages e.g.,ReactComment, with the intention of tipping the comment creator. This is one example, etc.┆Issue is synchronized with this Asana task by Unito