aboutsummaryrefslogtreecommitdiff
path: root/src/webex/wxApi.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-05-04 18:52:54 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-05-08 17:19:07 +0530
commit76e664c9432822c4f5ba717af7f421b7cd015bf3 (patch)
treea3c020adb0f916646b6af2821734064e9abb3186 /src/webex/wxApi.ts
parent38601a1c63840bc85eae166f771a974e0629db28 (diff)
downloadwallet-core-76e664c9432822c4f5ba717af7f421b7cd015bf3.tar.xz
update withdrawal page when something changes
Diffstat (limited to 'src/webex/wxApi.ts')
-rw-r--r--src/webex/wxApi.ts12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts
index 128041e57..0bd444856 100644
--- a/src/webex/wxApi.ts
+++ b/src/webex/wxApi.ts
@@ -339,3 +339,15 @@ export function setExtendedPermissions(value: boolean): Promise<ExtendedPermissi
export function getExtendedPermissions(): Promise<ExtendedPermissionsResponse> {
return callBackend("get-extended-permissions", {});
}
+
+
+export function onUpdateNotification(f: () => void): () => void {
+ const port = chrome.runtime.connect({ name: "notifications" });
+ const listener = (): void => {
+ f();
+ };
+ port.onMessage.addListener(listener);
+ return () => {
+ port.onMessage.removeListener(listener);
+ };
+} \ No newline at end of file