UI changes
This commit is contained in:
@@ -23,11 +23,18 @@
|
||||
|
||||
const UiActions = (() => {
|
||||
function _unlockWallet(pwd, cb) {
|
||||
console.log('Unlock wallet');
|
||||
return window.uiActions.unlockWallet(pwd, cb);
|
||||
}
|
||||
|
||||
function _createWallet(cb) {
|
||||
console.log('Create wallet');
|
||||
return window.uiActions.createWallet(cb);
|
||||
}
|
||||
|
||||
return {
|
||||
unlockWallet: _unlockWallet
|
||||
unlockWallet: _unlockWallet,
|
||||
createWallet: _createWallet
|
||||
};
|
||||
})();
|
||||
|
||||
@@ -67,8 +74,7 @@
|
||||
if (success) {
|
||||
setMainWindow('app_window');
|
||||
} else {
|
||||
location.reload();
|
||||
displayErrorPopup('Failed to unlock wallet', reason, ()=> {
|
||||
displayErrorPopup('Error', reason, ()=> {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
@@ -81,6 +87,18 @@
|
||||
}
|
||||
} else {
|
||||
setMainWindow('create_window');
|
||||
const createButton = document.getElementById('ID_CreateWalletButton');
|
||||
createButton.onclick = () => {
|
||||
UiActions.createWallet((success, reasonOrSeed) => {
|
||||
if (success) {
|
||||
setMainWindow('display_seed_window');
|
||||
} else {
|
||||
displayErrorPopup('Error', reasonOrSeed, ()=> {
|
||||
location.reload();
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
} else {
|
||||
setMainWindow('offline_window');
|
||||
|
Reference in New Issue
Block a user