Skip to content

cleanup: small leftovers from the removed DashPay and wallet specs #5093

Open

Description

@QuantumExplorer

Small leftovers found while checking the committed specs and plans removed in #5060 against the code. None changes behavior users rely on; each is a few lines.

Kotlin SDK

  • KeystoreSigner.close() destroys the native signer but does not cancel its CoroutineScope (packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/security/KeystoreSigner.kt, scope around line 69, close() around line 360), so in-flight signAsync jobs outlive close().

Swift example app

  • ContactRequestsView.swift docs still describe "Accept / Reject" (around lines 6, 28 and 33) and cite "§6.4" of a deleted spec (around line 40); the rows now offer Accept and Ignore.
  • DashPayProfileEditorView falls back to walletManager.firstWallet for legacy rows (IdentityDetailView.swift, around lines 1152 and 1322-1325), and its doc says this is fine for "the current single-wallet UI". The app supports several wallets, so the fallback can pick the wrong one.
  • AddViaQRSheet (DashPayTabView.swift, around line 942) sends a contact request without the incoming-request collision check that AddContactView.attemptSend performs (around line 417), so adding someone by QR who already sent you a request double-requests instead of offering Accept.

rs-platform-wallet

  • packages/rs-platform-wallet/README.md documents an API that no longer exists: PlatformWalletInfo::new(wallet_id, name), SPVWalletManager, primary_identity(), identity_manager.set_label, ManagedIdentity.label / is_active. Rewrite it against the current PlatformWalletManager / PlatformWallet surface.
  • ApplyError::CoreApply is never constructed: apply_changeset drops cs.core rather than replaying it (packages/rs-platform-wallet/src/wallet/apply.rs). Remove the variant at the next API break, or keep it documented as unused.
  • build_auto_accept_qr uses unwrap_or(0) when the system clock is before 1970 (network/contact_requests.rs, around line 3139), which yields an expiry in 1970. Harmless (the QR is simply expired), but an error would be clearer.

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

    cleanupA refactoring or something that tidies up the project.leftover

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions