Skip to content

Commit

Permalink
Add network switch event
Browse files Browse the repository at this point in the history
  • Loading branch information
WietseWind committed Dec 9, 2023
1 parent fe370ae commit 5b97fb3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
18 changes: 9 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xumm",
"version": "1.6.7",
"version": "1.7.1",
"description": "One Xumm SDK to rule them all (browser, backend, xApp)",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -37,7 +37,7 @@
"xumm-js-pkce": "^1.0.2",
"xumm-oauth2-pkce": "^2.8.3",
"xumm-sdk": "^1.9.2",
"xumm-xapp-sdk": "^1.6.5"
"xumm-xapp-sdk": "^1.7.1"
},
"devDependencies": {
"@types/jest": "^26.0.12",
Expand Down
4 changes: 4 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import type {
xApp,
xAppEvent,
qrEventData,
xAppNetworkSwitch,
payloadEventData,
destinationEventData,
} from "xumm-xapp-sdk";
Expand Down Expand Up @@ -520,6 +521,9 @@ export class Xumm extends EventEmitter {
_classes.xApp.on("payload", (data: payloadEventData) => {
this.emit("payload", data, this.instance);
});
_classes.xApp.on("networkswitch", (data: xAppNetworkSwitch) => {
this.emit("networkswitch", data, this.instance);
});
_classes.xApp.on("destination", (data: destinationEventData) => {
this.emit("destination", data, this.instance);
});
Expand Down

0 comments on commit 5b97fb3

Please sign in to comment.