diff --git a/include/xrpl/protocol/STTx.h b/include/xrpl/protocol/STTx.h index a1e529fe18..bee7d10c16 100644 --- a/include/xrpl/protocol/STTx.h +++ b/include/xrpl/protocol/STTx.h @@ -110,7 +110,7 @@ public: getMentionedAccounts() const; static Blob - getSigningData(STTx const& that); + getSigningData(STObject const& that); static Blob getSponsorSigningData(STTx const& that); diff --git a/src/libxrpl/protocol/STTx.cpp b/src/libxrpl/protocol/STTx.cpp index 134319c7d3..549fe3d751 100644 --- a/src/libxrpl/protocol/STTx.cpp +++ b/src/libxrpl/protocol/STTx.cpp @@ -186,7 +186,7 @@ STTx::getMentionedAccounts() const } Blob -STTx::getSigningData(STTx const& that) +STTx::getSigningData(STObject const& that) { Serializer s; s.add32(HashPrefix::txSign); @@ -507,7 +507,7 @@ multiSignHelper( // Make sure the MultiSigners are present. Otherwise they are not // attempting multi-signing and we just have a bad Signers. if (!signerObj.isFieldPresent(sfSigners)) - return Unexpected("Empty Signers."); + return Unexpected("Empty SigningPubKey."); // We don't allow both an sfSigners and an sfTxnSignature. Both fields // being present would indicate that the transaction is signed both ways. diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 6470962f2f..d5410b27d0 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -2313,6 +2313,15 @@ class MPToken_test : public beast::unit_test::suite reward = STAmount{sfSignatureReward, USD(10)}; minAmount = STAmount{sfMinAccountCreateAmount, mpt}; } + // SponsorshipSet + { + Json::Value jv; + jv[jss::TransactionType] = jss::SponsorshipSet; + jv[jss::Account] = alice.human(); + jv[sfSponsee.fieldName] = carol.human(); + jv[sfFeeAmount.fieldName] = mpt.getJson(JsonOptions::none); + test(jv, sfFeeAmount.fieldName.c_str()); + } } BEAST_EXPECT(txWithAmounts.empty()); } diff --git a/src/test/jtx/impl/utility.cpp b/src/test/jtx/impl/utility.cpp index fed7d10a4d..0df9ac2cb0 100644 --- a/src/test/jtx/impl/utility.cpp +++ b/src/test/jtx/impl/utility.cpp @@ -47,7 +47,7 @@ void sign(Json::Value& jv, Account const& account) { jv[jss::SigningPubKey] = strHex(account.pk().slice()); - auto const blob = STTx::getSigningData(STTx{parse(jv)}); + auto const blob = STTx::getSigningData(parse(jv)); auto const sig = ripple::sign(account.pk(), account.sk(), makeSlice(blob)); jv[jss::TxnSignature] = strHex(Slice{sig.data(), sig.size()}); }