Skip to content

Commit

Permalink
fix: simple collect module recipient not optional w/ amount
Browse files Browse the repository at this point in the history
  • Loading branch information
cesarenaldi committed Jul 4, 2024
1 parent 1d2122d commit f545645
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions .changeset/two-avocados-accept.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@lens-protocol/react-native": patch
"@lens-protocol/react-web": patch
"@lens-protocol/react": patch
---

**fix:** Simple Collect Module recipient is not optional when amount is specified.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ export type SimpleCollectActionConfig = {
referralFee?: number;
/**
* The recipient of the collect fee.
*
* You MUST provide a recipient if you provide an amount.
*/
recipient?: EvmAddress;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AddressZero } from '@ethersproject/constants';
import { OpenActionModuleInput } from '@lens-protocol/api-bindings';
import { OpenActionConfig, OpenActionType } from '@lens-protocol/domain/use-cases/publications';

Expand All @@ -15,7 +16,7 @@ export function resolveOpenActionModuleInput(config: OpenActionConfig): OpenActi

referralFee: config.referralFee,

recipient: config.recipient ?? null,
recipient: config.recipient ?? AddressZero,
}),

collectLimit: config.collectLimit?.toString() ?? null,
Expand Down

0 comments on commit f545645

Please sign in to comment.