dotnet-stellar-sdk
dotnet-stellar-sdk copied to clipboard
Unknown TransactionResult type
Hi guys,
I found a bug. Did you base your code on one of the official SDKs that are maintained by the Stellar team? If so could you tell me which one it is. Then maybe I could add the code myself to speed up the process.
Describe the bug
When I execute a fee bump operation in my transaction and I read the Result
property I receive the following error:
Unknown TransactionResult type
at stellar_dotnet_sdk.responses.TransactionResult.FromXdr(TransactionResult result)
at stellar_dotnet_sdk.responses.TransactionResult.FromXdr(String encoded)
at stellar_dotnet_sdk.responses.SubmitTransactionResponse.get_Result()
...
To Reproduce The code to get this error is
public async Task<string> FeeBumpTransaction(Transaction transaction)
{
var feeBumpTransaction = TransactionBuilder.BuildFeeBumpTransaction(
_config.SignerKeyPair,
transaction,
_config.MaximumFee
);
feeBumpTransaction.Sign(_config.SignerKeyPair, Network);
var response = await Invoke(
Server.SubmitTransaction(feeBumpTransaction)!
).ConfigureAwait(false);
if (response!.IsSuccess())
{
return response.Hash;
}
var result = response.Result; // <<<---- HAPPENS HERE
...
}
The result can be checked here:
TransactionResult
feeCharged: 20006
result: [txFeeBumpInnerFailed]
innerResultPair
transactionHash: qtaF0b1+XhxJmwq+95jr0VmUCLUuv/8RR0fqFYzSOk0=
result
feeCharged: 100
result: [txFailed]
results: Array[1]
[0]: [opInner]
tr: [payment]
paymentResult: [paymentUnderfunded]
ext: [undefined]
ext: [undefined]
Expected behavior
I would expect the result to be of a type TransactionResultFeeBumpInnerFailed
or something like that.
Additional context The code is running on a .NET 7 Web API.
Would you be willing to submit a PR to fix this?
If it is simply porting code from another base SDK that is officially maintained by Stellar I would. That is why I asked the question. Otherwise I'll probably will look for a workaround to save some time for now.
Ok, I will take a look.
Allright, thanks!
Any status update by any chance?
Sorry my day job has been brutal lately, it's still on my radar. Hopefully soon!
@elucidsoft do you maybe have some time for a short call to point me in the right direction to fix this issue myself?