@hashgraphonline/hashinal-wc 1.0.75 → 1.0.76

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.
@@ -1847,7 +1847,7 @@ class HashinalsWalletConnectSDK {
1847
1847
  this.logger.warn("setLogLevel is only available for the default logger");
1848
1848
  }
1849
1849
  }
1850
- async init(projectId, metadata, network) {
1850
+ async init(projectId, metadata, network, onSessionIframeCreated) {
1851
1851
  const chosenNetwork = network || this.network;
1852
1852
  const isMainnet = chosenNetwork.toString() === "mainnet";
1853
1853
  if (HashinalsWalletConnectSDK.dAppConnectorInstance) {
@@ -1862,9 +1862,14 @@ class HashinalsWalletConnectSDK {
1862
1862
  [isMainnet ? HederaChainId.Mainnet : HederaChainId.Testnet],
1863
1863
  "debug"
1864
1864
  );
1865
- await HashinalsWalletConnectSDK.dAppConnectorInstance.init({ logger: "error" });
1865
+ await HashinalsWalletConnectSDK.dAppConnectorInstance.init({
1866
+ logger: "error"
1867
+ });
1866
1868
  HashinalsWalletConnectSDK.dAppConnectorInstance.onSessionIframeCreated = (session) => {
1867
1869
  this.handleNewSession(session);
1870
+ if (onSessionIframeCreated) {
1871
+ onSessionIframeCreated(session);
1872
+ }
1868
1873
  };
1869
1874
  this.logger.info(
1870
1875
  `Hedera Wallet Connect SDK initialized on ${chosenNetwork}`
@@ -2176,7 +2181,9 @@ class HashinalsWalletConnectSDK {
2176
2181
  signerAccountId: `hedera:${this.network}:${accountId}`,
2177
2182
  message
2178
2183
  };
2179
- const result = await dAppConnector.signMessage(params);
2184
+ const result = await dAppConnector.signMessage(
2185
+ params
2186
+ );
2180
2187
  return { userSignature: result.signatureMap };
2181
2188
  }
2182
2189
  saveConnectionInfo(accountId, connectedNetwork) {