Commit 92e54b8d authored by Eriksson Monteiro's avatar Eriksson Monteiro

update millix bar

parent 5395387c
......@@ -11,6 +11,7 @@
<script src="vendor/jquery.js"></script>
<script src="vendor/jquery.nicescroll.js"></script>
<script src="vendor/moment.min.js"></script>
<!-- import of strings.js is a requirement the loadtimedata library -->
<script src="strings.js"></script>
<script src="config.js"></script>
<script src="millix_bar.js"></script>
......
......@@ -398,6 +398,24 @@ cr.define('millix_bar', function() {
}
}
// onMillixBarMessage is being used to receive data from chromium c++ core
function onMillixBarMessage(data) {
if (data.type === 'wallet_update_state') {
if (data.action.type === 'UNLOCK_WALLET') {
unlockWallet();
}
else if (data.action.type === 'LOCK_WALLET') {
lockWallet();
}
else if (data.action.type === 'UPDATE_NOTIFICATION_VOLUME') {
changeVolume(data.action.payload);
}
}
else if (data.type === 'api_config_update') {
connectToWallet(data.config);
}
}
function onLastTransactionUpdate(lastTransaction) {
if (walletLocked) {
return;
......@@ -525,6 +543,7 @@ cr.define('millix_bar', function() {
onTransaction,
showNewAdvertisement,
onVisibilityChange,
onMillixBarMessage,
updateVersion
};
});
......
// import of strings.js is a requirement the loadtimedata library
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment