ApeWorX / ApePay

A smart contract payment system built for automated service management
https://apeworx.io/apepay
Apache License 2.0
18 stars 5 forks source link

refactor: make isCancellable sync [SBK-370] #78

Closed alexisnsns closed 7 months ago

alexisnsns commented 7 months ago

isCancellable used to be async, with the cancel component displaying a loading message while waiting for the promise to resolve, which would take ~5-10 secs.

I added the startTime in the Stream constructor to make it sync.

Now there is little to no loading time in the cancel stream component, which is a great UX win.

Screenshot 2023-11-22 at 12 03 57

It allows to display the remaining time almost instantly when you load the stream.

linear[bot] commented 7 months ago
SBK-370 "Refacto/ make isCancellable sync" (ApeWorX/ApePay #78)

isCancellable used to be async; we displayed *'fetching remaining time...'* while waiting for the promise to return, which would take \~5-10 secs. I added the startTime in the Stream constructor to make it sync. Now there is little to no loading time in the cancel stream component, which is a great UX win. Screenshot 2023-11-22 at 12 03 57 It allows to display the remaining time almost instantly when you load the stream. --- [ApeWorX/ApePay #78](https://github.com/ApeWorX/ApePay/pull/78) by [alexisnsns](https://github.com/alexisnsns) on GitHub *via LinearSync*

alexisnsns commented 7 months ago

Also changed the wording to add 'simulations' and edited the css of the cancel button to make it so that on the demo app the user knows when a button is disabled

alexisnsns commented 7 months ago
Screenshot 2023-11-22 at 13 57 52

Also finally added a favicon: it's one less error to deal with, which makes the console cleaner and debugging easier.