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

[INDEXER_CLIENT] get_substate without version specified returns earliest substate #1258

Open
humb1t opened this issue Jan 22, 2025 · 1 comment
Assignees
Milestone

Comments

@humb1t
Copy link
Contributor

humb1t commented Jan 22, 2025

Describe the bug

Maybe it's expected behavior, but get_substate method when no exact version specified returns not the latest, but earliest version.

To Reproduce

  1. Upload template
  2. Create component
  3. Make actions to change it's state
  4. Call the following code:
            client_clone
                .get_substate(GetSubstateRequest {
                    address: substate_id,
                    version: None,
                    local_search_only: false,
                })
                .await
                .map(|response| response.substate)

Expected behavior

Would be nice to get the latest substate version when you are defining version: None or have an ability to configure which version to return. For example instead of Option<VersionN> use enum with variants: Latest, First, N(u64).

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS & Version: [e.g. iOS 10.2.1]
  • Browser & Version [e.g. chrome v71.0.12345]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser & Version [e.g. stock browser v0.1.2]

Additional context
Add any other context about the problem here.

@sdbondi sdbondi added this to the v0.8.0 milestone Jan 22, 2025
@sdbondi sdbondi moved this to Selected for development in Tari Digital Assets Network (DAN) backlog Jan 22, 2025
@ksrichard ksrichard self-assigned this Jan 22, 2025
@ksrichard ksrichard moved this from Selected for development to In Progress in Tari Digital Assets Network (DAN) backlog Jan 22, 2025
@ksrichard
Copy link
Collaborator

PR: #1261

@ksrichard ksrichard moved this from In Progress to In Review in Tari Digital Assets Network (DAN) backlog Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

3 participants