From 06d0132cbbd4ec0cef5eafdb60fa18d4fca9ac7f Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 12 Mar 2024 12:51:49 +0200 Subject: [PATCH] feat(lightning): utility function to recover any unspent outputs from old force closes --- android/app/build.gradle | 2 +- ios/Podfile.lock | 4 ++-- ios/bitkit.xcodeproj/project.pbxproj | 4 ++-- package.json | 4 ++-- src/screens/Settings/Lightning/Channels.tsx | 24 +++++++++++++++++++++ src/utils/lightning/index.ts | 6 ++++++ yarn.lock | 8 +++---- 7 files changed, 41 insertions(+), 11 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 9b9e73271..f9ca0e2d4 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -78,7 +78,7 @@ android { applicationId "to.synonym.bitkit.wallet" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 102 + versionCode 110 versionName "1.0" multiDexEnabled true missingDimensionStrategy 'react-native-camera', 'general' diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 5f7f22577..33355d994 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -392,7 +392,7 @@ PODS: - React-Core - react-native-keep-awake (1.2.2): - React-Core - - react-native-ldk (0.0.134): + - react-native-ldk (0.0.135): - React - react-native-mmkv (2.11.0): - MMKV (>= 1.2.13) @@ -911,7 +911,7 @@ SPEC CHECKSUMS: react-native-flipper: 9c1957af24b76493ba74f46d000a5c1d485e7731 react-native-image-picker: 2e2e82aba9b6a91a7c78f7d9afde341a2659c7b8 react-native-keep-awake: ad1d67f617756b139536977a0bf06b27cec0714a - react-native-ldk: e4971770e3773415fff4e5aa04df83f9d5485744 + react-native-ldk: fc2d2500236c89d69206f375b11fb99f7d5b3732 react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43 react-native-netinfo: 5ddbf20865bcffab6b43d0e4e1fd8b3896beb898 react-native-quick-base64: a5dbe4528f1453e662fcf7351029500b8b63e7bb diff --git a/ios/bitkit.xcodeproj/project.pbxproj b/ios/bitkit.xcodeproj/project.pbxproj index a486f2fd1..c9a91a07f 100644 --- a/ios/bitkit.xcodeproj/project.pbxproj +++ b/ios/bitkit.xcodeproj/project.pbxproj @@ -556,7 +556,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 102; + CURRENT_PROJECT_VERSION = 110; DEVELOPMENT_TEAM = KYH47R284B; ENABLE_BITCODE = NO; INFOPLIST_FILE = bitkit/Info.plist; @@ -587,7 +587,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 102; + CURRENT_PROJECT_VERSION = 110; DEVELOPMENT_TEAM = KYH47R284B; ENABLE_BITCODE = NO; INFOPLIST_FILE = bitkit/Info.plist; diff --git a/package.json b/package.json index 1b5bab2ef..eb4f83663 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "bitkit", "author": "Synonym", - "version": "1.0.0-beta.102", + "version": "1.0.0-beta.110", "scripts": { "start": "react-native start", "android": "react-native run-android", @@ -51,7 +51,7 @@ "@synonymdev/blocktank-client": "0.0.50", "@synonymdev/blocktank-lsp-http-client": "0.13.1", "@synonymdev/feeds": "2.1.1", - "@synonymdev/react-native-ldk": "0.0.134", + "@synonymdev/react-native-ldk": "0.0.135", "@synonymdev/react-native-lnurl": "0.0.7", "@synonymdev/result": "0.0.2", "@synonymdev/slashtags-auth": "1.0.0-alpha.6", diff --git a/src/screens/Settings/Lightning/Channels.tsx b/src/screens/Settings/Lightning/Channels.tsx index 921cf5bbb..b21802ba6 100644 --- a/src/screens/Settings/Lightning/Channels.tsx +++ b/src/screens/Settings/Lightning/Channels.tsx @@ -36,6 +36,7 @@ import { payLightningInvoice, rebroadcastAllKnownTransactions, recoverOutputs, + recoverOutputsFromForceClose, refreshLdk, setupLdk, } from '../../../utils/lightning'; @@ -565,6 +566,29 @@ const Channels = ({ setSpendingStuckOutputs(false); }} /> +