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

    @Override
    public void updateDelegateButtonState() {
        if (isViewAttached() && mEstimateGasResult != null) {
            //获取输入的委托数量
            String withdrawAmount = getView().getDelegateAmount();
            boolean isAmountValid = !TextUtils.isEmpty(withdrawAmount) && NumberParserUtils.parseDouble(withdrawAmount) >= NumberParserUtils.parseDouble(NumberParserUtils.getPrettyBalance(AmountUtil.convertVonToLat(mEstimateGasResult.getMinDelegation())));
            getView().setDelegateButtonState(isAmountValid);
        }

    }

}