Skip to content

Conversation

@clangenb
Copy link
Contributor

@clangenb clangenb commented Aug 10, 2025

Closes #141

After the update in #142, we got several errors like "Cannot read private field". This is because private fields were introduced in the meantime in JS and Vue or Pinia-stores strip them under certain circumstances.

  • Do not store complex objects in the store if possible (e.g. the worker).

  • When handling reactive objects declared with ref we do:

    • If we need to pass the object to the UI template, but we don't need reactivity (e.g. shieldingTargetApi), we assign the value like shieldingTargetApi.value = markRaw(api);
    • If we need reactivity, we can not mark it as raw, but we can convert them to a raw object before accessing internal private fields e.g. toRaw(notesBucketInfo). Note: simple things like Option.unwrap() need internal private state.
    • If we don't need reactivity, nor passing them into a UI-template, variables should just be regular variables.
  • Other changes:

    • Fixed bunch of warnings during the debugging phase.

Tested:

  • Unshield works (DOT production)
  • Private transfer works (DOT production)

@clangenb clangenb mentioned this pull request Aug 10, 2025
@clangenb clangenb requested a review from brenzi August 10, 2025 04:18
Copy link
Contributor

@brenzi brenzi left a comment

Choose a reason for hiding this comment

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

LGTM

@brenzi brenzi merged commit 7ce0b36 into master Aug 12, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

non-fatal error unsupported extrinsic V5

3 participants