@hashgraphonline/hashinal-wc 1.0.75 → 1.0.78
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,15 @@ class HashinalsWalletConnectSDK {
|
|
|
1862
1862
|
[isMainnet ? HederaChainId.Mainnet : HederaChainId.Testnet],
|
|
1863
1863
|
"debug"
|
|
1864
1864
|
);
|
|
1865
|
-
await HashinalsWalletConnectSDK.dAppConnectorInstance.init({
|
|
1865
|
+
await HashinalsWalletConnectSDK.dAppConnectorInstance.init({
|
|
1866
|
+
logger: "error"
|
|
1867
|
+
});
|
|
1866
1868
|
HashinalsWalletConnectSDK.dAppConnectorInstance.onSessionIframeCreated = (session) => {
|
|
1869
|
+
this.logger.info("new session from from iframe", session);
|
|
1867
1870
|
this.handleNewSession(session);
|
|
1871
|
+
if (onSessionIframeCreated) {
|
|
1872
|
+
onSessionIframeCreated(session);
|
|
1873
|
+
}
|
|
1868
1874
|
};
|
|
1869
1875
|
this.logger.info(
|
|
1870
1876
|
`Hedera Wallet Connect SDK initialized on ${chosenNetwork}`
|
|
@@ -2176,7 +2182,9 @@ class HashinalsWalletConnectSDK {
|
|
|
2176
2182
|
signerAccountId: `hedera:${this.network}:${accountId}`,
|
|
2177
2183
|
message
|
|
2178
2184
|
};
|
|
2179
|
-
const result = await dAppConnector.signMessage(
|
|
2185
|
+
const result = await dAppConnector.signMessage(
|
|
2186
|
+
params
|
|
2187
|
+
);
|
|
2180
2188
|
return { userSignature: result.signatureMap };
|
|
2181
2189
|
}
|
|
2182
2190
|
saveConnectionInfo(accountId, connectedNetwork) {
|