Skip to content

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

Merged
nunomaduro merged 5 commits intomasterfrom
fix/account-client-copy-unhandled-promise
May 19, 2020
Merged

fix(account-client-copy): fixes unhandled promise issue#1154
nunomaduro merged 5 commits intomasterfrom
fix/account-client-copy-unhandled-promise

Conversation

@nunomaduro
Copy link
Copy Markdown

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 Haroenv and chloelbn May 18, 2020 15:30
@nunomaduro nunomaduro self-assigned this May 18, 2020
Co-Authored-By: Haroen Viaene <hello@haroen.me>
@nunomaduro nunomaduro requested a review from Haroenv May 19, 2020 08:46
Copy link
Copy Markdown
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.

Co-Authored-By: Haroen Viaene <hello@haroen.me>
@nunomaduro nunomaduro requested a review from Haroenv May 19, 2020 09:06
Haroenv
Haroenv previously approved these changes May 19, 2020
Co-Authored-By: Haroen Viaene <hello@haroen.me>
@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