From c31da13c707d5f51d7847745c52cfc6404103cd2 Mon Sep 17 00:00:00 2001 From: Michele Sollecito Date: Fri, 7 Dec 2018 16:59:52 +0000 Subject: [PATCH] [CORDA-2213]: IRS Demo is unable to simulate future dates (fix). (#4384) * [CORDA-2213]: IRS Demo is unable to simulate future dates (fix). * [CORDA-2213]: IRS Demo is unable to simulate future dates (fix). --- docs/source/changelog.rst | 2 ++ .../web/src/main/resources/static/js/services/NodeApi.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/source/changelog.rst b/docs/source/changelog.rst index bc361a6c35..c87b43a612 100644 --- a/docs/source/changelog.rst +++ b/docs/source/changelog.rst @@ -11,6 +11,8 @@ Unreleased This allows Corda 4 signed CorDapps using signature constraints to consume existing hash constrained states generated by unsigned CorDapps in previous versions of Corda. +* Fixed a problem with IRS demo not being able to simulate future dates as expected (https://github.com/corda/corda/issues/3851). + * ``SwapIdentitiesFlow``, from the experimental confidential-identities module, is now an inlined flow. Instead of passing in a ``Party`` with whom to exchange the anonymous identity, a ``FlowSession`` to that party is required instead. The flow running on the other side must also call ``SwapIdentitiesFlow``. This change was required as the previous API allowed any counterparty to generate anonoymous identities diff --git a/samples/irs-demo/web/src/main/resources/static/js/services/NodeApi.js b/samples/irs-demo/web/src/main/resources/static/js/services/NodeApi.js index 2a068ea7f2..90a7bdc652 100644 --- a/samples/irs-demo/web/src/main/resources/static/js/services/NodeApi.js +++ b/samples/irs-demo/web/src/main/resources/static/js/services/NodeApi.js @@ -34,7 +34,7 @@ define(['angular', 'lodash', 'viewmodel/Deal'], function (angular, _, dealViewMo this.getDate = function () { return load('date', $http.get(endpoint('/api/irs/demodate'))).then(function (resp) { - var dateParts = resp.data; + var dateParts = resp.data.split("-"); date = new Date(dateParts[0], dateParts[1] - 1, dateParts[2]); // JS uses 0 based months return _this.getDateModel(date); });