Search in sources :

Example 1 with TaskManager

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

the class AppService method checkUsedAddress.

public static void checkUsedAddress(Seeds.Seed seed) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        RefreshUsedAddressesRequest tir = new RefreshUsedAddressesRequest(seed);
        runTask(rt, tir);
    }
}
Also used : RefreshUsedAddressesRequest(run.wallet.iota.api.requests.RefreshUsedAddressesRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 2 with TaskManager

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

the class AppService method getNodeInfo.

public static void getNodeInfo(Context context) {
    if (SERVICE != null) {
        if (SERVICE.lastNodeInfo < System.currentTimeMillis() - 3000) {
            SERVICE.lastNodeInfo = System.currentTimeMillis();
            TaskManager rt = new TaskManager(SERVICE);
            NodeInfoRequest nir = new NodeInfoRequest();
            runTask(rt, nir);
        }
    }
}
Also used : NodeInfoRequest(run.wallet.iota.api.requests.NodeInfoRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 3 with TaskManager

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

the class AppService method generateNewAddress.

public static void generateNewAddress(Context context, Seeds.Seed seed) {
    if (Validator.isValidCaller() && seed != null) {
        TaskManager rt = new TaskManager(SERVICE);
        GetNewAddressRequest gtr = new GetNewAddressRequest(seed);
        runTask(rt, gtr);
    }
}
Also used : TaskManager(run.wallet.iota.api.TaskManager) GetNewAddressRequest(run.wallet.iota.api.requests.GetNewAddressRequest)

Example 4 with TaskManager

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

the class AppService method auditAddresses.

public static void auditAddresses(Context context, Seeds.Seed seed) {
    if (Validator.isValidCaller() && seed != null) {
        if (AppService.countSeedRunningTasks(seed) == 0) {
            TaskManager rt = new TaskManager(SERVICE);
            AuditAddressesRequest gtr = new AuditAddressesRequest(seed);
            runTask(rt, gtr);
        }
    }
}
Also used : TaskManager(run.wallet.iota.api.TaskManager) AuditAddressesRequest(run.wallet.iota.api.requests.AuditAddressesRequest)

Example 5 with TaskManager

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

the class AppService method getNodeInfo.

public static void getNodeInfo(Context context, boolean force) {
    if (SERVICE != null) {
        if (force || (SERVICE.lastNodeInfo < System.currentTimeMillis() - 3000)) {
            SERVICE.lastNodeInfo = System.currentTimeMillis();
            TaskManager rt = new TaskManager(SERVICE);
            NodeInfoRequest nir = new NodeInfoRequest();
            runTask(rt, nir);
        }
    }
}
Also used : NodeInfoRequest(run.wallet.iota.api.requests.NodeInfoRequest) TaskManager(run.wallet.iota.api.TaskManager)

Aggregations

TaskManager (run.wallet.iota.api.TaskManager)24 SendTransferRequest (run.wallet.iota.api.requests.SendTransferRequest)4 AuditAddressesRequest (run.wallet.iota.api.requests.AuditAddressesRequest)2 AutoNudgeRequest (run.wallet.iota.api.requests.AutoNudgeRequest)2 GetAccountDataRequest (run.wallet.iota.api.requests.GetAccountDataRequest)2 NodeInfoRequest (run.wallet.iota.api.requests.NodeInfoRequest)2 RefreshUsedAddressesRequest (run.wallet.iota.api.requests.RefreshUsedAddressesRequest)2 AddressSecurityChangeRequest (run.wallet.iota.api.requests.AddressSecurityChangeRequest)1 GetFirstLoadRequest (run.wallet.iota.api.requests.GetFirstLoadRequest)1 GetNeighborsRequest (run.wallet.iota.api.requests.GetNeighborsRequest)1 GetNewAddressRequest (run.wallet.iota.api.requests.GetNewAddressRequest)1 MessageFirstLoadRequest (run.wallet.iota.api.requests.MessageFirstLoadRequest)1 MessageNewAddressRequest (run.wallet.iota.api.requests.MessageNewAddressRequest)1 MessageSendRequest (run.wallet.iota.api.requests.MessageSendRequest)1 NudgeRequest (run.wallet.iota.api.requests.NudgeRequest)1 ReplayBundleRequest (run.wallet.iota.api.requests.ReplayBundleRequest)1 WebGetExchangeRatesHistoryRequest (run.wallet.iota.api.requests.WebGetExchangeRatesHistoryRequest)1 WebGetExchangeRatesRequest (run.wallet.iota.api.requests.WebGetExchangeRatesRequest)1