tasit-apps icon indicating copy to clipboard operation
tasit-apps copied to clipboard

Using events and/or action confirmation listeners instead of `waitForOneConfirmation`

Open marcelomorgado opened this issue 5 years ago • 11 comments

UX should take advantage of events from contracts and actions.

marcelomorgado avatar Mar 19 '19 11:03 marcelomorgado

@pcowgill commented:

I'm wondering whether the await style still makes sense for higher-level functions that wrap Ethereum interactions. I think it doesn't but we'll want to set best practices for the right pattern when using this style to not end up in nested "callback hell"

The callback style of listening for success with a subscription/callback makes the most sense when used along with optimistic updates, which we aren't doing here yet.

Refs: https://github.com/tasitlabs/tasit/pull/163#discussion_r267405172

marcelomorgado avatar Mar 20 '19 16:03 marcelomorgado

@marcelomorgado I think this will follow nicely after the SDK updates. Using conf’s is worth considering in combination with or as an alternative to using events

pcowgill avatar May 01 '19 03:05 pcowgill

(These SDK updates https://github.com/tasitlabs/TasitSDK/issues/219)

pcowgill avatar May 01 '19 03:05 pcowgill

Yes, we are almost there, I think we have only a few bugs to fix before to do this. https://github.com/tasitlabs/TasitSDK/issues/368, https://github.com/tasitlabs/TasitSDK/issues/367, https://github.com/tasitlabs/TasitSDK/issues/366

marcelomorgado avatar May 02 '19 16:05 marcelomorgado

Yes, we are almost there, I think we have only a few bugs to fix before to do this. tasitlabs/TasitSDK#368, tasitlabs/TasitSDK#367, tasitlabs/TasitSDK#366

Great! And yep, agreed that those are gating. Thanks for sharing the specific issues.

pcowgill avatar May 02 '19 16:05 pcowgill

Updating:

~~https://github.com/tasitlabs/TasitSDK/issues/368~~ Closed https://github.com/tasitlabs/TasitSDK/issues/367 fixed on PR https://github.com/tasitlabs/TasitSDK/pull/383

marcelomorgado avatar May 07 '19 17:05 marcelomorgado

I think that issue https://github.com/tasitlabs/TasitSDK/issues/384 should be solved as well.

marcelomorgado avatar May 07 '19 17:05 marcelomorgado

Updating:

~tasitlabs/TasitSDK#368~ Closed tasitlabs/TasitSDK#367 fixed on PR tasitlabs/TasitSDK#383

Great!

pcowgill avatar May 07 '19 18:05 pcowgill

I think that issue tasitlabs/TasitSDK#384 should be solved as well.

Yes, that makes sense

pcowgill avatar May 07 '19 18:05 pcowgill

All gating issues were solved.

marcelomorgado avatar May 08 '19 10:05 marcelomorgado

All gating issues were solved.

Awesome, thanks!

pcowgill avatar May 08 '19 12:05 pcowgill