mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Implement transaction creation for nickname_set.
This commit is contained in:
@@ -259,6 +259,44 @@ Transaction::pointer Transaction::sharedCreditSet(
|
||||
return tResult->setCreditSet(naPrivateKey, naDstAccountID, saLimitAmount, uAcceptRate);
|
||||
}
|
||||
|
||||
//
|
||||
// NicknameSet
|
||||
//
|
||||
|
||||
Transaction::pointer Transaction::setNicknameSet(
|
||||
const NewcoinAddress& naPrivateKey,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer)
|
||||
{
|
||||
mTransaction->setITFieldH256(sfNickname, uNickname);
|
||||
|
||||
// XXX Make sure field is present even for 0!
|
||||
if (bSetOffer)
|
||||
mTransaction->setITFieldAmount(sfMinimumOffer, saMinimumOffer);
|
||||
|
||||
sign(naPrivateKey);
|
||||
|
||||
return shared_from_this();
|
||||
}
|
||||
|
||||
// --> bSetOffer: true, change offer
|
||||
// --> saMinimumOffer: 0 to remove.
|
||||
Transaction::pointer Transaction::sharedNicknameSet(
|
||||
const NewcoinAddress& naPublicKey, const NewcoinAddress& naPrivateKey,
|
||||
const NewcoinAddress& naSourceAccount,
|
||||
uint32 uSeq,
|
||||
const STAmount& saFee,
|
||||
uint32 uSourceTag,
|
||||
const uint256& uNickname,
|
||||
bool bSetOffer,
|
||||
const STAmount& saMinimumOffer)
|
||||
{
|
||||
pointer tResult = boost::make_shared<Transaction>(ttNICKNAME_SET, naPublicKey, naSourceAccount, uSeq, saFee, uSourceTag);
|
||||
|
||||
return tResult->setNicknameSet(naPrivateKey, uNickname, bSetOffer, saMinimumOffer);
|
||||
}
|
||||
|
||||
//
|
||||
// PasswordFund
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user