Skip to content

Commit e90b9c9

Browse files
JOHNJOHN
authored andcommitted
fix: preserve frequency field through polling discovery
1 parent 8a2c53d commit e90b9c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/src/main/java/to/bitkit/paykit/workers/PaykitPollingWorker.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ class PaykitPollingWorker @AssistedInject constructor(
219219
amountSats = proposal.amountSats,
220220
description = proposal.description,
221221
createdAt = proposal.createdAt,
222+
frequency = proposal.frequency,
222223
),
223224
)
224225
}
@@ -317,7 +318,7 @@ class PaykitPollingWorker @AssistedInject constructor(
317318
providerPubkey = request.fromPubkey,
318319
amountSats = request.amountSats,
319320
description = request.description,
320-
frequency = "monthly", // Default if not specified
321+
frequency = request.frequency ?: "monthly",
321322
createdAt = request.createdAt,
322323
)
323324

@@ -501,6 +502,7 @@ data class DiscoveredRequest(
501502
val amountSats: Long,
502503
val description: String?,
503504
val createdAt: Long,
505+
val frequency: String? = null,
504506
)
505507

506508
enum class RequestType {

0 commit comments

Comments
 (0)