Skip to content

kotlin-sdk example: the Core Receive sheet shows no address when the local database has no unused one #6389

Backlog

Description

@Claudius-Maginificent

TL;DR: In the Android example app, the Core "Receive" sheet shows no QR code when the local database has no unused receive address yet, even though the wallet itself could give one. The user is told to sync instead of getting an address.

User story

As a user of the Android example wallet, I want the Receive sheet to always show an address and QR code, so I can receive Dash right after opening the wallet.

Scenario

Base flow

The user opens a Core account and taps Receive before the local database (Room) holds an unused external address.

Actual behavior

ReceiveAddressSheet.kt filters the persisted external address pool and picks the lowest unused index itself. With no such row it shows a prompt to sync and no QR code.

Expected behavior

The sheet asks the live wallet for the next receive address (the Rust wallet owns address selection) and shows it, whatever Room holds.

Detailed discussion

  • File: packages/kotlin-sdk/KotlinExampleApp/app/src/main/java/org/dashfoundation/example/ui/wallet/ReceiveAddressSheet.kt.
  • The address choice belongs in Rust per the book's wallet-ownership rule; the Kotlin SDK already exposes the managed wallet's next receive address (ManagedCoreWallet).
  • The behaviour predates refactor(platform-wallet): drop always-zero Core address balance #6036, which only removes the stored balance condition from that filter.
  • Check whether the Swift example app has the same pattern.

Prior work

Attribution

🤖 Co-authored by Claudius the Magnificent AI Agent

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions