@multiversx/sdk-network-providers
Advanced tools
Comparing version 2.3.0 to 2.4.0
@@ -174,3 +174,3 @@ "use strict"; | ||
let proxyResponse = yield proxyProvider.getTransaction(hash, true); | ||
ignoreKnownTransactionDifferencesBetweenProviders(proxyResponse); | ||
ignoreKnownTransactionDifferencesBetweenProviders(apiResponse, proxyResponse); | ||
chai_1.assert.deepEqual(apiResponse, proxyResponse, `transaction: ${hash}`); | ||
@@ -184,3 +184,5 @@ // Also assert completion | ||
// TODO: Strive to have as little differences as possible between Proxy and API. | ||
function ignoreKnownTransactionDifferencesBetweenProviders(proxyResponse) { | ||
function ignoreKnownTransactionDifferencesBetweenProviders(apiResponse, proxyResponse) { | ||
// Proxy and API exhibit differences in the "function" field, in case of move-balance transactions. | ||
apiResponse.function = proxyResponse.function; | ||
// Ignore fields which are not present on API response: | ||
@@ -187,0 +189,0 @@ proxyResponse.type = ""; |
@@ -20,2 +20,3 @@ /// <reference types="node" /> | ||
gasPrice: number; | ||
function: string; | ||
data: Buffer; | ||
@@ -22,0 +23,0 @@ signature: string; |
@@ -44,2 +44,3 @@ "use strict"; | ||
this.gasPrice = 0; | ||
this.function = ""; | ||
this.data = Buffer.from([]); | ||
@@ -84,2 +85,3 @@ this.signature = ""; | ||
result.gasLimit = response.gasLimit || 0; | ||
result.function = response.function || ""; | ||
result.data = Buffer.from(response.data || "", "base64"); | ||
@@ -86,0 +88,0 @@ result.status = new transactionStatus_1.TransactionStatus(response.status); |
{ | ||
"name": "@multiversx/sdk-network-providers", | ||
"version": "2.3.0", | ||
"version": "2.4.0", | ||
"lockfileVersion": 2, | ||
@@ -5,0 +5,0 @@ "requires": true, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
191595
2813