From fc769cfcb0b7808de1d83b996dce6260c34eb40f Mon Sep 17 00:00:00 2001 From: sapthasurendran Date: Mon, 26 Jul 2021 15:19:26 +0530 Subject: [PATCH] event handler strategy changes Signed-off-by: sapthasurendran --- asset-transfer-basic/rest-api-typescript/src/fabric.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/asset-transfer-basic/rest-api-typescript/src/fabric.ts b/asset-transfer-basic/rest-api-typescript/src/fabric.ts index 25bead39..ab099842 100644 --- a/asset-transfer-basic/rest-api-typescript/src/fabric.ts +++ b/asset-transfer-basic/rest-api-typescript/src/fabric.ts @@ -52,7 +52,7 @@ export const getGateway = async (): Promise => { eventHandlerOptions: { commitTimeout: config.commitTimeout, endorseTimeout: config.endorseTimeout, - strategy: DefaultEventHandlerStrategies.NONE, + strategy: DefaultEventHandlerStrategies.PREFER_MSPID_SCOPE_ANYFORTX, }, queryHandlerOptions: { timeout: 3, @@ -149,7 +149,7 @@ export const submitTransaction = async ( // Store the transaction details and set the event handler in case there // are problems later with commiting the transaction await storeTransactionDetails(redis, txnId, txnState, txnArgs, timestamp); - + txn.setEventHandler(DefaultEventHandlerStrategies.NONE); await txn.submit(...transactionArgs); } catch (err) { // If the transaction failed to endorse, there is no point attempting