Skip to content

Primal does not follow nip 55 #514

@greenart7c3

Description

@greenart7c3

Describe the bug

Currently primal is using a constant package id for opening the android signer but the nip states you should check for any installed signer like this:

fun isExternalSignerInstalled(context: Context): Boolean {
  val intent =
    Intent().apply {
      action = Intent.ACTION_VIEW
      data = Uri.parse("nostrsigner:")
    }
  val infos = context.packageManager.queryIntentActivities(intent, 0)
  return infos.size > 0
}

When using the get_public_key you should save the package name returned by the signer in something like the shared prefs and use that package name

val packageName = intent.data?.getStringExtra("package")

Steps to reproduce

You can test this by using nowser or using Amber in debug mode

Expected behavior

A clear and concise description of what you expected to happen.

Environment

  • Details that you think may affect.

Additional context

Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions