mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
wallet update events
This commit is contained in:
@@ -13,6 +13,11 @@ class AppMainElement extends HTMLElement {
|
||||
@target appModal: AppModalElement;
|
||||
@target mainRoot: AppRootElement;
|
||||
@closest appMain: AppMainElement;
|
||||
public domEvents: any = {
|
||||
routechanged: new Event("routechanged"),
|
||||
tokenchange: new Event("tokenchange"),
|
||||
walletupdate: new Event("walletupdate"),
|
||||
};
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
@@ -114,6 +119,10 @@ class AppMainElement extends HTMLElement {
|
||||
this.appendChild(_appModal);
|
||||
};
|
||||
|
||||
public triggerWalletUpdate = () => {
|
||||
this.dispatchEvent(this.domEvents.walletupdate);
|
||||
};
|
||||
|
||||
private createAppModal = () => {
|
||||
const _appModal = document.createElement("app-modal");
|
||||
_appModal.setAttribute("data-target", "app-main.appModal");
|
||||
|
||||
Reference in New Issue
Block a user