mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-02 12:14:09 +01:00
Changed way for generation of change address for electrum wallets. Remove some yats call.
This commit is contained in:
@@ -17,34 +17,34 @@ import 'package:cake_wallet/store/yat/yat_store.dart';
|
||||
|
||||
ReactionDisposer _onCurrentWalletChangeReaction;
|
||||
ReactionDisposer _onCurrentWalletChangeFiatRateUpdateReaction;
|
||||
ReactionDisposer _onCurrentWalletAddressChangeReaction;
|
||||
//ReactionDisposer _onCurrentWalletAddressChangeReaction;
|
||||
|
||||
void startCurrentWalletChangeReaction(AppStore appStore,
|
||||
SettingsStore settingsStore, FiatConversionStore fiatConversionStore) {
|
||||
_onCurrentWalletChangeReaction?.reaction?.dispose();
|
||||
_onCurrentWalletChangeFiatRateUpdateReaction?.reaction?.dispose();
|
||||
_onCurrentWalletAddressChangeReaction?.reaction?.dispose();
|
||||
//_onCurrentWalletAddressChangeReaction?.reaction?.dispose();
|
||||
|
||||
_onCurrentWalletAddressChangeReaction = reaction((_) => appStore.wallet.walletAddresses.address,
|
||||
(String address) async {
|
||||
if (address == appStore.wallet.walletInfo.yatLastUsedAddress) {
|
||||
return;
|
||||
}
|
||||
//_onCurrentWalletAddressChangeReaction = reaction((_) => appStore.wallet.walletAddresses.address,
|
||||
//(String address) async {
|
||||
//if (address == appStore.wallet.walletInfo.yatLastUsedAddress) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
try {
|
||||
final yatStore = getIt.get<YatStore>();
|
||||
await updateEmojiIdAddress(
|
||||
appStore.wallet.walletInfo.yatEmojiId,
|
||||
appStore.wallet.walletAddresses.address,
|
||||
yatStore.apiKey,
|
||||
appStore.wallet.type
|
||||
);
|
||||
appStore.wallet.walletInfo.yatLastUsedAddress = address;
|
||||
await appStore.wallet.walletInfo.save();
|
||||
} catch (e) {
|
||||
print(e.toString());
|
||||
}
|
||||
});
|
||||
//try {
|
||||
// final yatStore = getIt.get<YatStore>();
|
||||
// await updateEmojiIdAddress(
|
||||
// appStore.wallet.walletInfo.yatEmojiId,
|
||||
// appStore.wallet.walletAddresses.address,
|
||||
// yatStore.apiKey,
|
||||
// appStore.wallet.type
|
||||
// );
|
||||
// appStore.wallet.walletInfo.yatLastUsedAddress = address;
|
||||
// await appStore.wallet.walletInfo.save();
|
||||
//} catch (e) {
|
||||
// print(e.toString());
|
||||
//}
|
||||
//});
|
||||
|
||||
_onCurrentWalletChangeReaction = reaction((_) => appStore.wallet, (WalletBase<
|
||||
Balance, TransactionHistoryBase<TransactionInfo>, TransactionInfo>
|
||||
|
||||
Reference in New Issue
Block a user