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,
|
||||
children: [
|
||||
Text(
|
||||
"Reuse addresses by default",
|
||||
"Reuse receiving address by default",
|
||||
style: STextStyles.w600_20(context),
|
||||
),
|
||||
],
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
import 'dart:math';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
@ -1335,17 +1334,11 @@ mixin ElectrumXInterface<T extends ElectrumXCurrencyInterface>
|
|||
needsGenerate = txCount > 0 || currentReceiving.derivationIndex < 0;
|
||||
}
|
||||
|
||||
// TODO this in the wrong place
|
||||
// If reuseAddress is set, don't generate an address by default.
|
||||
final WalletInfo info = mainDB.isar.walletInfo
|
||||
.where()
|
||||
.walletIdEqualTo(walletId)
|
||||
.findFirstSync()!;
|
||||
if (info.otherDataJsonString != null) {
|
||||
final otherData = jsonDecode(info.otherDataJsonString!);
|
||||
if (otherData[WalletInfoKeys.reuseAddress] as bool? ?? false) {
|
||||
if (info.otherData[WalletInfoKeys.reuseAddress] as bool? ?? false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (needsGenerate) {
|
||||
await generateNewReceivingAddress();
|
||||
|
|
Loading…
Reference in a new issue