shogun-button-react 1.5.16 → 1.5.18

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.
@@ -281,10 +281,14 @@ export function ShogunButtonProvider({ children, sdk, options, onLoginSuccess, o
281
281
  onLogout(); // AGGIUNTA
282
282
  };
283
283
  const hasPlugin = (name) => {
284
- return sdk ? sdk.hasPlugin(name) : false;
284
+ return sdk && typeof sdk.hasPlugin === "function"
285
+ ? sdk.hasPlugin(name)
286
+ : false;
285
287
  };
286
288
  const getPlugin = (name) => {
287
- return sdk ? sdk.getPlugin(name) : undefined;
289
+ return sdk && typeof sdk.getPlugin === "function"
290
+ ? sdk.getPlugin(name)
291
+ : undefined;
288
292
  };
289
293
  // Export Gun pair functionality
290
294
  const exportGunPair = async (password) => {
package/dist/connector.js CHANGED
@@ -1,10 +1,9 @@
1
1
  import ShogunCore from "shogun-core";
2
2
  export function shogunConnector(options) {
3
- const { peers = ["https://gun-manhattan.herokuapp.com/gun"], appName, logging, timeouts, oauth, ...restOptions } = options;
3
+ const { peers = ["https://gun-manhattan.herokuapp.com/gun"], appName, timeouts, oauth, ...restOptions } = options;
4
4
  const sdk = new ShogunCore({
5
5
  peers,
6
6
  scope: appName,
7
- logging,
8
7
  timeouts,
9
8
  oauth,
10
9
  });
@@ -14,10 +14,6 @@ export interface ShogunConnectorOptions {
14
14
  peers?: string[];
15
15
  authToken?: string;
16
16
  gunInstance?: IGunInstance<any>;
17
- logging?: {
18
- enabled: boolean;
19
- level: "error" | "warning" | "info" | "debug";
20
- };
21
17
  timeouts?: {
22
18
  login?: number;
23
19
  signup?: number;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "shogun-button-react",
3
3
  "description": "Shogun connector button",
4
- "version": "1.5.16",
4
+ "version": "1.5.18",
5
5
  "files": [
6
6
  "dist",
7
7
  "src/styles/index.css"
@@ -34,7 +34,7 @@
34
34
  "ethers": "^6.13.5",
35
35
  "prettier": "^3.5.3",
36
36
  "rxjs": "^7.8.1",
37
- "shogun-core": "^1.5.15"
37
+ "shogun-core": "^1.5.17"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": "^18.0.0",