From b7336bcfa6e079f253ac592445eab3a0cf4c91a8 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Thu, 28 Mar 2024 16:10:15 -0700 Subject: [PATCH 1/3] Add Close.success --- packages/protocol/src/types.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/protocol/src/types.ts b/packages/protocol/src/types.ts index 8fa46645..b0c483b7 100644 --- a/packages/protocol/src/types.ts +++ b/packages/protocol/src/types.ts @@ -342,5 +342,6 @@ export type OrderStatusData = { export type CloseData = { /** an explanation of why the exchange is being closed */ reason?: string + /** indicates whether or not the exchange successfully completed */ + success?: string } - From dd6f5890c4d6b88945fcbcc6a0e5776ab9f4f443 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Thu, 28 Mar 2024 16:43:51 -0700 Subject: [PATCH 2/3] booooolean --- packages/protocol/src/types.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protocol/src/types.ts b/packages/protocol/src/types.ts index b0c483b7..c823d806 100644 --- a/packages/protocol/src/types.ts +++ b/packages/protocol/src/types.ts @@ -343,5 +343,5 @@ export type CloseData = { /** an explanation of why the exchange is being closed */ reason?: string /** indicates whether or not the exchange successfully completed */ - success?: string + success?: boolean } From 56f92285c34714ff750ab304724ce263e1907b20 Mon Sep 17 00:00:00 2001 From: Diane Huxley Date: Thu, 28 Mar 2024 16:45:12 -0700 Subject: [PATCH 3/3] test --- packages/protocol/tests/close.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/protocol/tests/close.spec.ts b/packages/protocol/tests/close.spec.ts index 6e29740c..48cec447 100644 --- a/packages/protocol/tests/close.spec.ts +++ b/packages/protocol/tests/close.spec.ts @@ -7,7 +7,7 @@ describe('Close', () => { const exchangeId = Message.generateId('rfq') const closeMessage = Close.create({ metadata : { from: 'did:ex:alice', to: 'did:ex:pfi', exchangeId, externalId: 'ext_1234' }, - data : { reason: 'life is hard' } + data : { reason: 'life is hard', success: false } }) expect(closeMessage.exchangeId).to.equal(exchangeId)