Skip to content

fix: make APP_FEE_RECIPIENT optional with conditional customFee - #6

Open
Sertug17 wants to merge 1 commit into
circlefin:masterfrom
Sertug17:fix/app-fee-recipient-optional
Open

fix: make APP_FEE_RECIPIENT optional with conditional customFee#6
Sertug17 wants to merge 1 commit into
circlefin:masterfrom
Sertug17:fix/app-fee-recipient-optional

Conversation

@Sertug17

Copy link
Copy Markdown

APP_FEE_RECIPIENT was required in the Zod schema, but the README instructs users to leave it blank and run wallet:generate to populate it. If that step is skipped, the app crashes at startup with a validation error.

Changes:

  • Made APP_FEE_RECIPIENT optional in the server env schema
  • Only include customFee in the swap config when APP_FEE_RECIPIENT is set
  • When unset, swaps execute without platform fees (expected during initial setup)

APP_FEE_RECIPIENT was required in the Zod schema, but the README instructs
users to leave it blank and run wallet:generate to populate it. If the
wallet generation step is skipped, the app crashes at startup with a
validation error.

Made the field optional in the schema and only include customFee in the
swap config when APP_FEE_RECIPIENT is set. This way the app starts
without a fee recipient and swaps still work — just without collecting
platform fees until one is configured.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant