@cardano-ogmios/client
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -37,23 +37,17 @@ "use strict"; | ||
const json = util_1.safeJSON.parse(data); | ||
if (typeof json.id !== 'object' || json.id === null) { | ||
return null; | ||
} | ||
if ('method' in json.id) { | ||
if (json.id.method !== METHODS.SUBMIT) { | ||
return null; | ||
if ('method' in json) { | ||
if (json.method === METHODS.SUBMIT) { | ||
return json; | ||
} | ||
} | ||
return json; | ||
return null; | ||
}; | ||
const matchEvaluateTransaction = (data) => { | ||
const json = util_1.safeJSON.parse(data); | ||
if (typeof json.id !== 'object' || json.id === null) { | ||
return null; | ||
} | ||
if ('method' in json.id) { | ||
if (json.id.method !== METHODS.EVALUATE) { | ||
return null; | ||
if ('method' in json) { | ||
if (json.method === METHODS.EVALUATE) { | ||
return json; | ||
} | ||
} | ||
return json; | ||
return null; | ||
}; | ||
@@ -75,4 +69,3 @@ const createTransactionSubmissionClient = async (context) => { | ||
transaction: { cbor: serializedTransaction } | ||
}, | ||
id: { method } | ||
} | ||
})); | ||
@@ -89,4 +82,3 @@ const { value: response } = await evaluateTransactionResponse.next(); | ||
method, | ||
params: { transaction: { cbor: serializedTransaction } }, | ||
id: { method } | ||
params: { transaction: { cbor: serializedTransaction } } | ||
})); | ||
@@ -93,0 +85,0 @@ const { value: response } = await submitTransactionResponse.next(); |
{ | ||
"name": "@cardano-ogmios/client", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "TypeScript client library for Cardano Ogmios", | ||
@@ -50,3 +50,3 @@ "engines": { | ||
"dependencies": { | ||
"@cardano-ogmios/schema": "6.0.1", | ||
"@cardano-ogmios/schema": "6.0.2", | ||
"@cardanosolutions/json-bigint": "^1.0.1", | ||
@@ -53,0 +53,0 @@ "@types/json-bigint": "^1.0.1", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
184832
1891
+ Added@cardano-ogmios/schema@6.0.2(transitive)
- Removed@cardano-ogmios/schema@6.0.1(transitive)
Updated@cardano-ogmios/schema@6.0.2