Skip to content

fix pass private key as config#168

Merged
juliangruber merged 1 commit intomainfrom
fix/pass-pkey
Apr 2, 2026
Merged

fix pass private key as config#168
juliangruber merged 1 commit intomainfrom
fix/pass-pkey

Conversation

@juliangruber
Copy link
Copy Markdown
Member

Before this patch, when you pass a private key, you get this error, because the config always defaults empty wallet address and session key to default values:

Conflicting authentication: provide either VITE_FILECOIN_PRIVATE_KEY or (VITE_WALLET_ADDRESS + VITE_SESSION_KEY), not both

@juliangruber juliangruber requested a review from Copilot April 1, 2026 09:49
@FilOzzy FilOzzy added team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board. labels Apr 1, 2026
@FilOzzy FilOzzy added this to FOC Apr 1, 2026
@github-project-automation github-project-automation bot moved this to 📌 Triage in FOC Apr 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes a configuration parsing bug in the Filecoin Pin integration where session-key auth defaults were being applied too early, causing “conflicting authentication” errors when a private key was provided.

Changes:

  • Stop defaulting VITE_WALLET_ADDRESS / VITE_SESSION_KEY at read-time so presence checks reflect only explicitly provided env vars.
  • Build an auth object first, then spread it into filecoinPinConfig so only one auth mode is included.
  • Keep the “conflicting authentication” guard while allowing private-key auth without accidentally enabling session-key auth.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib/filecoin-pin/config.ts
Comment thread src/lib/filecoin-pin/config.ts
@juliangruber
Copy link
Copy Markdown
Member Author

working on the lockfile error in #169

Copy link
Copy Markdown
Member

@rvagg rvagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hopefully it doesn't make #154 harder, but I guess #169 has already done that

@github-project-automation github-project-automation bot moved this from 📌 Triage to ✔️ Approved by reviewer in FOC Apr 2, 2026
@juliangruber juliangruber merged commit de0e9e7 into main Apr 2, 2026
8 of 9 checks passed
@github-project-automation github-project-automation bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team/filecoin-pin "Filecoin Pin" project is a stakeholder for this work. team/fs-wg FOC working group is a stakeholder for this work, and thus wants to track it on their project board.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants