mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 03:05:11 +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>? initialChangeAddressIndex,
|
||||
}) : super(
|
||||
mnemonic: mnemonic,
|
||||
password: password,
|
||||
walletInfo: walletInfo,
|
||||
unspentCoinsInfo: unspentCoinsInfo,
|
||||
networkType: networkParam == null
|
||||
? bitcoin.bitcoin
|
||||
: networkParam == BitcoinNetwork.mainnet
|
||||
? bitcoin.bitcoin
|
||||
: bitcoin.testnet,
|
||||
initialAddresses: initialAddresses,
|
||||
initialBalance: initialBalance,
|
||||
seedBytes: seedBytes,
|
||||
currency: CryptoCurrency.btc) {
|
||||
mnemonic: mnemonic,
|
||||
password: password,
|
||||
walletInfo: walletInfo,
|
||||
unspentCoinsInfo: unspentCoinsInfo,
|
||||
networkType: networkParam == null
|
||||
? bitcoin.bitcoin
|
||||
: networkParam == BitcoinNetwork.mainnet
|
||||
? bitcoin.bitcoin
|
||||
: bitcoin.testnet,
|
||||
initialAddresses: initialAddresses,
|
||||
initialBalance: initialBalance,
|
||||
seedBytes: seedBytes,
|
||||
currency: CryptoCurrency.btc,
|
||||
balanceFactory: (
|
||||
{required int confirmed, required int unconfirmed, required int frozen}) {
|
||||
return ElectrumBalance(
|
||||
confirmed: confirmed,
|
||||
unconfirmed: unconfirmed,
|
||||
frozen: frozen,
|
||||
);
|
||||
},
|
||||
) {
|
||||
walletAddresses = BitcoinWalletAddresses(
|
||||
walletInfo,
|
||||
electrumClient: electrumClient,
|
||||
|
@ -109,4 +118,4 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
|||
networkParam: snp.network,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,15 +32,6 @@ part 'lightning_wallet.g.dart';
|
|||
|
||||
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
|
||||
extends ElectrumWalletBase<LightningBalance, LightningTransactionInfo> with Store {
|
||||
bool _isTransactionUpdating;
|
||||
|
@ -72,13 +63,12 @@ abstract class LightningWalletBase
|
|||
initialBalance: initialBalance,
|
||||
seedBytes: seedBytes,
|
||||
currency: CryptoCurrency.btcln,
|
||||
// balanceFactory: myBalanceFactory,
|
||||
balanceFactory: (
|
||||
{required int confirmed, required int unconfirmed, required int frozen}) {
|
||||
return LightningBalance(
|
||||
confirmed: 0,
|
||||
unconfirmed: 0,
|
||||
frozen: 0,
|
||||
confirmed: confirmed,
|
||||
unconfirmed: unconfirmed,
|
||||
frozen: frozen,
|
||||
);
|
||||
},
|
||||
) {
|
||||
|
|
Loading…
Reference in a new issue