signum-node icon indicating copy to clipboard operation
signum-node copied to clipboard

Add transaction timestamp to Subscription output #370

Open th1nkNXT opened this issue 4 years ago • 3 comments

  • I assumed that there is always an existing transaction (or unconfirmed transaction) (transactionId = subscriptionId).
  • I implemented the additional tx information only for the mentioned endpoint getSubscription.
  • I introduced a new AccountDto class which is delivered in the JSON data as a possible future improvement of the data format and code.
  • That means ALL subscription JSON objects deliver now a senderAccount object and a recipientAccount object.
  • This data is now redundant to be backward compatible but you could think about that to go for a new API version in the future.
  • I wrote a test to ensure that the JSON data is correctly created (and still backward compatible).
  • I added Lombok to the maven pom to reduce boilerplate code. That means when integrating my changes you and other devs need to install the Lombok plugin into your IDE.
  • You should then have a look at my code, maybe there are some things to use for future developments (e.g. using a data transfer object class).

example data (old): {"id":"9223372036854775807","sender":"123456789","senderRS":"BURST-RMAP-225P-CQQP-22222", "recipient":"23456789","recipientRS":"BURST-DV2P-222Q-DTX3-22222", "amountNQT":"321","frequency":4,"timeNext":5} example data (new): {"id":"9223372036854775807","sender":"123456789","senderRS":"BURST-RMAP-225P-CQQP-22222","senderAccount":{"id":"123456789","idRS":"BURST-RMAP-225P-CQQP-22222"},"recipient":"23456789","recipientRS":"BURST-DV2P-222Q-DTX3-22222","recipientAccount":{"id":"23456789","idRS":"BURST-DV2P-222Q-DTX3-22222"},"amountNQT":"321","frequency":4,"timeNext":5,"timestamp":1623878907,"blockTimestamp":1623878900}

th1nkNXT avatar Jun 17 '21 19:06 th1nkNXT

@jjos2372 is this something relevant?! PR is stale already... maybe we can close it

ohager avatar Jul 27 '22 22:07 ohager

@ohager do we still need this change or will we cover that in a different way - now we have the Openaapi ?

frankTheTank72 avatar Nov 18 '22 10:11 frankTheTank72

added to 3.5.2 beta2

frankTheTank72 avatar Dec 04 '22 21:12 frankTheTank72

Stale.... and very old! I think we updated that differenlty already after so long time. @jjos2372 Closing?! I recommend.

We should be better on reviews by other contributors.

ohager avatar Apr 03 '23 12:04 ohager

Close due to stale. Hurts me a bit to see a PR pending for so much time, and finally not accepting a community members contribution... but bigger changes are coming in. We might review the idea of adding more info to subscriptions.

ohager avatar Jan 04 '24 19:01 ohager