-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor: PSP22Error
conversion & assertion
#324
refactor: PSP22Error
conversion & assertion
#324
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
@@ Coverage Diff @@
## chungquantin/feat-psp22_example #324 +/- ##
================================================================
Coverage 51.60% 51.60%
================================================================
Files 48 48
Lines 4910 4910
Branches 4910 4910
================================================================
Hits 2534 2534
Misses 2327 2327
Partials 49 49 |
PSP22Error
conversion & assertion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will review the pop drink PR now quickly but looking great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
93de4b8
into
chungquantin/feat-psp22_example
Refactoring the pop-api error assertions to make it readable instead of comparing with raw bytes. This PR relies on the PR in pop-drink: r0gue-io/pop-drink#14
About the implementation
Currently, in the example PR, the pop-api error assertion involves converting
pop_api::primitives::Module
to au32
. Our goal is to simplify the assertion to make it more readable, aiming for the following conversion chain:Final outcome
How to assert the
PSP22Error <> pop_drink::Error
?If the PalletError
assertion
failedIf the DispatchError
assertion
failed (other than PalletError)