2015-06-17 17:48:23 +02:00
|
|
|
'use strict';
|
|
|
|
|
2015-10-06 16:47:59 +02:00
|
|
|
import { alt } from '../alt';
|
2015-06-17 17:48:23 +02:00
|
|
|
import WalletSettingsFetcher from '../fetchers/wallet_settings_fetcher';
|
|
|
|
|
|
|
|
|
|
|
|
class WalletSettingsActions {
|
|
|
|
constructor() {
|
|
|
|
this.generateActions(
|
|
|
|
'updateWalletSettings'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
fetchWalletSettings() {
|
|
|
|
WalletSettingsFetcher.fetchOne()
|
|
|
|
.then((res) => {
|
|
|
|
this.actions.updateWalletSettings(res.wallet_settings);
|
|
|
|
})
|
|
|
|
.catch((err) => {
|
2015-07-17 15:41:09 +02:00
|
|
|
console.logGlobal(err);
|
2015-06-17 17:48:23 +02:00
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default alt.createActions(WalletSettingsActions);
|