package com.m2pool.pool.enums;

/**
 * @Description 矿池默认起付额
 * @Date 2022/5/20 11:15
 * @Author 杜懿
 */
public enum PoolAmount {

    GRS("grs",  1),
    MONA("mona",  1),
    DGBS("dgbs",  1),
    DGBQ("dgbq",  1),
    DGBO("dgbo",  1),
    DGB_QUBIT_A10("dgb_qubit_a10",  100),
    DGB_SKEIN_A10("dgb_skein_a10",  100),
    DGB_ODO_B20("dgb_odo_b20",  100),
    NEXA("nexa",  10000),
    RXD("rxd",  100),
    ALPH("alph",  1),
    SHA3X("sha3x",  10000),
    MONERO("monero",  0.1),
    ENX("enx",  5000);

    /** 币种参数名 */
    private final String coin;
    /** 单位 */
    private final double amount;


    PoolAmount(String coin, double amount) {
        this.coin = coin;
        this.amount = amount;
    }

    public String getCoin() {
        return coin;
    }

    public double getAmount(){return amount;}

    public static double getAmountByCoin(String coin){
        for (PoolAmount t : PoolAmount.values()) {
            if(t.getCoin().equals(coin)){
                return t.getAmount();
            }
        }
        return 10000;
    }

}
