@metamask/eth-json-rpc-middleware
Advanced tools
Comparing version 12.0.0 to 12.0.1
@@ -9,2 +9,13 @@ # Changelog | ||
## [12.0.1] | ||
### Changed | ||
- Bump @metamask/json-rpc-engine from 7.1.1 to 7.2.0 ([#256](https://github.com/MetaMask/eth-json-rpc-middleware/pull/256)) | ||
- Bump @metamask/utils from 8.1.0 to 8.2.0 ([#258](https://github.com/MetaMask/eth-json-rpc-middleware/pull/258)) | ||
- Bump @metamask/rpc-errors from 6.0.0 to 6.1.0 ([#253](https://github.com/MetaMask/eth-json-rpc-middleware/pull/253)) | ||
- Bump @metamask/eth-json-rpc-provider from 2.1.0 to 2.2.0 ([#252](https://github.com/MetaMask/eth-json-rpc-middleware/pull/252)) | ||
- Update `retryOnEmpty` middleware to not retry "execution reverted" errors ([#254](https://github.com/MetaMask/eth-json-rpc-middleware/pull/254)) | ||
### Fixed | ||
- Fix `signTransaction` and `sendTransaction` so it preserves transaction data instead of overwriting it ([#263](https://github.com/MetaMask/eth-json-rpc-middleware/pull/263)) | ||
## [12.0.0] | ||
@@ -149,3 +160,4 @@ ### Changed | ||
[Unreleased]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v12.0.0...HEAD | ||
[Unreleased]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v12.0.1...HEAD | ||
[12.0.1]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v12.0.0...v12.0.1 | ||
[12.0.0]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v11.0.2...v12.0.0 | ||
@@ -152,0 +164,0 @@ [11.0.2]: https://github.com/MetaMask/eth-json-rpc-middleware/compare/v11.0.1...v11.0.2 |
@@ -12,2 +12,3 @@ "use strict"; | ||
const cache_1 = require("./utils/cache"); | ||
const error_1 = require("./utils/error"); | ||
const timeout_1 = require("./utils/timeout"); | ||
@@ -94,2 +95,5 @@ // | ||
catch (err) { | ||
if ((0, error_1.isExecutionRevertedError)(err)) { | ||
throw err; | ||
} | ||
log('(call %i) Request failed, waiting 1s to retry again...', index + 1); | ||
@@ -96,0 +100,0 @@ await (0, timeout_1.timeout)(1000); |
@@ -65,3 +65,2 @@ "use strict"; | ||
async function sendTransaction(req, res) { | ||
var _a; | ||
if (!processTransaction) { | ||
@@ -75,10 +74,7 @@ throw rpc_errors_1.rpcErrors.methodNotSupported(); | ||
} | ||
const params = req.params; | ||
const txParams = { | ||
from: await validateAndNormalizeKeyholder(((_a = params[0]) === null || _a === void 0 ? void 0 : _a.from) || '', req), | ||
}; | ||
const params = req.params[0]; | ||
const txParams = Object.assign(Object.assign({}, params), { from: await validateAndNormalizeKeyholder((params === null || params === void 0 ? void 0 : params.from) || '', req) }); | ||
res.result = await processTransaction(txParams, req); | ||
} | ||
async function signTransaction(req, res) { | ||
var _a; | ||
if (!processSignTransaction) { | ||
@@ -92,6 +88,4 @@ throw rpc_errors_1.rpcErrors.methodNotSupported(); | ||
} | ||
const params = req.params; | ||
const txParams = { | ||
from: await validateAndNormalizeKeyholder(((_a = params[0]) === null || _a === void 0 ? void 0 : _a.from) || '', req), | ||
}; | ||
const params = req.params[0]; | ||
const txParams = Object.assign(Object.assign({}, params), { from: await validateAndNormalizeKeyholder((params === null || params === void 0 ? void 0 : params.from) || '', req) }); | ||
res.result = await processSignTransaction(txParams, req); | ||
@@ -98,0 +92,0 @@ } |
{ | ||
"name": "@metamask/eth-json-rpc-middleware", | ||
"version": "12.0.0", | ||
"version": "12.0.1", | ||
"description": "Ethereum-related json-rpc-engine middleware.", | ||
@@ -5,0 +5,0 @@ "repository": { |
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
162690
49
1457