21 lines
574 B
JavaScript
21 lines
574 B
JavaScript
import { PAY_CHANNEL_OFFLINE_NAME } from "../../../types/PayConfig";
|
|
import assert from 'assert';
|
|
export default OakComponent({
|
|
properties: {
|
|
payConfig: [],
|
|
channel: '',
|
|
meta: {},
|
|
extraChannelPickers: [],
|
|
onPick: (channel) => undefined,
|
|
onSetMeta: (meta) => undefined,
|
|
},
|
|
formData() {
|
|
const { payConfig } = this.props;
|
|
assert(payConfig);
|
|
const offlineConfig = payConfig.find(ele => ele.channel === PAY_CHANNEL_OFFLINE_NAME);
|
|
return {
|
|
offlineConfig,
|
|
};
|
|
}
|
|
});
|