mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
28 lines
683 B
JavaScript
28 lines
683 B
JavaScript
'use strict';
|
|
|
|
import alt from '../alt';
|
|
import OwnershipFetcher from '../fetchers/ownership_fetcher';
|
|
|
|
|
|
class LoanContractListActions {
|
|
constructor() {
|
|
this.generateActions(
|
|
'updateLoanContractList',
|
|
'flushLoanContractList'
|
|
);
|
|
}
|
|
|
|
fetchLoanContractList() {
|
|
OwnershipFetcher.fetchLoanContractList()
|
|
.then((contracts) => {
|
|
this.actions.updateLoanContractList(contracts);
|
|
})
|
|
.catch((err) => {
|
|
console.logGlobal(err);
|
|
this.actions.updateLoanContractList([]);
|
|
});
|
|
}
|
|
}
|
|
|
|
export default alt.createActions(LoanContractListActions);
|