Skip to content

Commit 9c3b5b3

Browse files
committed
chore(ocp/transactors): ack back message after receiving metadata on scan
Signed-off-by: Brandon McAnsh <[email protected]>
1 parent e49f489 commit 9c3b5b3

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

apps/flipcash/shared/session/src/main/kotlin/com/flipcash/app/session/internal/RealSessionController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,7 @@ class RealSessionController @Inject constructor(
802802

803803
trace(
804804
tag = "Session",
805-
message = "Scanned: ${payload.fiat!!.formatted()} ${payload.fiat!!.currencyCode}"
805+
message = "Scanned: ${payload.fiat!!.quarks} ${payload.fiat!!.currencyCode}"
806806
)
807807
val owner = userManager.accountCluster ?: return
808808

services/opencode/src/main/kotlin/com/getcode/opencode/internal/transactors/GrabBillTransactor.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,14 @@ internal class GrabBillTransactor(
9898
}.fold(
9999
onSuccess = {
100100
// 5. Wait for confirmation
101-
transactionController.pollIntentMetadata(
101+
transactionController.pollIntentMetadata<TransactionMetadata.PublicPayment>(
102102
owner = tokenizedCluster.authority.keyPair,
103103
intentId = data.rendezvous.toPublicKey(),
104104
debugLogs = true
105-
)
105+
).onSuccess {
106+
// 6. Ack the receipt of the give request to clear it from the stream
107+
messagingController.ackMessages(data.rendezvous, listOf(messageId))
108+
}
106109
}, onFailure = {
107110
if (it !is GrabTransactorError) {
108111
ErrorUtils.handleError(it)

0 commit comments

Comments
 (0)