Allow seeds to be specified as hex.

This commit is contained in:
Arthur Britto
2012-12-29 17:37:56 -08:00
parent 0339aa9669
commit eaaeaaba15

View File

@@ -754,6 +754,7 @@ bool RippleAddress::setSeedGeneric(const std::string& strText)
{
RippleAddress naTemp;
bool bResult = true;
uint128 uSeed;
if (strText.empty()
|| naTemp.setAccountID(strText)
@@ -764,6 +765,10 @@ bool RippleAddress::setSeedGeneric(const std::string& strText)
{
bResult = false;
}
else if (strText.length() == 32 && uSeed.SetHex(strText, true))
{
setSeed(uSeed);
}
else if (setSeed(strText))
{
// std::cerr << "Recognized seed." << std::endl;