Skip to content

tx.InMsg.Hash is empty after GetTransactions method #153

@Tectoral

Description

@Tectoral

So, i'm trying to fetch 10 latest transactions on my wallet (to compare the hash of a transaction created using SendBoc)

var latest = await _client.GetTransactions(address, limit: 10U);

foreach (var tx in latest!)
{
    await Console.Out.WriteLineAsync($"Hash: `{tx.InMsg.Hash}`");
}

The result is Hash: `` 10 times in a row, while using official https://toncenter.com/api/v2/#/transactions/getTransactions_get returns

{
  "ok": true,
  "result": [
    {
      ...
      "in_msg": {
        "@type": "ext.message",
        "hash": "Kq1zV5cFcewJXal6BWs0GcFgS0BJAtczlZY/kZrHFE=",     <= hash is valid here
        ...
}

I also mentioned, that in OutRawMessage "hash" not even mentioned in OutRawMessage

internal struct OutRawMessage
{
    [JsonProperty("source")] public string Source;
    [JsonProperty("destination")] public string Destination;
    [JsonProperty("value")] public string Value;
    [JsonProperty("fwd_fee")] public string FwdFee;
    [JsonProperty("ihr_fee")] public string IhrFee;
    [JsonProperty("created_lt")] public ulong CreaterLt;
    [JsonProperty("body_hash")] public string BodyHash;
    [JsonProperty("msg_data")] public OutRawMessageData MsgData;
    [JsonProperty("message")] public string Message;
}

and also hardcoded as "" in RawMessage

internal RawMessage(OutRawMessage outRawMessage)
{
    // ...
    Hash = "";
    // ...
}

is there any alternatives? (except tx.InMsg.MsgData.Body.Hash)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions