Skip to content

total_ngos always returns 0 #264

Closed

Description

@Ashborne267

Summary

total_ngos() reads DataKey::TotalNgos, which nothing writes, so it always
returns 0, while ngo_count() returns the real value with a different type
(u64 against u32). Closed issue #9 added the counter; what is on main
doesn't work.

Acceptance criteria

  • Remove total_ngos and TotalNgos, or make it return the same value as ngo_count.
  • Add a test that registers two NGOs and checks the count getter.

Getting started

Fork this repository, clone your fork, and add this repo as upstream:

git clone https://github.com/<your-username>/streamgive-contracts.git
cd streamgive-contracts
git remote add upstream https://github.com/StreamGive/streamgive-contracts.git

Create a branch for this issue:

git checkout -b fix/registry-total-ngos

Suggested commit message:

fix(ngo-registry): fix or remove total_ngos

Run cargo fmt --check, cargo clippy, and cargo test before pushing, then
open a pull request from your fork against main and link this issue. See
the contributing guide for the full contribution guide.

Activity

  1. buki70 commented on Oct 16, 2026

    @buki70

    @buki70 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hi Maintainer,
    I hope you’re doing well.
    I would really appreciate the opportunity to work on this issue. Having carefully reviewed the acceptance criteria, I’m confident that I can work on it and submit a PR after being assigned.
    Please kindly consider assigning this issue to me. I would be grateful for the opportunity to contribute.
    Thank you very much for your time and consideration.

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @buki70 to this issue.

  2. Joyee730 commented on Oct 16, 2026

    @Joyee730
    Contributor

    @Joyee730 has applied to work on this issue as part of the Stellar Wave Program's 10th wave.

    Hello maintainer, kindly assign me

    ℹ️ Repo Maintainers: To accept this application, review their application or assign @Joyee730 to this issue.

  3. drips-wave commented on Oct 16, 2026

    @drips-wave

    Congratulations, @Joyee730! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on October 22, 2026.

    🧑‍💻 @Joyee730: Please resolve the issue such that the repo's maintainers have enough time to review your contribution before the due date. You'll earn Points for completing the issue on-time, which will make you eligible for a share of the Stellar Wave Program's reward pool.

    Warning

    When opening a PR, please link it to this issue to ensure it gets tracked accurately. Points are awarded when this issue is marked as completed by the maintainer.

    🤠 Repo maintainers: Please keep an eye on the contributor's progress and review their work before the due date. You can manage this issue, including adjusting its complexity and points, here.

    🌊 Happy Wave 🌊

  4. github-actions commented on Oct 18, 2026

    @github-actions
    Contributor

    Closed by #329, which was merged automatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinggood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions