Skip to content

Deduplicate wallet and sandbox modules #57

Description

@dotunv

Description

The wallet/ and sandbox/ modules share nearly identical logic:

  • generateKeypair
  • fundFromFriendbot
  • Payment sending functions

Both are used by different frontend pages but implement the same core operations.

Directories:

  • apps/api/src/modules/wallet/
  • apps/api/src/modules/sandbox/

Proposed Approach

Option A: Merge into a single wallet module and have the Sandbox page call wallet endpoints.

Option B: Keep separate modules but extract shared logic into a common service.

Benefits

  • Reduced code duplication
  • Easier maintenance
  • Single source of truth for wallet operations

Acceptance Criteria

  • No duplicated logic between modules
  • Both frontend pages (Sandbox and Wallet) continue to work
  • All existing functionality is preserved
  • Tests cover the deduplicated code

Metadata

Metadata

Assignees

No one assigned

    Labels

    GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26backendBackend / API workenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions