-
Notifications
You must be signed in to change notification settings - Fork 249
CW 1109 fix: incorrect restore height sometimes being set on monero #2390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CW 1109 fix: incorrect restore height sometimes being set on monero #2390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is not the intended change, right? as it was modified recently by @CumpsD
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the as double
s should probably be ok.
the List<Map<String, dynamic>>
I tried as well, but it crashed out when I tested so I had to go List<dynamic>
But if you test List<Map<String, dynamic>>
and it works, that would be more correct, but please do test it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not needed but couldn't get the code to compile with that, I can revert
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me ping @konstantinullrich to see what he has to say :)
final distance = | ||
DateTime.now().millisecondsSinceEpoch - date.millisecondsSinceEpoch; | ||
DateTime.now().difference(date).inSeconds; | ||
final daysTmp = (distance / 86400).round(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor:
final daysTmp = DateTime.now().difference(date).inDays;
unawaited(() async { | ||
await Future.delayed(Duration(seconds: 10)); | ||
_setHeightFromDate(tryNum: tryNum + 1); | ||
}()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we return after this unawaited
?
else it will excute
monero_wallet.setRecoveringFromSeed(isRecovery: true);
setupBackgroundSync(password, currentWallet!);
for the other trials as well,
or are they safe functions to get called frequently?
even better i would prefer separating the function that can fail and retried, from the other function calls
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we can continue, this function is safe to call multiple times, we can separate that if you prefer, but setupBackgroundSync also needs to be called - so only setRecoveringFromSeed would get removed
Issue Number (if Applicable): Fixes #
Description
fix: incorrect restore height sometimes being set on monero
Pull Request - Checklist