add tecMPT_ISSUANCE_NOT_FOUND code#33
Conversation
|
|
||
| mptAlice.create({.ownerCount = 1, .holderCount = 0}); | ||
|
|
||
| mptAlice.authorize({.account = &bob}); |
There was a problem hiding this comment.
I think we should keep the test as it is, I added another test case where the holder didn't authorize
src/xrpld/ledger/detail/View.cpp
Outdated
| } | ||
| else | ||
| return tecINTERNAL; | ||
| return tecMPT_ISSUANCE_NOT_FOUND; |
There was a problem hiding this comment.
If a sender is not the issuer, need to check if mpt issuance doesn't exist. I.e., if it doesn't exist then the error is tecMPT_ISSUANCE_NOT_FOUND and if mpt token doesn't exist then the error is tecNO_AUTH.
There was a problem hiding this comment.
Could you clarify? The code currently does what you have described.
There was a problem hiding this comment.
If a sender is not the issuer then we are getting MPToken object. If this object doesn't exist then tecNO_AUTH is returned. This is not correct error if MPTokenIssuance object doesn't exist. I think we should check at the start of the function if MPTokenIssuance doesn't exist and return tecMPT_ISSUANCE_NOT_FOUND.
There was a problem hiding this comment.
i moved the check to the start of function
High Level Overview of Change
Context of Change
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)