Code Monkey home page Code Monkey logo

Comments (4)

soosr avatar soosr commented on June 16, 2024 1

I also encountered it once recently. But I was playing with SkipSynchronization flag and I thought it was because of it.
Normally it shouldn't happen.

Taking a look at the code a notification is popped when the WalletRelevantTransactionProcessed event fires:

.FromEventPattern<ProcessedResult>(Services.WalletManager, nameof(Services.WalletManager.WalletRelevantTransactionProcessed))

But if the wallet is not logged in and the WalletState is not Started, it won't show a notification.

So the only thing I can think of is something changed on the business side, around transaction processing. And all of those transactions trigger the event even after the state turned to Started.

@yahiheb Do you know about any change around it recently?

Full code

Observable
.FromEventPattern<ProcessedResult>(Services.WalletManager, nameof(Services.WalletManager.WalletRelevantTransactionProcessed))
.ObserveOn(RxApp.MainThreadScheduler)
.SubscribeAsync(async arg =>
{
var (sender, e) = arg;
if (Services.UiConfig.PrivacyMode ||
!e.IsNews ||
sender is not Wallet { IsLoggedIn: true, State: WalletState.Started } wallet)
{
return;
}
if (TryGetWalletViewModel(wallet, out var walletViewModel) && walletViewModel?.WalletViewModel is { } wvm)
{
if (!e.IsOwnCoinJoin)
{
void OnClick()
{
if (MainViewModel.Instance.IsBusy)
{
return;
}
wvm.NavigateAndHighlight(e.Transaction.GetHash());
}
NotificationHelpers.Show(wallet, e, OnClick);
}
if (walletViewModel.IsSelected && (e.NewlyReceivedCoins.Any() || e.NewlyConfirmedReceivedCoins.Any()))
{
await Task.Delay(200);
wvm.History.SelectTransaction(e.Transaction.GetHash());
}
}
});

from walletwasabi.

yahiheb avatar yahiheb commented on June 16, 2024 1

@yahiheb Do you know about any change around it recently?

No I am not aware of any change around that.

I also encountered it once recently. But I was playing with SkipSynchronization flag and I thought it was because of it.
Normally it shouldn't happen.

For me it happened on master without any changes, but I didn't find a way to reproduce it, but it happened twice.

Maybe someone from the @zkSNACKs/code-team knows.

from walletwasabi.

turbolay avatar turbolay commented on June 16, 2024

It never happened to me, AFAIR, but it will be possible to happen with TurboSync for wallets that reused an internal key after spend because the wallet will open, and then we will process some transactions.

The only cases I can imagine this to happen are scenarios where your wallet starts synchronizing a long synchronization (lot of blocks to dl, struggle to dl blocks...). Meanwhile, some transactions of the same wallet are being confirmed during the synchronization. So then, the wallet will open, and the new filters received will finally be processed and therefore you will receive notifications.

from walletwasabi.

yahiheb avatar yahiheb commented on June 16, 2024

It happened again to me, and whenever this happens is when I open a second wallet.

from walletwasabi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.