1
0

Mo changes

This commit is contained in:
Scott E. Graves
2017-04-11 12:38:17 -05:00
parent 3c48883a8b
commit fe50099c00
6 changed files with 132 additions and 88 deletions

View File

@@ -63,6 +63,9 @@
setValue('ID_RenterSetHosts', allowance.Hosts);
setValue('ID_RenterSetPeriod', allowance.Period);
setValue('ID_RenterSetRenewWindow', allowance.RenewWindowInBlocks);
AppActions.calculateEstimatedStorage(allowance.Funds, (res)=> {
setInnerText('ID_RenterCalcStorage', res);
});
}
}
};
@@ -175,8 +178,8 @@
window.appActions.setRenterSettings(allowance, cb);
}
function _calculateEstimatedStorage(funds) {
return window.appActions.calculateEstimatedStorage(funds)
function _calculateEstimatedStorage(funds, cb) {
window.appActions.calculateEstimatedStorage(funds, cb)
}
return {
createWallet: _createWallet,
@@ -273,10 +276,11 @@
function handleRenterEditSettings() {
setMainWindow('renter_settings_window');
const estStorage = document.getElementById('ID_RenterCalcStorage');
const funds = document.getElementById('ID_RenterSetFunds');
funds.oninput = () => {
estStorage.innerText = AppActions.calculateEstimatedStorage(funds.value);
AppActions.calculateEstimatedStorage(funds.value, (res)=> {
setInnerText('ID_RenterCalcStorage', res);
});
};
const defaultsButton = document.getElementById('ID_RenterSettingsDefaults');