unlock icon indicating copy to clipboard operation
unlock copied to clipboard

feat(unlock-js, locksmith): updated UnlockJS to support transaction options

Open julien51 opened this issue 2 years ago • 4 comments

Description

I am adding a new critical feature to the unlock-js library: the ability to pass transaction options.

This will be used to run "simulations" that can then help us do 2 things:

  • account for real gas costs on renewals or credit card purchases (rather than hardcoded value)
  • not showing the "claim" button when the key could not be airdropped because the lock uses a hook

Checklist:

  • [X] 1 PR, 1 purpose: my Pull Request applies to a single purpose
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have updated the docs to reflect my changes if applicable
  • [ ] I have added tests (and stories for frontend components) that prove my fix is effective or that my feature works
  • [ ] I have performed a self-review of my own code
  • [ ] If my code involves visual changes, I am adding applicable screenshots to this thread

Release Note Draft Snippet

julien51 avatar Sep 19 '22 21:09 julien51

@clemsos what's the way to run all tests again?

julien51 avatar Sep 20 '22 02:09 julien51

/run-all-tests

so this works but the results aren't shown here :/

you have to dig into the "actions" tab to find it > https://github.com/unlock-protocol/unlock/actions/runs/3086054579

there is an open issue for this already but no fix in mind so far #9306 should be a way with existing gh actions

clemsos avatar Sep 20 '22 07:09 clemsos

HA! Thank you for this. I am very surprised that tests are passing here because I changed the API for walletService on many calls and I would expect them to fail as a consequence :(

julien51 avatar Sep 20 '22 12:09 julien51

The code itself looks good (It does change the grantKeyExtension and grantKeys in dispatcher we depend on). I tested bunch of functions on the dashboard too.

searchableguy avatar Sep 22 '22 16:09 searchableguy