diff --git a/include/xrpl/protocol/detail/ledger_entries.macro b/include/xrpl/protocol/detail/ledger_entries.macro index b7333b2f0c..0a9d86c287 100644 --- a/include/xrpl/protocol/detail/ledger_entries.macro +++ b/include/xrpl/protocol/detail/ledger_entries.macro @@ -616,7 +616,7 @@ LEDGER_ENTRY(ltSPONSORSHIP, 0x0090, Sponsorship, sponsorship, ({ {sfPreviousTxnLgrSeq, soeREQUIRED}, {sfOwner, soeREQUIRED}, {sfSponsee, soeREQUIRED}, - {sfFeeAmount, soeDEFAULT}, + {sfFeeAmount, soeOPTIONAL}, {sfMaxFee, soeOPTIONAL}, {sfReserveCount, soeDEFAULT}, {sfOwnerNode, soeREQUIRED}, diff --git a/src/xrpld/app/tx/detail/Transactor.cpp b/src/xrpld/app/tx/detail/Transactor.cpp index 018c0f9416..5ec1c2ac2f 100644 --- a/src/xrpld/app/tx/detail/Transactor.cpp +++ b/src/xrpld/app/tx/detail/Transactor.cpp @@ -478,9 +478,7 @@ Transactor::payFee() auto const feeAmountAfter = sle->getFieldAmount(payer.balanceField) - feePaid; if (feeAmountAfter == beast::zero && payer.balanceField == sfFeeAmount) - // Because ltSponsorship.sfFeeAmount is soeDEFAULT - // TODO: Use whether the field is soeDEFAULT instead of sfFeeAmount in - // the condition. + // Because ltSponsorship.sfFeeAmount is soeOptional sle->makeFieldAbsent(payer.balanceField); else sle->setFieldAmount(payer.balanceField, feeAmountAfter);