cleanup INITIAL_IMPORT_XRP

This commit is contained in:
Denis Angell
2023-08-01 20:17:14 +02:00
parent 0c4441ac36
commit 2c61c4a79d
2 changed files with 4 additions and 3 deletions

View File

@@ -193,8 +193,9 @@ GenesisMint::doApply()
}
else // give them 2 XRP if the account didn't exist, same as ttIMPORT
{
sle->setFieldAmount(sfBalance, Import::INITIAL_IMPORT_XRP);
dropsAdded += Import::INITIAL_IMPORT_XRP;
XRPAmount const initialXrp = Import::computeStartingBonus(ctx_.view());
sle->setFieldAmount(sfBalance, initialXrp);
dropsAdded += initialXrp;
}
}
else if (amt)

View File

@@ -1164,7 +1164,7 @@ Import::doApply()
bool const create = !sle;
STAmount startBal = create ? STAmount(INITIAL_IMPORT_XRP) : sle->getFieldAmount(sfBalance);
STAmount startBal = create ? STAmount(Import::computeStartingBonus(ctx_.view())) : sle->getFieldAmount(sfBalance);
STAmount finalBal = startBal + burn;
if (finalBal < startBal)