class DelegatePresenter extends BasePresenter<DelegateContract.View> implements DelegateContract.Presenter {

    @Override
    public void checkDelegateAmount(String delegateAmount) {
        if (mEstimateGasResult != null) {
            double amount = NumberParserUtils.parseDouble(delegateAmount);
            String minDelegationAmount = NumberParserUtils.getPrettyNumber(AmountUtil.convertVonToLat(mEstimateGasResult.getMinDelegation()));
            //检查委托的数量
            if (TextUtils.isEmpty(delegateAmount)) {
                getView().showTips(false, minDelegationAmount);
            } else if (amount < NumberParserUtils.parseDouble(NumberParserUtils.getPrettyBalance(AmountUtil.convertVonToLat(mEstimateGasResult.getMinDelegation())))) {
                //按钮不可点击,并且下方提示
                getView().showTips(true, minDelegationAmount);
            } else {
                getView().showTips(false, minDelegationAmount);
            }
            updateDelegateButtonState();
        }
    }

}