diff --git a/src/lndmobile/index.ts b/src/lndmobile/index.ts index 6cc037728..289e54ec4 100644 --- a/src/lndmobile/index.ts +++ b/src/lndmobile/index.ts @@ -9,6 +9,7 @@ import Long from "long"; import { NativeModules } from "react-native"; import { checkLndStreamErrorResponse } from "../utils/lndmobile"; import sha from "sha.js"; + const { LndMobile, LndMobileTools } = NativeModules; /** @@ -695,21 +696,3 @@ export type IReadLndLogResponse = string[]; export const readLndLog = async (): Promise => { return [""]; }; - - -export const abandonChannel = async (fundingTxId: string, index: number): Promise => { - const response = await sendCommand({ - request: lnrpc.AbandonChannelRequest, - response: lnrpc.AbandonChannelResponse, - method: "AbandonChannel", - options: { - channelPoint: { - fundingTxidStr: fundingTxId, - outputIndex: index, - }, - iKnowWhatIAmDoing: true, - } - }) - - return response; -} diff --git a/src/windows/InitProcess/DEV_Commands.tsx b/src/windows/InitProcess/DEV_Commands.tsx index f681b7ff8..22b879f71 100644 --- a/src/windows/InitProcess/DEV_Commands.tsx +++ b/src/windows/InitProcess/DEV_Commands.tsx @@ -8,9 +8,9 @@ import { CONSTANTS, JSHash } from "react-native-hash"; import { DeviceEventEmitter, EventEmitter, Linking, NativeEventEmitter, NativeModules, ScrollView, StatusBar, StyleSheet } from "react-native"; import React, { useState } from "react"; import { StorageItem, getItem, setItem, setItemObject, storage } from "../../storage/app"; -import { abandonChannel, checkStatus, connectPeer, decodePayReq, getInfo, getNetworkInfo, getNodeInfo, importGraph, listInvoices, listPeers, listUnspent, queryRoutes } from "../../lndmobile/index"; import { bytesToHexString, bytesToString, stringToUint8Array, toast } from "../../utils"; import { channelAcceptor, channelAcceptorResponse, closeChannel, decodeChannelAcceptRequest, decodeChannelEvent, listChannels, openChannel, pendingChannels } from "../../lndmobile/channel"; +import { checkStatus, connectPeer, decodePayReq, getInfo, getNetworkInfo, getNodeInfo, importGraph, listInvoices, listPeers, listUnspent, queryRoutes } from "../../lndmobile/index"; import { clearTransactions, createTransaction, getTransaction, getTransactions } from "../../storage/database/transaction"; import { deriveKey, derivePrivateKey, genSeed, initWallet, signMessage } from "../../lndmobile/wallet"; import { getItemObject, getPin, getWalletPassword, setWalletPassword } from "../../storage/keystore"; @@ -31,6 +31,7 @@ import PushNotification from "react-native-push-notification"; import { RootStackParamList } from "../../Main"; import Spinner from "../../components/Spinner"; import { StackNavigationProp } from "@react-navigation/stack"; +import { abandonChannel } from '../../lndmobile/channel'; import { blixtTheme } from "../../native-base-theme/variables/commonColor"; import { generateSecureRandom } from "react-native-securerandom"; import { localNotification } from "../../utils/push-notification";