signum-network / signumjs

SignumJS - Javascript SDK for Signum
https://docs.signum.network/signum/signumjs
Apache License 2.0
17 stars 8 forks source link

Consider making changes on the enumerations related to transaction `type/subtype` #76

Open ipr0310 opened 6 months ago

ipr0310 commented 6 months ago

Is your feature request related to a problem? Please describe. I was studying the transaction types/subtypes and i found out the following:

On the following node request /api?requestType=getConstants

I get the transaction types with its subtypes: Transaction Type 21 refers as Advanced Payment Transaction Type 21 - Subtype 5 refers as Subscription Payment

I am curious why on SignumJS the Transaction Type 21 is recognized as Escrow https://signum-network.github.io/signumjs/enums/core.transactionescrowsubtype.html

Describe the solution you'd like

{
    "0": "Payment",
    "1": "Arbitrary",
    "2": "Asset",
    "20": "Mining",
    "21": "Escrow",
    "22": "AT",
    "3": "Marketplace",
    "4": "Leasing",
    "AT": 22,
    "Arbitrary": 1,
    "Asset": 2,
    "Escrow": 21,
    "Leasing": 4,
    "Marketplace": 3,
    "Mining": 20,
    "Payment": 0
  }

Describe alternatives you've considered This is a grammatical error, it can be used as it is

Additional context I suppose this is not a big breaking change because:

The wallets which uses SignumJS and has a account transactions/activity page may need to be updated, if they try to update the SignumJS version.

Second additional context According to the node constants: These are the subtypes of the type 21 (Advanced Payment)

There is also subscriptions involved on this type, so it makes sense to rename it to AdvancedPayment because i think escrow is not related to subscriptions at all