mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-03-11 17:06:34 +00:00
fixes
This commit is contained in:
parent
b8f4c07d6f
commit
660e3ec427
2 changed files with 26 additions and 27 deletions
|
@ -31,19 +31,28 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
||||||
Map<String, int>? initialRegularAddressIndex,
|
Map<String, int>? initialRegularAddressIndex,
|
||||||
Map<String, int>? initialChangeAddressIndex,
|
Map<String, int>? initialChangeAddressIndex,
|
||||||
}) : super(
|
}) : super(
|
||||||
mnemonic: mnemonic,
|
mnemonic: mnemonic,
|
||||||
password: password,
|
password: password,
|
||||||
walletInfo: walletInfo,
|
walletInfo: walletInfo,
|
||||||
unspentCoinsInfo: unspentCoinsInfo,
|
unspentCoinsInfo: unspentCoinsInfo,
|
||||||
networkType: networkParam == null
|
networkType: networkParam == null
|
||||||
? bitcoin.bitcoin
|
? bitcoin.bitcoin
|
||||||
: networkParam == BitcoinNetwork.mainnet
|
: networkParam == BitcoinNetwork.mainnet
|
||||||
? bitcoin.bitcoin
|
? bitcoin.bitcoin
|
||||||
: bitcoin.testnet,
|
: bitcoin.testnet,
|
||||||
initialAddresses: initialAddresses,
|
initialAddresses: initialAddresses,
|
||||||
initialBalance: initialBalance,
|
initialBalance: initialBalance,
|
||||||
seedBytes: seedBytes,
|
seedBytes: seedBytes,
|
||||||
currency: CryptoCurrency.btc) {
|
currency: CryptoCurrency.btc,
|
||||||
|
balanceFactory: (
|
||||||
|
{required int confirmed, required int unconfirmed, required int frozen}) {
|
||||||
|
return ElectrumBalance(
|
||||||
|
confirmed: confirmed,
|
||||||
|
unconfirmed: unconfirmed,
|
||||||
|
frozen: frozen,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
) {
|
||||||
walletAddresses = BitcoinWalletAddresses(
|
walletAddresses = BitcoinWalletAddresses(
|
||||||
walletInfo,
|
walletInfo,
|
||||||
electrumClient: electrumClient,
|
electrumClient: electrumClient,
|
||||||
|
|
|
@ -32,15 +32,6 @@ part 'lightning_wallet.g.dart';
|
||||||
|
|
||||||
class LightningWallet = LightningWalletBase with _$LightningWallet;
|
class LightningWallet = LightningWalletBase with _$LightningWallet;
|
||||||
|
|
||||||
ElectrumBalance myBalanceFactory(
|
|
||||||
{required int confirmed, required int unconfirmed, required int frozen}) {
|
|
||||||
return ElectrumBalance(
|
|
||||||
confirmed: confirmed,
|
|
||||||
unconfirmed: unconfirmed,
|
|
||||||
frozen: frozen,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
abstract class LightningWalletBase
|
abstract class LightningWalletBase
|
||||||
extends ElectrumWalletBase<LightningBalance, LightningTransactionInfo> with Store {
|
extends ElectrumWalletBase<LightningBalance, LightningTransactionInfo> with Store {
|
||||||
bool _isTransactionUpdating;
|
bool _isTransactionUpdating;
|
||||||
|
@ -72,13 +63,12 @@ abstract class LightningWalletBase
|
||||||
initialBalance: initialBalance,
|
initialBalance: initialBalance,
|
||||||
seedBytes: seedBytes,
|
seedBytes: seedBytes,
|
||||||
currency: CryptoCurrency.btcln,
|
currency: CryptoCurrency.btcln,
|
||||||
// balanceFactory: myBalanceFactory,
|
|
||||||
balanceFactory: (
|
balanceFactory: (
|
||||||
{required int confirmed, required int unconfirmed, required int frozen}) {
|
{required int confirmed, required int unconfirmed, required int frozen}) {
|
||||||
return LightningBalance(
|
return LightningBalance(
|
||||||
confirmed: 0,
|
confirmed: confirmed,
|
||||||
unconfirmed: 0,
|
unconfirmed: unconfirmed,
|
||||||
frozen: 0,
|
frozen: frozen,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
) {
|
) {
|
||||||
|
|
Loading…
Reference in a new issue