Skip to content

Error when pushing transaction  #60

Description

@adolfommoyano

Hi, i am triyng to make push a transaction with Xamarin app.

Here is my code:


static async Task sendTransaction(int id, string datatx)
{
Console.WriteLine("Empieza SEND Tx");
string idTX = id.ToString();
Console.WriteLine("Tx to id: " + idTX);

        GlobalVariables.idPUT = GlobalVariables.initialLastID + 1;


        try {
            var result2 = await eos.CreateTransaction(new Transaction()
            {
                actions = new List<EosSharp.Core.Api.v1.Action>()
           {
            new EosSharp.Core.Api.v1.Action()
            {
                account = "crud",
                authorization = new List<PermissionLevel>()
                {
                    new PermissionLevel() {actor = "bob", permission = "active" }
                },
                name = "create",
                data = new { user = "bob", id = idTX, data = datatx }
                }
            }
            });
            Console.WriteLine("Tx realizada");
        }
        catch (Exception ex) { Console.WriteLine(ex); }

    }

It is returning the following error:

EosSharp.Core.Exceptions.ApiErrorException: Exception of type 'EosSharp.Core.Exceptions.ApiErrorException' was thrown.
at EosSharp.HttpHandler.BuildSendResponse (System.Net.Http.HttpResponseMessage response) [0x00182] in C:\eosio-mmcs\getscatter\eos-sharp\EosSharp\EosSharp\HttpHelper.cs:230
at EosSharp.HttpHandler.SendAsync (System.Net.Http.HttpRequestMessage request) [0x000b5] in C:\eosio-mmcs\getscatter\eos-sharp\EosSharp\EosSharp\HttpHelper.cs:153
at EosSharp.HttpHandler.PostJsonAsync[TResponseData] (System.String url, System.Object data) [0x00043] in C:\eosio-mmcs\getscatter\eos-sharp\EosSharp\EosSharp\HttpHelper.cs:42
at EosSharp.Core.Api.v1.EosApi.PushTransaction (EosSharp.Core.Api.v1.PushTransactionRequest data) [0x0009a] in :0
at EosSharp.Core.EosBase.BroadcastTransaction (EosSharp.Core.SignedTransaction strx) [0x000cd] in :0
at EosSharp.Core.EosBase.CreateTransaction (EosSharp.Core.Api.v1.Transaction trx, System.Collections.Generic.List`1[T] requiredKeys) [0x00106] in :0
at App1.App.sendTransaction (System.Int32 id, System.String datatx)

Any help please?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions