elucidsoft / dotnet-stellar-sdk

Stellar API SDK for .NET 6.x
Apache License 2.0
116 stars 54 forks source link

Ability to submit a FeeBumpTransaction #291

Closed duckmatt closed 3 years ago

duckmatt commented 3 years ago

Is your feature request related to a problem? Please describe.

I couldn't seem to find a way to submit a FeeBumpTransaction, at the moment the Server.SubmitTransaction is only accepting Transaction

Also attempted submitting via base 64 XDR using:

server.SubmitTransaction(feeBumpTran.ToEnvelopeXdrBase64())

But get:

Invalid TransactionEnvelope: expected an ENVELOPE_TYPE_TX or ENVELOPE_TYPE_TX_V0 but received ENVELOPE_TYPE_TX_FEE_BUMP

Describe the solution you'd like

An overload to Server.SubmitTransaction to be added, for example in the Java SDK they have:

https://github.com/stellar/java-stellar-sdk/blob/3c6b5410a2abba6edca570fbcda41f29e8358428/src/main/java/org/stellar/sdk/Server.java#L325

andyd28 commented 3 years ago

Hi, just to add since we were attempting the same task, it works if you SkipMemoRequiredCheck:

server.SubmitTransaction(xdr, new SubmitTransactionOptions() { SkipMemoRequiredCheck = true });

The issue seems to be that if you don't it tries to convert the envelope back into the Transaction class rather than the FeeBumpTransaction class - not sure if this is by design or not.

Kirbyrawr commented 3 years ago

Hi peeps, i will check it later on or tomorrow, thanks for the report!

Kirbyrawr commented 3 years ago

https://github.com/elucidsoft/dotnet-stellar-sdk/pull/292

duckmatt commented 3 years ago

Awesome, thanks for the quick turnaround!