SmartTokenLabs / token-negotiator

The token-negotiator is an NPM package designed for use with TokenScript.
MIT License
19 stars 11 forks source link

TN caches attestation config #766

Open oleggrib opened 1 year ago

oleggrib commented 1 year ago

TN 2.6.0 caches attestation config and doesn't update it when config changes

steps to reproduce:

  1. start TN with issuer1 : https://devcon-vi.attest.tickets/devcon6.js

  2. update TN issuer to issuer2 : https://stage-perks.smarttokenlabs.com/shanghai_token_demo.js

page still display issuer1

problem solves when I remove LocalStorage variable "tn-tokenStore"

@nicktaras , it happened because of same collectionID, but does it worth to cache data, what already downloaded? Maybe better disable option to cache config?

nicktaras commented 1 year ago

Thanks @oleggrib - this needs to be looked into. This was added to optimise the UX for re-direct, but has some downsides as you have shared. cc: @micwallace

I'll look at the scenarios we have (good and bad) and share ideas to you and Miccy of what we can do. Where ideally it would be good to keep this or a version of cache here.