@coti-io/coti-wallet-plugin 0.2.5 → 0.2.6
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.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +3 -9
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -568,8 +568,12 @@ type PortalFeeQuote = {
|
|
|
568
568
|
declare const getPodGasPrice: (provider: ethers.BrowserProvider | ethers.JsonRpcProvider | ethers.Provider) => Promise<bigint>;
|
|
569
569
|
/**
|
|
570
570
|
* Gas price for PoD inbox fee estimation and tx send.
|
|
571
|
-
* Uses `
|
|
572
|
-
*
|
|
571
|
+
* Uses `eth_gasPrice` only (with a 10% buffer) so estimate and `tx.gasprice`
|
|
572
|
+
* stay aligned per pod-sdk inbox rules.
|
|
573
|
+
*
|
|
574
|
+
* Avoids `provider.getFeeData()` — ethers maps that to
|
|
575
|
+
* `eth_maxPriorityFeePerGas`, which MetaMask rejects (-32601) on the injected
|
|
576
|
+
* provider even when the chain RPC supports the method.
|
|
573
577
|
*/
|
|
574
578
|
declare const resolvePodTxGasPrice: (provider: ethers.BrowserProvider | ethers.JsonRpcProvider | ethers.Provider) => Promise<bigint>;
|
|
575
579
|
/** @deprecated Use {@link resolvePodTxGasPrice}. */
|
package/dist/index.d.ts
CHANGED
|
@@ -568,8 +568,12 @@ type PortalFeeQuote = {
|
|
|
568
568
|
declare const getPodGasPrice: (provider: ethers.BrowserProvider | ethers.JsonRpcProvider | ethers.Provider) => Promise<bigint>;
|
|
569
569
|
/**
|
|
570
570
|
* Gas price for PoD inbox fee estimation and tx send.
|
|
571
|
-
* Uses `
|
|
572
|
-
*
|
|
571
|
+
* Uses `eth_gasPrice` only (with a 10% buffer) so estimate and `tx.gasprice`
|
|
572
|
+
* stay aligned per pod-sdk inbox rules.
|
|
573
|
+
*
|
|
574
|
+
* Avoids `provider.getFeeData()` — ethers maps that to
|
|
575
|
+
* `eth_maxPriorityFeePerGas`, which MetaMask rejects (-32601) on the injected
|
|
576
|
+
* provider even when the chain RPC supports the method.
|
|
573
577
|
*/
|
|
574
578
|
declare const resolvePodTxGasPrice: (provider: ethers.BrowserProvider | ethers.JsonRpcProvider | ethers.Provider) => Promise<bigint>;
|
|
575
579
|
/** @deprecated Use {@link resolvePodTxGasPrice}. */
|
package/dist/index.js
CHANGED
|
@@ -1541,13 +1541,7 @@ var init_podPortalFees = __esm({
|
|
|
1541
1541
|
return BigInt(gasPriceHex);
|
|
1542
1542
|
};
|
|
1543
1543
|
resolvePodTxGasPrice = async (provider) => {
|
|
1544
|
-
|
|
1545
|
-
try {
|
|
1546
|
-
const feeData = await provider.getFeeData();
|
|
1547
|
-
base = feeData.gasPrice ?? await getPodGasPrice(provider);
|
|
1548
|
-
} catch {
|
|
1549
|
-
base = await getPodGasPrice(provider);
|
|
1550
|
-
}
|
|
1544
|
+
const base = await getPodGasPrice(provider);
|
|
1551
1545
|
return base * POD_GAS_PRICE_BUFFER_BPS / 1000n;
|
|
1552
1546
|
};
|
|
1553
1547
|
getSepoliaGasPrice = resolvePodTxGasPrice;
|
|
@@ -1733,8 +1727,8 @@ var init_podPortalFees = __esm({
|
|
|
1733
1727
|
let supportsEip1559 = false;
|
|
1734
1728
|
if (provider) {
|
|
1735
1729
|
try {
|
|
1736
|
-
const
|
|
1737
|
-
supportsEip1559 =
|
|
1730
|
+
const block = await provider.getBlock("latest");
|
|
1731
|
+
supportsEip1559 = block?.baseFeePerGas != null;
|
|
1738
1732
|
} catch {
|
|
1739
1733
|
supportsEip1559 = false;
|
|
1740
1734
|
}
|