@openfort/react 1.0.11 → 1.0.12

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.
@@ -5,6 +5,7 @@ import { routes } from '../components/Openfort/types.js';
5
5
  import { useOpenfort } from '../components/Openfort/useOpenfort.js';
6
6
  import { embeddedWalletId } from '../constants/openfort.js';
7
7
  import { ConnectionStrategyProvider, useConnectionStrategy } from '../core/ConnectionStrategyContext.js';
8
+ import { resolveEthereumFeeSponsorship } from '../core/strategyUtils.js';
8
9
  import { OpenfortEthereumBridgeContext } from '../ethereum/OpenfortEthereumBridgeContext.js';
9
10
  import { useConnectLifecycle } from '../hooks/useConnectLifecycle.js';
10
11
  import { showInitBanner } from '../utils/banner.js';
@@ -230,6 +231,7 @@ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, openfortConfi
230
231
  const initInProgressRef = useRef(false);
231
232
  // Init provider; only fetch accounts when READY (prevents list() before auth is stored)
232
233
  useEffect(() => {
234
+ var _a;
233
235
  if (!openfort || !walletConfig || !strategy)
234
236
  return;
235
237
  // EVM: only run at READY — auto-recover handles EMBEDDED_SIGNER_NOT_CONFIGURED → READY.
@@ -242,12 +244,14 @@ const CoreOpenfortProvider = ({ children, onConnect, onDisconnect, openfortConfi
242
244
  }
243
245
  }
244
246
  // Skip if we already initialized with the same parameters
245
- const initKey = { kind: strategy.kind, chainType: strategy.chainType, evmChainId };
247
+ const feeSponsorshipPolicy = evmChainId != null ? (_a = resolveEthereumFeeSponsorship(walletConfig, evmChainId)) === null || _a === void 0 ? void 0 : _a.policy : undefined;
248
+ const initKey = { kind: strategy.kind, chainType: strategy.chainType, evmChainId, feeSponsorshipPolicy };
246
249
  const prev = lastInitRef.current;
247
250
  if (prev &&
248
251
  prev.kind === initKey.kind &&
249
252
  prev.chainType === initKey.chainType &&
250
- prev.evmChainId === initKey.evmChainId) {
253
+ prev.evmChainId === initKey.evmChainId &&
254
+ prev.feeSponsorshipPolicy === initKey.feeSponsorshipPolicy) {
251
255
  return;
252
256
  }
253
257
  // Prevent concurrent initProvider calls
@@ -1 +1 @@
1
- {"version":3,"file":"CoreOpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"CoreOpenfortProvider.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1 +1 @@
1
- export declare const OPENFORT_VERSION = "1.0.11";
1
+ export declare const OPENFORT_VERSION = "1.0.12";
package/build/version.js CHANGED
@@ -1,4 +1,4 @@
1
- const OPENFORT_VERSION = '1.0.11';
1
+ const OPENFORT_VERSION = '1.0.12';
2
2
 
3
3
  export { OPENFORT_VERSION };
4
4
  //# sourceMappingURL=version.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openfort/react",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "author": "Openfort (https://www.openfort.io)",
5
5
  "license": "BSD-2-Clause license",
6
6
  "description": "The easiest way to integrate Openfort to your project.",