Merge pull request #89 from Xahau/uritoken-v2-testing

add `sfDestination` tests for URIToken
This commit is contained in:
RichardAH
2023-08-17 11:47:03 +02:00
committed by GitHub
2 changed files with 94 additions and 6 deletions

View File

@@ -60,7 +60,8 @@ URIToken::preflight(PreflightContext const& ctx)
return temBAD_CURRENCY;
}
if (amt == beast::zero && !ctx.tx.isFieldPresent(sfDestination))
if (tt == ttURITOKEN_MINT && amt == beast::zero &&
!ctx.tx.isFieldPresent(sfDestination))
{
JLOG(ctx.j.warn()) << "Malformed transaction. "
<< "If no sell-to destination is specified "