@gvnrdao/dh-sdk 0.0.294 → 0.0.295
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/dist/browser.js +1 -1
- package/dist/index.js +5 -2
- package/dist/index.mjs +5 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -108080,8 +108080,11 @@ async function resolveEip1559FeeFields(provider) {
|
|
|
108080
108080
|
let maxPriorityFeePerGas = feeData.maxPriorityFeePerGas ?? void 0;
|
|
108081
108081
|
if (!maxFeePerGas || !maxPriorityFeePerGas) {
|
|
108082
108082
|
const gasPrice = (await provider.getFeeData()).gasPrice ?? parseUnits("1", "gwei");
|
|
108083
|
-
maxFeePerGas = maxFeePerGas
|
|
108084
|
-
maxPriorityFeePerGas = maxPriorityFeePerGas
|
|
108083
|
+
maxFeePerGas = maxFeePerGas || gasPrice * 2n;
|
|
108084
|
+
maxPriorityFeePerGas = maxPriorityFeePerGas || parseUnits("1.5", "gwei");
|
|
108085
|
+
}
|
|
108086
|
+
if (maxFeePerGas < maxPriorityFeePerGas) {
|
|
108087
|
+
maxFeePerGas = maxPriorityFeePerGas;
|
|
108085
108088
|
}
|
|
108086
108089
|
return { maxFeePerGas, maxPriorityFeePerGas };
|
|
108087
108090
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -108002,8 +108002,11 @@ async function resolveEip1559FeeFields(provider) {
|
|
|
108002
108002
|
let maxPriorityFeePerGas = feeData.maxPriorityFeePerGas ?? void 0;
|
|
108003
108003
|
if (!maxFeePerGas || !maxPriorityFeePerGas) {
|
|
108004
108004
|
const gasPrice = (await provider.getFeeData()).gasPrice ?? parseUnits("1", "gwei");
|
|
108005
|
-
maxFeePerGas = maxFeePerGas
|
|
108006
|
-
maxPriorityFeePerGas = maxPriorityFeePerGas
|
|
108005
|
+
maxFeePerGas = maxFeePerGas || gasPrice * 2n;
|
|
108006
|
+
maxPriorityFeePerGas = maxPriorityFeePerGas || parseUnits("1.5", "gwei");
|
|
108007
|
+
}
|
|
108008
|
+
if (maxFeePerGas < maxPriorityFeePerGas) {
|
|
108009
|
+
maxFeePerGas = maxPriorityFeePerGas;
|
|
108007
108010
|
}
|
|
108008
108011
|
return { maxFeePerGas, maxPriorityFeePerGas };
|
|
108009
108012
|
}
|
package/package.json
CHANGED