Skip to content

Implement wallet connection for Stellar #122

Description

@Marchand-Nicolas

Description 📹

Implement wallet connection for the Stellar chain in pages/verify/[discordServerId]/[discordMemberId]/[customLink].tsx. Add support for Stellar Testnet & Stellar Mainnet by showing a Stellar wallet connect popup if the expected network is Stellar. For other chains, show the Starknet wallet popup. Ensure the solution is clean and scalable to accommodate additional chains in the future.

Proposed Actions 🛠️

Here’s a checklist of actions to follow for resolving this issue:

  1. Fork and Create Branch:
    Fork the repository and create a new branch using the issue number:
git checkout -b fix-[issue-number]
  1. Implement Changes:

    • Add Stellar Testnet and Stellar Mainnet to configs/networks.json with the new "chain" field:

      [
        {
          "name": "mainnet",
          "url": "starknetid-mainnet.starknet.a5a.ch",
          "chain": "starknet"
        },
        {
          "name": "sepolia",
          "url": "starknetid-sepolia.starknet.a5a.ch",
          "chain": "starknet"
        },
        {
          "name": "stellar-mainnet",
          "url": "stellar-mainnet-url",
          "chain": "stellar"
        },
        {
          "name": "stellar-testnet",
          "url": "stellar-testnet-url",
          "chain": "stellar"
        }
      ]
    • Update pages/verify/[discordServerId]/[discordMemberId]/[customLink].tsx to:

      • Dynamically fetch the network configuration from networks.json.
      • Check the chain field for the current network.
        • If the chain is "stellar", show the Stellar wallet connect popup.
        • If the chain is "starknet", show the Starknet wallet connect popup.
      • Make the wallet connection logic modular to allow easy addition of future chains.
    • Create separate reusable functions/components for:

      • Stellar wallet connection logic.
      • Starknet wallet connection logic.
    • Ensure the code is clean and adheres to scalable design principles.

  2. Run Tests and Commit Changes:
    Make sure your changes don't break existing functionality and commit with a clear message:

git commit -m "Fix: Implement Stellar wallet connection with scalable multi-chain support"

Required 📋

To keep our workflow smooth, please make sure you follow these guidelines:

  • Assignment: Don't create a pull request if you weren’t assigned to this issue.
  • Timeframe: Complete the task within 3 business days.
  • Closing the Issue: In your PR description, close the issue by writing Close #[issue_id].
  • Review Process:
    • Once you've submitted your PR, change the label to "ready for review".
    • If changes are requested, address them and then update the label back to "ready for review" once done.
  • Testing: Test your PR locally before pushing, and verify that tests and build are working after pushing.

Thank you for your contribution 🙏

⚠️ WARNING: Failure to follow the requirements above may result in being added to the OnlyDust blacklist, affecting your ability to receive future rewards.

Metadata

Metadata

Assignees

Labels

expert issueonlydust-waveContribute to awesome OSS repos during OnlyDust's open source weekopen for contributionAn issue that is available for an Only Dust contribution

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions