Skip to content

Commit e29da74

Browse files
fix: lightning receive polling
1 parent 7e1cdc6 commit e29da74

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

bun.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

client/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ PODS:
262262
- hermes-engine/Pre-built (= 0.81.5)
263263
- hermes-engine/Pre-built (0.81.5)
264264
- MMKVCore (2.2.4)
265-
- NitroArk (0.0.82):
265+
- NitroArk (0.0.83):
266266
- hermes-engine
267267
- NitroModules
268268
- RCTRequired
@@ -2976,7 +2976,7 @@ SPEC CHECKSUMS:
29762976
FBLazyVector: e95a291ad2dadb88e42b06e0c5fb8262de53ec12
29772977
hermes-engine: 8bb0bdb1bf49c3bbc17cf4c2d02dcc2f706ab555
29782978
MMKVCore: f2dd4c9befea04277a55e84e7812f930537993df
2979-
NitroArk: 61ef84ad85ad0ee2edd5ec319373f8f6c165c1c9
2979+
NitroArk: 7ac0dc1f81791a60f06b2963be90418c1f599a5e
29802980
NitroMmkv: a7f267ea1359e25072960fc17f8b2c2e023d7bac
29812981
NitroModules: b7b51ba7f49acf5c4c13a56f2b0037b5f7bf55a7
29822982
NoahTools: efea1336628719c3ab4a565f3c03d2deeadd3d14

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"react-native-gesture-handler": "~2.28.0",
103103
"react-native-keychain": "^10.0.0",
104104
"react-native-mmkv": "^4.1.0",
105-
"react-native-nitro-ark": "^0.0.82",
105+
"react-native-nitro-ark": "^0.0.83",
106106
"react-native-nitro-modules": "^0.31.10",
107107
"react-native-qrcode-svg": "^6.3.21",
108108
"react-native-reanimated": "~4.1.6",

client/src/hooks/usePayments.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ export function useCheckAndClaimLnReceive() {
299299

300300
log.d("Claim result", [result]);
301301

302-
if (result.isOk() && result.value && result.value.length > 0) {
302+
if (result.isOk() && result.value && result.value.finished_at) {
303303
return { amountSat };
304304
}
305305

client/src/lib/paymentsApi.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import {
2424
Bolt11Invoice,
2525
BoardResult,
2626
RoundStatus,
27-
BarkVtxo,
27+
LightningReceive,
2828
} from "react-native-nitro-ark";
2929
import { Result, ResultAsync } from "neverthrow";
3030

@@ -205,7 +205,7 @@ export const history = async (): Promise<Result<BarkMovement[], Error>> => {
205205
export const tryClaimLightningReceive = async (
206206
paymentHash: string,
207207
wait: boolean = false,
208-
): Promise<Result<BarkVtxo[], Error>> => {
208+
): Promise<Result<LightningReceive, Error>> => {
209209
return ResultAsync.fromPromise(tryClaimLightningReceiveNitro(paymentHash, wait), (error) => {
210210
const e = new Error(
211211
`Failed to check and claim lightning receive: ${error instanceof Error ? error.message : String(error)}`,

client/src/lib/pushNotifications.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ TaskManager.defineTask<Notifications.NotificationTaskPayload>(
148148
true,
149149
);
150150

151-
if (claimResult.isOk() && claimResult.value && claimResult.value.length > 0) {
151+
if (claimResult.isOk() && claimResult.value && claimResult.value.finished_at) {
152152
const sats = notificationData.amount / 1000;
153153
await Notifications.scheduleNotificationAsync({
154154
content: {

0 commit comments

Comments
 (0)