Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when pushing transaction #60

Open
adolfommoyano opened this issue Oct 18, 2022 · 0 comments
Open

Error when pushing transaction #60

adolfommoyano opened this issue Oct 18, 2022 · 0 comments

Comments

@adolfommoyano
Copy link

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?

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

No branches or pull requests

1 participant