OSDN Git Service

update the new api address
[bytom/Byone.git] / src / inject.js
index 2590a91..5902cf7 100644 (file)
@@ -24,6 +24,14 @@ class Inject {
       ) {
         window.bytom = new Bytomdapp(stream, msg.payload)
       }
+
+      if (
+        msg &&
+        msg.hasOwnProperty('type') &&
+        msg.type === MsgTypes.UPDATE_BYTOM
+      ) {
+        window.bytom[msg.payload.type] = msg.payload.value
+      }
     })
 
     // Syncing the streams between the extension and the web application