Skip to content

kotlin-sdk: remove the SigningKeyUnavailable message-marker fallback in 4.3 #5090

Open

Description

@QuantumExplorer

The Kotlin SDK still classifies signer failures by matching the message text "no private key stored for" (DashSdkError.PlatformWallet.SigningKeyUnavailable.MESSAGE_MARKER) as a fallback to the typed code 31 mapping. Its own doc says to remove the fallback "in the next minor release":

  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/errors/DashSdkError.kt: the constant (around line 376), the code-6 fallback branch (around line 696) and isSigningKeyUnavailable (around line 822)
  • packages/kotlin-sdk/sdk/src/main/kotlin/org/dashfoundation/dashsdk/security/KeystoreSigner.kt (around lines 157 and 208), which still builds messages with the marker

The fallback arrived with #4191 and first shipped in the 4.2.0 pre-releases, so "next minor release" means 4.3.

To do in 4.3:

  • Remove the marker match from the code-6 branch and isSigningKeyUnavailable, leaving code 31 as the only discriminator.
  • Decide whether KeystoreSigner keeps the marker text in its messages (harmless once nothing matches on it) and drop the constant's matcher role.
  • Update the error-mapping tests that pin the marker.

Activity

  1. added
    cleanupA refactoring or something that tidies up the project.
    on Sep 27, 2026
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.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions