@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/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 ?? gasPrice * 2n;
108084
- maxPriorityFeePerGas = maxPriorityFeePerGas ?? parseUnits("1.5", "gwei");
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 ?? gasPrice * 2n;
108006
- maxPriorityFeePerGas = maxPriorityFeePerGas ?? parseUnits("1.5", "gwei");
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gvnrdao/dh-sdk",
3
- "version": "0.0.294",
3
+ "version": "0.0.295",
4
4
  "description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",