mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-17 01:37:40 +00:00
hopefully prevents send issue
This commit is contained in:
parent
0899197570
commit
a673d3977f
1 changed files with 11 additions and 5 deletions
|
@ -224,6 +224,15 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Future<void> waitForMwebAddresses() async {
|
||||||
|
// ensure that we have the full 1000 mweb addresses generated before continuing:
|
||||||
|
final mwebAddrs = (walletAddresses as LitecoinWalletAddresses).mwebAddrs;
|
||||||
|
while (mwebAddrs.length < 1000) {
|
||||||
|
print("waiting for mweb addresses to finish generating...");
|
||||||
|
await Future.delayed(const Duration(milliseconds: 1000));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@action
|
@action
|
||||||
@override
|
@override
|
||||||
Future<void> startSync() async {
|
Future<void> startSync() async {
|
||||||
|
@ -250,11 +259,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final mwebAddrs = (walletAddresses as LitecoinWalletAddresses).mwebAddrs;
|
await waitForMwebAddresses();
|
||||||
while (mwebAddrs.length < 1000) {
|
|
||||||
print("waiting for mweb addresses to finish generating...");
|
|
||||||
await Future.delayed(const Duration(milliseconds: 1000));
|
|
||||||
}
|
|
||||||
|
|
||||||
await getStub();
|
await getStub();
|
||||||
await updateUnspent();
|
await updateUnspent();
|
||||||
|
@ -800,6 +805,7 @@ abstract class LitecoinWalletBase extends ElectrumWallet with Store {
|
||||||
if (!mwebEnabled) {
|
if (!mwebEnabled) {
|
||||||
return tx;
|
return tx;
|
||||||
}
|
}
|
||||||
|
await waitForMwebAddresses();
|
||||||
await getStub();
|
await getStub();
|
||||||
|
|
||||||
final resp = await _stub.create(CreateRequest(
|
final resp = await _stub.create(CreateRequest(
|
||||||
|
|
Loading…
Reference in a new issue