mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-19 01:04:43 +00:00
ensure we don't initialize mweb until we really have to
This commit is contained in:
parent
a0c315c4cf
commit
2552fb9552
1 changed files with 5 additions and 2 deletions
|
@ -208,7 +208,6 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
_feeRatesTimer =
|
||||
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
||||
|
||||
|
||||
if (!mwebEnabled) {
|
||||
try {
|
||||
await updateAllUnspents();
|
||||
|
@ -556,6 +555,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
if (!mwebEnabled) {
|
||||
return;
|
||||
}
|
||||
await getStub();
|
||||
|
||||
// add the mweb unspents to the list:
|
||||
List<BitcoinUnspent> mwebUnspentCoins = [];
|
||||
// update mweb unspents:
|
||||
|
@ -597,7 +598,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
if (!mwebEnabled) {
|
||||
return balance;
|
||||
}
|
||||
|
||||
await getStub();
|
||||
|
||||
int confirmed = balance.confirmed;
|
||||
int unconfirmed = balance.unconfirmed;
|
||||
try {
|
||||
|
@ -758,6 +760,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
|||
if (!mwebEnabled) {
|
||||
return tx;
|
||||
}
|
||||
await getStub();
|
||||
|
||||
final resp = await _stub.create(CreateRequest(
|
||||
rawTx: hex.decode(tx.hex),
|
||||
|
|
Loading…
Reference in a new issue