Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Unknown TransactionResult type #388

Open
jopmiddelkamp opened this issue Feb 22, 2023 · 7 comments
Open

Unknown TransactionResult type #388

jopmiddelkamp opened this issue Feb 22, 2023 · 7 comments
Assignees
Labels

Comments

@jopmiddelkamp
Copy link
Collaborator

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.

@elucidsoft
Copy link
Owner

Would you be willing to submit a PR to fix this?

@elucidsoft elucidsoft added the bug label Feb 23, 2023
@jopmiddelkamp
Copy link
Collaborator Author

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.

@elucidsoft
Copy link
Owner

Ok, I will take a look.

@jopmiddelkamp
Copy link
Collaborator Author

Allright, thanks!

@elucidsoft elucidsoft self-assigned this Feb 25, 2023
@jopmiddelkamp
Copy link
Collaborator Author

Any status update by any chance?

@elucidsoft
Copy link
Owner

Sorry my day job has been brutal lately, it's still on my radar. Hopefully soon!

@jopmiddelkamp
Copy link
Collaborator Author

@elucidsoft do you maybe have some time for a short call to point me in the right direction to fix this issue myself?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants