-
Notifications
You must be signed in to change notification settings - Fork 211
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-909-monero-background-sync-investigation #2041
base: main
Are you sure you want to change the base?
Conversation
…mweb-bg-sync-2
…mweb-bg-sync-2
…mweb-bg-sync-2
Co-authored-by: Omar Hatem <[email protected]>
Co-authored-by: Omar Hatem <[email protected]>
…mweb-bg-sync-2
…mweb-bg-sync-2
ce81a26
to
fddbe7c
Compare
…let types - Improve error handling and status checks during background sync - Modify zano init method to not conflict with default init() - Add dev tools for background sync monitoring and manual rescan
[DNM] Enable debug screen on release to test
don't close monero wallets on AppLifecycleState.paused
…CW-909-monero-background-sync-investigation
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.
@fossephate please continue on this branch and fix the comments here
also, please make the notifications and its settings only in debug mode
and make the whole background tile in the settings only show up on Android
if (monero.Wallet_numSubaddressAccounts(wptr!) <= accountIndex) { | ||
printV("accountIndex is out of bounds"); | ||
return; | ||
} |
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.
why? wouldn't it create the account normally and then create the subaddress?
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.
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.
In background sync it is numSubaddressAccount is always zero.
final firstWallet = litecoinWallets.first; | ||
final wallet = await walletLoadingService.load(firstWallet.type, firstWallet.name); | ||
await wallet.stopSync(); | ||
if (bitcoin!.getMwebEnabled(wallet)) { | ||
syncingWallets.add(wallet); | ||
} |
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.
what if the first wallet doesn't have mweb enabled,
loop through them until you find one that has mweb enabled then add it and break
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.
ah right I forgot we changed mweb to be a per-wallet setting
var node = settingsStore.getCurrentNode(WalletType.bitcoin); | ||
await wallet.connectToNode(node: node); | ||
|
||
bool nodeSupportsSP = await (wallet as ElectrumWallet).getNodeSupportsSilentPayments(); | ||
if (!nodeSupportsSP) { |
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.
shouldn't we first check on whether silent payment scanning is enabled or not
@@ -20,6 +20,7 @@ import workmanager | |||
} | |||
|
|||
WorkmanagerPlugin.registerTask(withIdentifier: "com.fotolockr.cakewallet.monero_sync_task") | |||
WorkmanagerPlugin.registerTask(withIdentifier: "com.fotolockr.cakewallet.mweb_sync_task") |
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 don't see a need for this, the feature is only android and this is not used
// TODO: re-enable (need to figure out how to prevent current wallet from being loaded in the background service!) | ||
// STILL TODO:! |
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.
still todo?!
I see you already added the loadWallet: false, but just need to make sure it's the only way the current wallet is loaded
Co-authored-by: Omar Hatem <[email protected]>
Co-authored-by: Omar Hatem <[email protected]>
Co-authored-by: Omar Hatem <[email protected]>
Description
Pull Request - Checklist