Gateway balance fix (#535)

Fixes #464
This commit is contained in:
cyan317
2023-03-08 15:08:20 +00:00
committed by GitHub
parent 6b78b1ad8b
commit 7a819f4955

View File

@@ -151,7 +151,17 @@ doGatewayBalances(Context const& context)
bal = -balance;
}
else
bal -= balance;
{ // when overflow happens, insert a flag to indicate
// https://github.com/XRPLF/rippled/pull/4355
try
{
bal -= balance;
}
catch (std::runtime_error& e)
{
response["overflow"] = true;
}
}
}
}
return true;