Skip to content

Conversation

BHIIKTOR
Copy link

@BHIIKTOR BHIIKTOR commented Jul 24, 2025

work done:

  • added grantsChanged and enableLogoutOnGrantChange (in their respective places)
  • if the isLoginInProgress grantsChanged defaults to true
        if (!this.isLoginInProgress) {
          this.grantsChanged = true;
        }
  • added documentation and example in how to use it (in docs and the demo app)

could be better? yes a bit
how?, more on the real-time detection of the changes in the grants
is it worth the work? maybe, but probably not, as it already detects the flow we desire


Testing steps:
assuming you have everything installed and you are in the xion.js folder

  • you will need to modify apps/demo-app/src/app/layout.tsx edit treasuryConfig treasury with a treasury contract address you control.

  • cd apps/demo-app && yarn dev

  • then open the page, login and navigate to the page where you can elect between legacy, current modes, there is a new mode called grant change demo, select it.

  • now modify the treasury info on the dev dashboard https://dev.testnet.burnt.com/

  • hit the disconnect button

  • when logging in again it will ask you to validate the new grant info

Copy link

changeset-bot bot commented Jul 24, 2025

🦋 Changeset detected

Latest commit: ce6515d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@burnt-labs/abstraxion-react-native Minor
@burnt-labs/abstraxion-core Minor
@burnt-labs/abstraxion Minor
@burnt-labs/constants Minor
demo-app Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR


### Grant Change Handling

When using the auto logout feature, consider these best practices:
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like the wording "auto logout feature" is ambiguous here. Maybe we should rename this feature.

Copy link
Author

Choose a reason for hiding this comment

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

what about "grant consistency checkup"?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we settled on autoLogoutOnGrantChange

@justinbarry justinbarry requested a review from emperorjm July 24, 2025 23:30
updated the code for the correct behavior
@BHIIKTOR BHIIKTOR force-pushed the feat-ongrantchange branch from 9f447d9 to f30c3ff Compare July 29, 2025 23:31
@justinbarry justinbarry requested a review from burnt-sun August 20, 2025 20:36
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.

2 participants