mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Rename RippleAsset to Issue and RippleBook to Book:
* Split STAmount out of SerializedTypes.h * New concept of "Issue consistency": when either both or neither of its currency and account are XRP. * Stop checking for consistency of Issue in its constructor. * Clarification of mIsNative logic in STAmount. * Usual cleanups.
This commit is contained in:
committed by
Nik Bougalis
parent
a96dee85d2
commit
206efbf30d
@@ -3004,8 +3004,7 @@ void NetworkOPsImp::getBookPage (
|
||||
// Need to charge a transfer fee to offer owner.
|
||||
uOfferRate = uTransferRate;
|
||||
saOwnerFundsLimit = STAmount::divide (
|
||||
saOwnerFunds, STAmount (noCurrency(), noAccount(),
|
||||
uOfferRate, -9));
|
||||
saOwnerFunds, STAmount (noIssue(), uOfferRate, -9));
|
||||
// TODO(tom): why -9?
|
||||
}
|
||||
else
|
||||
@@ -3038,7 +3037,7 @@ void NetworkOPsImp::getBookPage (
|
||||
saOwnerFunds,
|
||||
STAmount::multiply (
|
||||
saTakerGetsFunded,
|
||||
STAmount (noCurrency(), noAccount(),
|
||||
STAmount (noIssue(),
|
||||
uOfferRate, -9)));
|
||||
|
||||
umBalance[uOfferOwnerID] = saOwnerFunds - saOwnerPays;
|
||||
@@ -3165,7 +3164,7 @@ void NetworkOPsImp::getBookPage (
|
||||
// Need to charge a transfer fee to offer owner.
|
||||
uOfferRate = uTransferRate;
|
||||
// TODO(tom): where does -9 come from?!
|
||||
STAmount amount (noCurrency(), noAccount(), uOfferRate, -9);
|
||||
STAmount amount (noIssue(), uOfferRate, -9);
|
||||
saOwnerFundsLimit = STAmount::divide (saOwnerFunds, amount);
|
||||
}
|
||||
else
|
||||
@@ -3198,7 +3197,7 @@ void NetworkOPsImp::getBookPage (
|
||||
: std::min (saOwnerFunds,
|
||||
STAmount::multiply (
|
||||
saTakerGetsFunded, STAmount (
|
||||
noCurrency(), noAccount(), uOfferRate,
|
||||
noIssue(), uOfferRate,
|
||||
-9)));
|
||||
|
||||
umBalance[uOfferOwnerID] = saOwnerFunds - saOwnerPays;
|
||||
|
||||
Reference in New Issue
Block a user