Search in sources :

Example 6 with NodeInfoResponse

use of run.wallet.iota.api.responses.NodeInfoResponse in project run-wallet-android by runplay.

the class WalletTransfersFragment method onFabClick.

@Override
public void onFabClick() {
    NodeInfoResponse info = Store.getNodeInfo();
    if (info == null) {
        AppService.getNodeInfo(getActivity());
    } else {
        if (info.isSyncOk()) {
            if (AppService.countTransferRunningTasks(Store.getCurrentSeed()) == 0) {
                UiManager.openFragmentBackStack(getActivity(), SnTrFragment.class);
            } else {
                Snackbar.make(getActivity().findViewById(R.id.drawer_layout), R.string.messages_wait_for_transfer, Snackbar.LENGTH_LONG).show();
            }
        } else {
            AppService.getNodeInfo(getActivity());
            Snackbar.make(getActivity().findViewById(R.id.drawer_layout), R.string.messages_not_fully_synced_yet, Snackbar.LENGTH_LONG).show();
        }
    }
}
Also used : NodeInfoResponse(run.wallet.iota.api.responses.NodeInfoResponse)

Aggregations

NodeInfoResponse (run.wallet.iota.api.responses.NodeInfoResponse)6 Nodes (run.wallet.iota.model.Nodes)3 Cal (run.wallet.common.Cal)2 Activity (android.app.Activity)1 SimpleDateFormat (java.text.SimpleDateFormat)1 ArrayList (java.util.ArrayList)1 Date (java.util.Date)1 GetBalancesResponse (jota.dto.response.GetBalancesResponse)1 GetTransferResponse (jota.dto.response.GetTransferResponse)1 ArgumentException (jota.error.ArgumentException)1 Bundle (jota.model.Bundle)1 StopWatch (jota.utils.StopWatch)1 GetAccountDataRequest (run.wallet.iota.api.requests.GetAccountDataRequest)1 ApiResponse (run.wallet.iota.api.responses.ApiResponse)1 GetAccountDataResponse (run.wallet.iota.api.responses.GetAccountDataResponse)1 Address (run.wallet.iota.model.Address)1 NodeInfo (run.wallet.iota.model.NodeInfo)1 Transfer (run.wallet.iota.model.Transfer)1 Wallet (run.wallet.iota.model.Wallet)1 NodeInfoListAdapter (run.wallet.iota.ui.adapter.NodeInfoListAdapter)1