@particle-network/provider
Advanced tools
Comparing version 0.7.2 to 0.7.3
@@ -51,3 +51,3 @@ "use strict"; | ||
return __awaiter(this, void 0, void 0, function () { | ||
var wallet, txData, chainId, chain; | ||
var wallet, txData, chain, chainId, chain; | ||
return __generator(this, function (_a) { | ||
@@ -80,8 +80,20 @@ switch (_a.label) { | ||
if ((0, utils_1.isNullish)(txData.type)) { | ||
// set transaction default type "0x2", EIP1559. | ||
txData.type = "0x2"; | ||
chain = common_1.chains.getChainById(this.auth.chainId()); | ||
if (chain && common_1.chains.isChainSupportEIP1559(chain.name)) { | ||
// set transaction default type "0x2", EIP1559. | ||
txData.type = "0x2"; | ||
} | ||
else { | ||
txData.type = "0x0"; | ||
} | ||
} | ||
if (!txData.chainId) { | ||
if ((0, utils_1.isNullish)(txData.chainId)) { | ||
txData.chainId = (0, ethereumjs_util_1.addHexPrefix)((0, ethereumjs_util_1.intToHex)(this.auth.chainId())); | ||
} | ||
if ((0, utils_1.isNullish)(txData.nonce)) { | ||
txData.nonce = "0x0"; | ||
} | ||
if ((0, utils_1.isNullish)(txData.data)) { | ||
txData.data = "0x"; | ||
} | ||
return [2 /*return*/, this.auth.sendTransaction(this.legacyToString(request.params[0]))]; | ||
@@ -88,0 +100,0 @@ } |
{ | ||
"name": "@particle-network/provider", | ||
"version": "0.7.2", | ||
"version": "0.7.3", | ||
"files": [ | ||
@@ -15,3 +15,3 @@ "lib", | ||
"dependencies": { | ||
"@particle-network/auth": "^0.7.2", | ||
"@particle-network/auth": "^0.7.3", | ||
"axios": "^0.27.2", | ||
@@ -32,3 +32,3 @@ "buffer": "^6.0.3", | ||
}, | ||
"gitHead": "3f06fb0a878ed2c95c710e46898584e8b8be076d" | ||
"gitHead": "1a821bf9b1cd2b846469925873c7f0ae10550320" | ||
} |
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
63540
807