Skip to content

fix(stellar): unify agent secret env var and correct futurenet passphrase #37

Merged
robertocarlous merged 2 commits intoNeurowealth:mainfrom
manoahLinks:main
Mar 31, 2026
Merged

fix(stellar): unify agent secret env var and correct futurenet passphrase #37
robertocarlous merged 2 commits intoNeurowealth:mainfrom
manoahLinks:main

Conversation

@manoahLinks
Copy link
Copy Markdown
Contributor

Summary

  • Standardize on STELLAR_AGENT_SECRET_KEY as the single env var name across config, client, tests, docs, and .env.example — eliminates silent runtime failures from mismatched variable names
  • Fix getNetworkPassphrase() to explicitly map futurenetNetworks.FUTURENET instead of falling through to TESTNET; throws a clear error for unknown network values
  • Add unit tests covering the full network passphrase mapping (mainnet, testnet, futurenet, unknown, undefined)

Test plan

  • getAgentKeypair() succeeds when only STELLAR_AGENT_SECRET_KEY is set
  • No remaining references to STELLAR_AGENT_SECRET or AGENT_SECRET_KEY
  • getNetworkPassphrase() returns correct passphrase for futurenet
  • Testnet passphrase no longer applies to futurenet
  • All 19 stellar client tests pass
  • npm run lint passes

Closes #29
Closes #31

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 29, 2026

@manoahLinks Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@robertocarlous robertocarlous merged commit 994e969 into Neurowealth:main Mar 31, 2026
1 check passed
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.

Fix getNetworkPassphrase() for Futurenet in src/stellar/client.ts Align Stellar agent environment variables (single source of truth)

2 participants