Skip to content

fix(account-client-copy): fixes unhandled promise issue #1154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
May 19, 2020

Conversation

nunomaduro
Copy link

This pull request fixes the issue that promises rejections weren't being bubble up to the end-user when calling accountCopyIndex(source, destination) without an wait method. It also contains some changes related to testing so we can ensure the good behaviour of this pull request.

Fixes #1153

  1. Tests were added to test accountCopyIndex with and without wait calls at the end.
  2. Also, added a test when accountCopyIndex fails in middle, to make sure it bubbles up the error correctly.
  3. Finally, it stops comparing rules strictly, and the API Introduced the _metadata field on getRule.

@nunomaduro nunomaduro added the bug label May 18, 2020
@nunomaduro nunomaduro requested review from chloelbn and Haroenv May 18, 2020 15:30
@nunomaduro nunomaduro self-assigned this May 18, 2020
@nunomaduro nunomaduro requested a review from Haroenv May 19, 2020 08:46
Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

I think it's correct now, but can be simplified slightly further.

@nunomaduro nunomaduro requested a review from Haroenv May 19, 2020 09:06
Haroenv
Haroenv previously approved these changes May 19, 2020
@nunomaduro nunomaduro merged commit e9761a7 into master May 19, 2020
@nunomaduro nunomaduro deleted the fix/account-client-copy-unhandled-promise branch May 19, 2020 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

accountCopyIndex has unhandled promise rejection
2 participants