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

Proposal: Show description and interval of canceled subscriptions #102

Open
ipr0310 opened this issue Feb 6, 2024 · 0 comments
Open

Proposal: Show description and interval of canceled subscriptions #102

ipr0310 opened this issue Feb 6, 2024 · 0 comments

Comments

@ipr0310
Copy link
Member

ipr0310 commented Feb 6, 2024

As a subscription platform, we should also consider showing the description and interval of expired/cancelled subscriptions
The current way to fetch expired/canceled subscriptions is by fetching the transactions with type=21 and subtype=4

As you can see on the response payload, the attachment property. description and interval is missing.

{
      "type": 21,
      "subtype": 4,
      "timestamp": 278363698,
      "deadline": 1440,
      "senderPublicKey": "7158e2e1170f9a3e1799ba4069ab55fac3d2242db5c0a08faf91c8b7cac3cb1f",
      "amountNQT": "0",
      "feeNQT": "2000000",
      "signature": "b3db293e1fe637feda63ad9229cb3d6fbfa3afb4b6f104dd2b1c90e0d093130378d8acc6f7add947cebbc669d24ffbd700909f506376529b1cc117ebeb0e1e7f",
      "signatureHash": "d5cc652417775a8ff35a9b9845b1b389eefeb9012684e2cc297c7a32cebb5a24",
      "fullHash": "db68ec363e0b6e2af925056151ae37da50c2a0d843652730dd035ead5c9dc56d",
      "transaction": "3057393558868486363",
      "attachment": {
        "version.SubscriptionCancel": 1,
        "subscriptionId": "10561777840324094517"
      },
   // ...Remaining Transaction objects
    }

It means the only way of getting the description and interval of canceled subscriptions is by making another getTransaction request.

Suggestion:
We can consider extending the attachment property

    "attachment": {
        "version.SubscriptionCancel": 1,
        "subscriptionId": "10561777840324094517",
        "subscriptionDescription": "SRC44 DESCRIPTION OF CANCELLED SUBSCRIPTION",
        "subscriptionInterval": "0000000",
     }

Benefits:

  • Prevents unnecessary requests
  • Save bandwidth
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