diff --git a/lib/lightning/cw_lightning.dart b/lib/lightning/cw_lightning.dart index 441ffc1bb..323ee08e3 100644 --- a/lib/lightning/cw_lightning.dart +++ b/lib/lightning/cw_lightning.dart @@ -20,35 +20,6 @@ class CWLightning extends Lightning { {required String name, WalletInfo? walletInfo}) => BitcoinNewWalletCredentials(name: name, walletInfo: walletInfo); - @override - List getWordList() => wordlist; - - @override - Map getWalletKeys(Object wallet) { - final lightningWallet = wallet as ElectrumWallet; - final keys = lightningWallet.keys; - - return { - 'wif': keys.wif, - 'privateKey': keys.privateKey, - 'publicKey': keys.publicKey - }; - } - - @override - Future generateNewAddress(Object wallet, String label) async { - final lightningWallet = wallet as ElectrumWallet; - await lightningWallet.walletAddresses.generateNewAddress(label: label); - await wallet.save(); - } - - @override - Future updateAddress(Object wallet, String address, String label) async { - final lightningWallet = wallet as ElectrumWallet; - lightningWallet.walletAddresses.updateAddress(address, label); - await wallet.save(); - } - @override Object createLightningTransactionCredentials(List outputs, {required TransactionPriority priority, int? feeRate}) => @@ -74,35 +45,6 @@ class CWLightning extends Lightning { priority: priority != null ? priority as BitcoinTransactionPriority : null, feeRate: feeRate); - @override - List getAddresses(Object wallet) { - final bitcoinWallet = wallet as ElectrumWallet; - return bitcoinWallet.walletAddresses.addressesByReceiveType - .map((BitcoinAddressRecord addr) => addr.address) - .toList(); - } - - @override - @computed - List getSubAddresses(Object wallet) { - final electrumWallet = wallet as ElectrumWallet; - return electrumWallet.walletAddresses.addressesByReceiveType - .map((BitcoinAddressRecord addr) => ElectrumSubAddress( - id: addr.index, - name: addr.name, - address: electrumWallet.type == WalletType.bitcoinCash ? addr.cashAddr : addr.address, - txCount: addr.txCount, - balance: addr.balance, - isChange: addr.isHidden)) - .toList(); - } - - @override - String getAddress(Object wallet) { - final lightningWallet = wallet as ElectrumWallet; - return lightningWallet.walletAddresses.address; - } - @override String formatterLightningAmountToString({required int amount}) => bitcoinAmountToString(amount: amount * 100000000); @@ -112,18 +54,8 @@ class CWLightning extends Lightning { bitcoinAmountToDouble(amount: amount * 100000000); @override - int formatterStringDoubleToLightningAmount(String amount) => stringDoubleToBitcoinAmount(amount * 100000000); - - @override - List getUnspents(Object wallet) { - final lightningWallet = wallet as ElectrumWallet; - return lightningWallet.unspentCoins; - } - - Future updateUnspents(Object wallet) async { - final lightningWallet = wallet as ElectrumWallet; - await lightningWallet.updateUnspent(); - } + int formatterStringDoubleToLightningAmount(String amount) => + stringDoubleToBitcoinAmount(amount * 100000000); WalletService createLightningWalletService( Box walletInfoSource, Box unspentCoinSource) { diff --git a/res/values/strings_hi.arb b/res/values/strings_hi.arb index 9ae8e14d8..25d9cd225 100644 --- a/res/values/strings_hi.arb +++ b/res/values/strings_hi.arb @@ -320,6 +320,7 @@ "last_30_days": "पिछले 30 दिन", "learn_more": "और अधिक जानें", "light_theme": "रोशनी", + "loading_your_wallet": "अपना बटुआ लोड कर रहा है", "lightning_invoice_min": "इस चालान को प्राप्त करने पर न्यूनतम ${min} SATs के साथ 0.4% का सेटअप शुल्क लागू किया जाएगा।", "lightning_invoice_min_max": "न्यूनतम ${min} SATs के साथ 0.4% का सेटअप शुल्क ${max} SATs से अधिक प्राप्त करने के लिए लागू किया जाएगा", "lightning_invoice_warning": "भुगतान पूरा होने तक आपको ऐप को खुला रखना चाहिए या लेनदेन विफल हो जाएगा", diff --git a/tool/configure.dart b/tool/configure.dart index 295e4817f..8395ca4c4 100644 --- a/tool/configure.dart +++ b/tool/configure.dart @@ -756,26 +756,14 @@ abstract class Lightning { WalletInfo? walletInfo}); WalletCredentials createLightningNewWalletCredentials( {required String name, WalletInfo? walletInfo}); - List getWordList(); - Map getWalletKeys(Object wallet); - Future generateNewAddress(Object wallet, String label); - Future updateAddress(Object wallet, String address, String label); Object createLightningTransactionCredentials(List outputs, {required TransactionPriority priority, int? feeRate}); Object createLightningTransactionCredentialsRaw(List outputs, {TransactionPriority? priority, required int feeRate}); - List getAddresses(Object wallet); - String getAddress(Object wallet); - - List getSubAddresses(Object wallet); - String formatterLightningAmountToString({required int amount}); double formatterLightningAmountToDouble({required int amount}); int formatterStringDoubleToLightningAmount(String amount); - - List getUnspents(Object wallet); - Future updateUnspents(Object wallet); WalletService createLightningWalletService( Box walletInfoSource, Box unspentCoinSource); List getLightningReceivePageOptions();