Skip to content
This repository has been archived by the owner on Mar 16, 2022. It is now read-only.

[Tezos] Fix delegation and add delegations tx history #797

Merged
merged 3 commits into from
Feb 4, 2020

Conversation

Pantani
Copy link
Contributor

@Pantani Pantani commented Feb 4, 2020

closes #750

Headline

  • Fix delegation information
  • Add delegation tx history

http://localhost:8420/v2/tezos/staking/delegations/tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw

{
  "delegations": [
    {
      "delegator": {
        "id": "tz1V3yg82mcrPJbegqVCPn6bC8w1CSTRp3f8",
        "status": true,
        "info": {
          "name": "TezoShop",
          "description": "TezoShop is PRO baker with low fee and hight efficiency",
          "image": "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/tezos/validators/assets/tz1V3yg82mcrPJbegqVCPn6bC8w1CSTRp3f8/logo.png",
          "website": "https://tezoshop.art"
        },
        "details": {
          "reward": {
            "annual": 5.786109
          },
          "locktime": 0,
          "minimum_amount": "0",
          "type": "delegate"
        }
      },
      "value": "2528000",
      "status": "active"
    }
  ],
  "balance": "2528000",
  "address": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
  "coin": {
    "coin": 1729,
    "symbol": "XTZ",
    "name": "Tezos",
    "decimals": 6
  },
  "details": {
    "reward": {
      "annual": 6.09
    },
    "locktime": 0,
    "minimum_amount": "0",
    "type": "delegate"
  }
}

http://localhost:8420/v1/tezos/tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw

{
  "total": 6,
  "docs": [
    {
      "id": "onfvhheWth5GCbKKAc9KLZoqQ9AFzAS27vfPCN2DGcGuPA31jmc",
      "coin": 1729,
      "from": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "to": "tz1V3yg82mcrPJbegqVCPn6bC8w1CSTRp3f8",
      "fee": "1500",
      "date": 1580773694,
      "block": 809061,
      "status": "completed",
      "type": "any_action",
      "direction": "outgoing",
      "memo": "",
      "metadata": {
        "coin": 1729,
        "title": "Delegation",
        "key": "stake_delegate",
        "token_id": "",
        "name": "Tezos",
        "symbol": "XTZ",
        "decimals": 6,
        "value": ""
      }
    },
    {
      "id": "oneqVXTkJqDvCDfxqggnzveo6U28Bp5sByguaqSZ7seBgQgzZSG",
      "coin": 1729,
      "from": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "to": "",
      "fee": "1500",
      "date": 1580770414,
      "block": 809007,
      "status": "completed",
      "type": "any_action",
      "direction": "outgoing",
      "memo": "",
      "metadata": {
        "coin": 1729,
        "title": "Undelegation",
        "key": "stake_delegate",
        "token_id": "",
        "name": "Tezos",
        "symbol": "XTZ",
        "decimals": 6,
        "value": ""
      }
    },
    {
      "id": "onm4rouUdDPTVfQX7mHz1uZbQD7KrmaA5D1np5QApMJKir8qw5V",
      "coin": 1729,
      "from": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "to": "tz1egbN6RK2bM5vt4aAZw6r9j4nL8z49bPdS",
      "fee": "1500",
      "date": 1580770054,
      "block": 809001,
      "status": "completed",
      "type": "any_action",
      "direction": "outgoing",
      "memo": "",
      "metadata": {
        "coin": 1729,
        "title": "Delegation",
        "key": "stake_delegate",
        "token_id": "",
        "name": "Tezos",
        "symbol": "XTZ",
        "decimals": 6,
        "value": ""
      }
    },
    {
      "id": "op9J7ZvqwhT3MgZBHk9kZF85TrErUbZYTyoJYScUMmD3q5rDczs",
      "coin": 1729,
      "from": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "to": "",
      "fee": "1500",
      "date": 1580769514,
      "block": 808992,
      "status": "completed",
      "type": "any_action",
      "direction": "outgoing",
      "memo": "",
      "metadata": {
        "coin": 1729,
        "title": "Undelegation",
        "key": "stake_delegate",
        "token_id": "",
        "name": "Tezos",
        "symbol": "XTZ",
        "decimals": 6,
        "value": ""
      }
    },
    {
      "id": "opDgGEYTqA67i49Cefv8hwM5PyF3d33x1VPAeEf8KHp559QUV2L",
      "coin": 1729,
      "from": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "to": "tz1egbN6RK2bM5vt4aAZw6r9j4nL8z49bPdS",
      "fee": "1500",
      "date": 1580768854,
      "block": 808981,
      "status": "completed",
      "type": "any_action",
      "direction": "outgoing",
      "memo": "",
      "metadata": {
        "coin": 1729,
        "title": "Delegation",
        "key": "stake_delegate",
        "token_id": "",
        "name": "Tezos",
        "symbol": "XTZ",
        "decimals": 6,
        "value": ""
      }
    },
    {
      "id": "ooEqaCK7goS6ewJj2yGSPVnCiMXtVRu1Z2GN1LvXsYo6E1qLyjF",
      "coin": 1729,
      "from": "tz1SiPXX4MYGNJNDsRc7n8hkvUqFzg8xqF9m",
      "to": "tz1hpUTmafsAEH8vQTirnZsvPWZ3wZ6oEkUw",
      "fee": "2940",
      "date": 1580768194,
      "block": 808970,
      "status": "completed",
      "type": "transfer",
      "direction": "incoming",
      "memo": "",
      "metadata": {
        "value": "2800000",
        "symbol": "XTZ",
        "decimals": 6
      }
    }
  ],
  "status": true
}

@Pantani Pantani requested a review from vikmeup February 4, 2020 00:46
@Pantani Pantani self-assigned this Feb 4, 2020
@Pantani Pantani force-pushed the pantani/fix-tezos-delegations branch from 4044b09 to 8ecde19 Compare February 4, 2020 01:22
@Pantani Pantani force-pushed the pantani/fix-tezos-delegations branch from ffa73f4 to 5af563d Compare February 4, 2020 03:26
@Pantani Pantani merged commit fcfb4d7 into master Feb 4, 2020
@Pantani Pantani deleted the pantani/fix-tezos-delegations branch February 4, 2020 04:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Tezos] Invalid information in delegations endpoint
1 participant