Skip to content

Commit 17546eb

Browse files
committed
fix: use response amount for gift code claim
1 parent 1c27718 commit 17546eb

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/src/main/java/to/bitkit/repositories/BlocktankRepo.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,9 @@ class BlocktankRepo @Inject constructor(
473473

474474
return GiftClaimResult.SuccessWithLiquidity(
475475
paymentHashOrTxId = giftResponse.bolt11PaymentId ?: giftResponse.id,
476-
sats = amount.toLong(),
476+
sats = giftResponse.bolt11Payment?.paidSat?.toLong()
477+
?: giftResponse.appliedGiftCode?.giftSat?.toLong()
478+
?: amount.toLong(),
477479
invoice = invoice,
478480
code = code,
479481
)

0 commit comments

Comments
 (0)