Skip to content

Build allowance approval flow for delegating key transfers to staking contract #955

Description

@Chucks1093

Summary

Implement the allowance approval UI that prompts users to approve the staking contract to transfer their keys before staking, using the on-chain approve mechanism.

Scope

  • Check existing allowance before staking flow begins
  • Approval step inserted in staking flow when allowance is insufficient
  • Approval transaction submitted and confirmed before stake proceeds
  • Approved state cached to avoid re-approval on subsequent stakes
  • Clear explanation of what the approval grants shown to user

Acceptance Criteria

  • Allowance checked before staking flow proceeds
  • Approval step shown only when allowance is insufficient
  • Approval transaction confirmed before stake submission
  • Cached approval bypasses approval step on subsequent stakes for same session
  • Explanation text clearly describes what the approval grants

ETA

12 hours

Activity

  1. Menjay7 commented on Sep 25, 2026

    @Menjay7

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

    Hi! I came across this issue and would love to work on it. I have experience with similar tasks and I'm confident I can investigate, implement a clean solution, and thoroughly test it before submitting a PR. If the issue is still open, I would appreciate it if you could assign it to me. I’ll prioritize this immediately and ensure a reliable solution is delivered as soon as possible. Thank you!

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

  2. khaylebfortune commented on Sep 25, 2026

    @khaylebfortune
    Contributor

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

    Hello Maintainer, I can fix this issue

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

  3. brightukas7-alt commented on Sep 25, 2026

    @brightukas7-alt

    @brightukas7-alt has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi there, I carefully reviewed the issue details and I’m confident I can deliver a clean and efficient solution.

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

  4. Neziahtech commented on Sep 25, 2026

    @Neziahtech
    Contributor

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

    Hi! I'd like to work on this.

    Understanding:
    Before staking, check if the staking contract has sufficient allowance to transfer the user's keys. If not, insert an approval step (on-chain approve call) into the staking flow, confirm it before proceeding, cache the approved state to skip re-prompting on later stakes, and clearly explain what the approval grants.

    Planned approach:

    Allowance check — On entering the staking flow, read current allowance for the connected wallet → staking contract (per key/asset) before rendering the stake action. Compare against the amount about to be staked.
    Conditional approval step — Only inject the approval screen/step when allowance < requiredAmount. Skip entirely if sufficient.
    Approval UI — A clear explanation panel: what's being approved (which contract, which key(s)/asset, and that it permits the staking contract to transfer on the user's behalf up to the approved amount), before the user signs.
    Approval transaction — Submit approve, wait for confirmation (pending/success/error states), then automatically proceed to the stake transaction once confirmed — no separate manual re-trigger needed.
    Caching — Store approved state (per wallet + contract + key, scoped to session or until allowance is later revoked) to bypass the approval step on subsequent stakes in the same session. Will use session storage or in-memory context depending on existing patterns — re-verify against actual on-chain allowance rather than trusting cache blindly, to avoid stale-approval bugs (e.g. if user revokes elsewhere).
    Edge cases — Handle exact-allowance vs. unlimited-approval patterns (if the contract supports approving a fixed amount vs. max/infinite), and partial allowance (approved but insufficient for a larger stake —

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

  5. Bilalishaq7 commented on Sep 25, 2026

    @Bilalishaq7
    Contributor

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

    Hey there! I’ve reviewed the issue details and codebase, and I’d love to take this on. If you can assign this to me, I’ll dive right in and submit a PR soon after!

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

  6. stayzappy commented on Sep 25, 2026

    @stayzappy

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

    Hi AccessLayer team! I would love to build this allowance approval flow. I have deep experience with Stellar smart contract allowances, transaction signing UX, and clear multi-step modal dialogs. I can deliver a well-tested PR within 24 hours.

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

  7. CathyZaks commented on Sep 25, 2026

    @CathyZaks

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

    Kindly assign

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

  8. Deenahss commented on Sep 25, 2026

    @Deenahss

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

    I would love to fix this issue kindly please assign to me

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

  9. Raydev-tech commented on Sep 25, 2026

    @Raydev-tech

    @hee-sholar has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi maintainer, I have read and understood the issue requirements and checked the necessary documentation. I’m confident I can work on this task effectively and deliver a proper solution.
    Happy to discuss the approach first if that's useful before I start.

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

  10. bright5455 commented on Sep 25, 2026

    @bright5455

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

    hello maintainer

    i have read and understand the issue
    im a backend engineer with five years of eperience,with my level of experience,i believe i can deliver a quality PR
    please kindly assign this task to me

    Thank you

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

  11. samueladebayo335-collab commented on Sep 25, 2026

    @samueladebayo335-collab

    @samueladebayo335-collab has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    I’m interested in taking this issue and have reviewed the requirements carefully. I’d like to approach the implementation methodically, with attention to existing conventions, edge cases, and the overall stability of the codebase.

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

  12. k-deejah commented on Sep 25, 2026

    @k-deejah
    Contributor

    @k-deejah has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Hi Maintainer, I can work on this issue

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

  13. Seunfunmi-319509 commented on Sep 25, 2026

    @Seunfunmi-319509
    Contributor

    @Seunfunmi-319509 has applied to work on this issue as part of the Stellar Wave Program's 9th wave.

    Kindly assign

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

  14. Dannnyhamps commented on Sep 25, 2026

    @Dannnyhamps

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

    Hi maintainer, I've reviewed the issue and would like to work on it

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

  15. drips-wave commented on Sep 25, 2026

    @drips-wave

    Congratulations, @k-deejah! 🎉 Your application was accepted by the repo's maintainers, and the issue is due on September 30, 2026.

    🧑‍💻 @k-deejah: 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 🌊

  16. grantfox-oss commented on Sep 30, 2026

    @grantfox-oss

    🎉 This issue has been marked as completed on GrantFox!

    @k-deejah's PR #974 was approved and merged by @Chucks1093.

    🏆 @k-deejah: You earned 40 FoxPoints for this contribution! Your current tier: Builder (2,188 total points). Track your full progress on GrantFox.

    👏 Great work, @k-deejah! Keep contributing to accesslayerorg.

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

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions