Skip to content
This repository was archived by the owner on Nov 9, 2023. It is now read-only.

Use async/await and try/catch in place of Promise methods#74

Merged
rekmarks merged 3 commits intomainfrom
async-await-only
Nov 20, 2020
Merged

Use async/await and try/catch in place of Promise methods#74
rekmarks merged 3 commits intomainfrom
async-await-only

Conversation

@rekmarks
Copy link
Member

@rekmarks rekmarks commented Nov 20, 2020

Replaces all uses of Promise.then and .catch with async/await and try/catch.

Tested with latest MetaMask extension and rpc-cap. Both work once the import issues are resolved.

@rekmarks rekmarks requested a review from a team as a code owner November 20, 2020 04:29
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

It's not entirely clear why the callback was moved into _handleBatch, but either way it all looks correct to me

@rekmarks rekmarks merged commit ebf0c55 into main Nov 20, 2020
@rekmarks rekmarks deleted the async-await-only branch November 20, 2020 16:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants