Skip to content
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

Debug Only: Inspect FactorInstancesCache #1391

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

CyonAlexRDX
Copy link
Contributor

@CyonAlexRDX CyonAlexRDX commented Nov 19, 2024

Note

Blocked by radixdlt/sargon#254

Tip

Maybe not amazing TCA code, but this is a only a debug tool.

Update newWallet to for DEBUG builds pre-derive factor instances for the BDFS (I have not modified any other Add Factor Source code to pre-derive, since we are not yet using SargonOS to add FactorSources - we are though, using SargonOS for newWallet so we can pre-derive instances for the BDFS).

The purpose of this is to make it possible for us to debug the contents of the FactorInstancesCache and also delete it and ensuring that the behaviour of Sargon is correct even with a deleted cache.

Screenshot

IMG_0952

Demo (video)

RPReplay_Final1732014917.MP4

@@ -109,15 +109,6 @@
"version" : "11.6.4"
}
},
{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be reverted ofc... and updated to use Sargon once the needed branch is merged.

@@ -273,6 +273,8 @@ extension InteractionReview.Sections {
accountDepositSetting: accountDepositSetting,
accountDepositExceptions: accountDepositExceptions
)
case .some(.deleteAccounts(accountAddresses: let accountAddresses)):
fatalError()
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will go away when #1389 is merged and I rebase to main.

@@ -42,11 +42,11 @@ extension Account {
}

mutating func hide() {
flags.append(.deletedByUser)
flags.append(.hiddenByUser)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will go away once rebased on main with changes from #1389

#else
shouldPrederiveInstances = false
#endif
return try await SargonOS.shared.newWallet(shouldPrederiveInstances: shouldPrederiveInstances)
Copy link
Contributor Author

@CyonAlexRDX CyonAlexRDX Nov 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@micbakos-rdx breaking change for Android, you need to pass shouldPrederiveInstances: false to newWallet once Sargon "FIP" PR is merged.

@CyonAlexRDX CyonAlexRDX marked this pull request as ready for review November 28, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants