mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-26 18:06:21 +02:00
Fixing method name
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
@@ -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>) {
|
||||
|
@@ -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>) {
|
||||
|
@@ -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>) {
|
||||
|
@@ -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>) {
|
||||
|
@@ -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>) {
|
||||
|
@@ -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>) {
|
||||
|
@@ -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)
|
||||
|
@@ -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>) {
|
||||
|
Reference in New Issue
Block a user