Fixing method name

This commit is contained in:
Vitor Pamplona
2025-07-14 11:50:15 -04:00
parent 850277fdc1
commit 7bdb3a1a18
10 changed files with 10 additions and 10 deletions

View File

@@ -43,7 +43,7 @@ class IntentRequestDatabase {
fun newResponse(data: Intent) {
val callId = data.getStringExtra("id")
if (callId != null) {
awaitingRequests[callId]?.process(data)
awaitingRequests[callId]?.consume(data)
awaitingRequests.remove(callId)
}
}

View File

@@ -23,5 +23,5 @@ package com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground
import android.content.Intent
interface NewResultProcessor {
fun process(intent: Intent)
fun consume(intent: Intent)
}

View File

@@ -30,7 +30,7 @@ import com.vitorpamplona.quartz.nip57Zaps.LnZapPrivateEvent
class DecryptZapResultProcessor(
val onReady: (LnZapPrivateEvent) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = DecryptZapResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<ZapEventDecryptionResult>) {

View File

@@ -29,7 +29,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class DeriveKeyResultProcessor(
val onReady: (String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = DeriveKeyResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<DerivationResult>) {

View File

@@ -30,7 +30,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class LoginResultProcessor(
val onReady: (HexKey, String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = LoginResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<PubKeyResult>) {

View File

@@ -29,7 +29,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class Nip04DecryptResultProcessor(
val onReady: (String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = Nip04DecryptResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<DecryptionResult>) {

View File

@@ -29,7 +29,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class Nip04EncryptResultProcessor(
val onReady: (String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = Nip04EncryptResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<EncryptionResult>) {

View File

@@ -29,7 +29,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class Nip44DecryptResultProcessor(
val onReady: (String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = Nip44DecryptResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<DecryptionResult>) {

View File

@@ -29,7 +29,7 @@ import com.vitorpamplona.quartz.nip55AndroidSigner.api.foreground.intents.respon
class Nip44EncryptResultProcessor(
val onReady: (String) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = Nip44EncryptResponse.parse(intent)
if (foregroundResult is SignerResult.Successful<EncryptionResult>) {
onReady(foregroundResult.result.ciphertext)

View File

@@ -31,7 +31,7 @@ class SignResultProcessor(
val unsignedEvent: Event,
val onReady: (Event) -> Unit,
) : NewResultProcessor {
override fun process(intent: Intent) {
override fun consume(intent: Intent) {
val foregroundResult = SignResponse.parse(intent, unsignedEvent)
if (foregroundResult is SignerResult.Successful<SignResult>) {