mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Changed way for generation of change address for electrum wallets. Remove some yats call.
This commit is contained in:
@@ -77,16 +77,16 @@ abstract class WalletAddressListViewModelBase with Store {
|
||||
}
|
||||
});
|
||||
|
||||
reaction((_) => yatStore.emoji, (String emojiId) => this.emoji = emojiId);
|
||||
//reaction((_) => yatStore.emoji, (String emojiId) => this.emoji = emojiId);
|
||||
|
||||
_onLastUsedYatAddressSubscription =
|
||||
_wallet.walletInfo.yatLastUsedAddressStream.listen((String yatAddress) {
|
||||
if (yatAddress == _wallet.walletAddresses.address) {
|
||||
emoji = yatStore.emoji;
|
||||
} else {
|
||||
emoji = '';
|
||||
}
|
||||
});
|
||||
//_onLastUsedYatAddressSubscription =
|
||||
// _wallet.walletInfo.yatLastUsedAddressStream.listen((String yatAddress) {
|
||||
// if (yatAddress == _wallet.walletAddresses.address) {
|
||||
// emoji = yatStore.emoji;
|
||||
// } else {
|
||||
// emoji = '';
|
||||
// }
|
||||
//});
|
||||
|
||||
if (_wallet.walletAddresses.address == _wallet.walletInfo.yatLastUsedAddress) {
|
||||
emoji = yatStore.emoji;
|
||||
@@ -223,4 +223,15 @@ abstract class WalletAddressListViewModelBase with Store {
|
||||
wallet.save();
|
||||
}
|
||||
}
|
||||
|
||||
@action
|
||||
void generateRandomAddress() {
|
||||
final wallet = _wallet;
|
||||
|
||||
if (wallet.type == WalletType.bitcoin
|
||||
|| wallet.type == WalletType.litecoin) {
|
||||
bitcoin.randomAddress(wallet);
|
||||
wallet.save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user