import { PAY_CHANNEL_ACCOUNT_NAME, PAY_CHANNEL_OFFLINE_NAME } from '../../../types/PayConfig'; export default OakComponent({ properties: { depositMax: 10000, onSetPrice: (price) => undefined, onSetChannel: (channel) => undefined, onSetMeta: (meta) => undefined, price: null, channel: '', meta: {}, }, formData({ data }) { const payConfig2 = this.features.pay.getPayConfigs(); let accountConfig; const payConfig = []; for (const config of payConfig2) { if (config.channel === PAY_CHANNEL_ACCOUNT_NAME) { accountConfig = config; } else if (config.channel !== PAY_CHANNEL_OFFLINE_NAME || config.allowUser) { payConfig.push(config); } } return { account: data, payConfig, // accountConfig, }; }, features: ['application'], });