update amount guard

This commit is contained in:
Denis Angell
2023-08-14 12:00:21 -04:00
parent f6258deb96
commit a547f87c46

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 "