mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-19 09:15:11 +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 =
|
_feeRatesTimer =
|
||||||
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
Timer.periodic(const Duration(minutes: 1), (timer) async => await updateFeeRates());
|
||||||
|
|
||||||
|
|
||||||
if (!mwebEnabled) {
|
if (!mwebEnabled) {
|
||||||
try {
|
try {
|
||||||
await updateAllUnspents();
|
await updateAllUnspents();
|
||||||
|
@ -556,6 +555,8 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
if (!mwebEnabled) {
|
if (!mwebEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
await getStub();
|
||||||
|
|
||||||
// add the mweb unspents to the list:
|
// add the mweb unspents to the list:
|
||||||
List<BitcoinUnspent> mwebUnspentCoins = [];
|
List<BitcoinUnspent> mwebUnspentCoins = [];
|
||||||
// update mweb unspents:
|
// update mweb unspents:
|
||||||
|
@ -597,6 +598,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
if (!mwebEnabled) {
|
if (!mwebEnabled) {
|
||||||
return balance;
|
return balance;
|
||||||
}
|
}
|
||||||
|
await getStub();
|
||||||
|
|
||||||
int confirmed = balance.confirmed;
|
int confirmed = balance.confirmed;
|
||||||
int unconfirmed = balance.unconfirmed;
|
int unconfirmed = balance.unconfirmed;
|
||||||
|
@ -758,6 +760,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
if (!mwebEnabled) {
|
if (!mwebEnabled) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
|
await getStub();
|
||||||
|
|
||||||
final resp = await _stub.create(CreateRequest(
|
final resp = await _stub.create(CreateRequest(
|
||||||
rawTx: hex.decode(tx.hex),
|
rawTx: hex.decode(tx.hex),
|
||||||
|
|
Loading…
Reference in a new issue