mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
small tweaks
This commit is contained in:
parent
8fb49ef029
commit
4f40572366
2 changed files with 4 additions and 11 deletions
|
@ -422,7 +422,7 @@ class _MoreFeaturesDialogState extends ConsumerState<MoreFeaturesDialog> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Text(
|
Text(
|
||||||
"Reuse addresses by default",
|
"Reuse receiving address by default",
|
||||||
style: STextStyles.w600_20(context),
|
style: STextStyles.w600_20(context),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:convert';
|
|
||||||
import 'dart:math';
|
import 'dart:math';
|
||||||
import 'dart:typed_data';
|
import 'dart:typed_data';
|
||||||
|
|
||||||
|
@ -1335,16 +1334,10 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
|
||||||
needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0;
|
needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO this in the wrong place
|
||||||
// If reuseAddress is set, don't generate an address by default.
|
// If reuseAddress is set, don't generate an address by default.
|
||||||
final WalletInfo info = mainDB.isar.walletInfo
|
if (info.otherData[WalletInfoKeys.reuseAddress] as bool? ?? false) {
|
||||||
.where()
|
return;
|
||||||
.walletIdEqualTo(walletId)
|
|
||||||
.findFirstSync()!;
|
|
||||||
if (info.otherDataJsonString != null) {
|
|
||||||
final otherData = jsonDecode(info.otherDataJsonString!);
|
|
||||||
if (otherData[WalletInfoKeys.reuseAddress] as bool? ?? false) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (needsGenerate) {
|
if (needsGenerate) {
|
||||||
|
|
Loading…
Reference in a new issue