mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-11-10 20:06:37 +01:00
Moves the last npub to hexkey for https://github.com/nostr-protocol/nips/pull/1341
This commit is contained in:
@@ -32,7 +32,6 @@ import com.vitorpamplona.quartz.encoders.HexKey
|
||||
import com.vitorpamplona.quartz.encoders.Nip47WalletConnect
|
||||
import com.vitorpamplona.quartz.encoders.RelayUrlFormatter
|
||||
import com.vitorpamplona.quartz.encoders.toHexKey
|
||||
import com.vitorpamplona.quartz.encoders.toNpub
|
||||
import com.vitorpamplona.quartz.events.AdvertisedRelayListEvent
|
||||
import com.vitorpamplona.quartz.events.ChatMessageRelayListEvent
|
||||
import com.vitorpamplona.quartz.events.ContactListEvent
|
||||
@@ -162,7 +161,7 @@ class AccountSettings(
|
||||
} else {
|
||||
when (val packageName = externalSignerPackageName) {
|
||||
null -> NostrSignerInternal(keyPair)
|
||||
else -> NostrSignerExternal(keyPair.pubKey.toHexKey(), ExternalSignerLauncher(keyPair.pubKey.toNpub(), packageName))
|
||||
else -> NostrSignerExternal(keyPair.pubKey.toHexKey(), ExternalSignerLauncher(keyPair.pubKey.toHexKey(), packageName))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ class Result(
|
||||
}
|
||||
|
||||
class ExternalSignerLauncher(
|
||||
private val npub: String,
|
||||
private val currentUserPubKeyHex: String,
|
||||
val signerPackageName: String,
|
||||
) {
|
||||
private val contentCache = LruCache<String, (String) -> Unit>(50)
|
||||
@@ -222,7 +222,7 @@ class ExternalSignerLauncher(
|
||||
intent.putExtra("pubKey", pubKey)
|
||||
intent.putExtra("id", id)
|
||||
if (type !== SignerType.GET_PUBLIC_KEY) {
|
||||
intent.putExtra("current_user", npub)
|
||||
intent.putExtra("current_user", currentUserPubKeyHex)
|
||||
} else {
|
||||
intent.putExtra("permissions", defaultPermissions())
|
||||
}
|
||||
@@ -278,7 +278,7 @@ class ExternalSignerLauncher(
|
||||
): kotlin.Result<String?> {
|
||||
val localData =
|
||||
if (signerType !== SignerType.GET_PUBLIC_KEY) {
|
||||
arrayOf(*data, npub)
|
||||
arrayOf(*data, currentUserPubKeyHex)
|
||||
} else {
|
||||
data
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user