class ReceiveTransactionPresenter extends BasePresenter<ReceiveTransationContract.View> implements ReceiveTransationContract.Presenter {

    @Override
    public void loadData() {
        walletEntity = WalletManager.getInstance().getSelectedWallet();
        if (isViewAttached() && walletEntity != null) {

            getView().setWalletInfo(walletEntity);

            Flowable.fromCallable(new Callable<Bitmap>() {

                @Override
                public Bitmap call() throws Exception {
                    String text = walletEntity.getPrefixAddress();
                    return QRCodeEncoder.syncEncodeQRCode(text, DensityUtil.dp2px(getContext(), 250f));
                }
            }).compose(RxUtils.getFlowableSchedulerTransformer())
                    .subscribe(new Consumer<Bitmap>() {
                        @Override
                        public void accept(Bitmap bitmap) throws Exception {
                            mQRCodeBitmap = bitmap;
                            if (isViewAttached() && bitmap != null) {
                                getView().setWalletAddressQrCode(bitmap);
                            }
                        }
                    });
        }
    }

}