// 支付回调白名单
import {readFileAndParse } from '../util'
import { FILENAME } from '../../consts'

export interface DicWhiteIp {
    // 渠道
    readonly channel: string;
    // ip
    readonly ip: number;
}

export const dicWhiteIp: string[] = [];
export function loadWhiteIp() {
    dicWhiteIp.splice(0, dicWhiteIp.length);
    
    let arr = readFileAndParse(FILENAME.DIC_WHITE_IP);

    arr.forEach(o => {
        dicWhiteIp.push(o.ip);
    });
    arr = undefined;
}