Search in sources :

Example 16 with TaskManager

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

the class AppService method AutoNudgerGo.

private static void AutoNudgerGo() {
    long now = System.currentTimeMillis();
    if (SERVICE != null && lastNudgeRun < now - nudgeEvery) {
        Store.loadNudgeTransfers(SERVICE);
        if (!Store.getNudgeTransfers().isEmpty() && !isAutoNudgerRunning()) {
            lastNudgeRun = now;
            TaskManager rt = new TaskManager(SERVICE);
            AutoNudgeRequest nir = new AutoNudgeRequest();
            runTask(rt, nir);
        }
    }
}
Also used : TaskManager(run.wallet.iota.api.TaskManager) AutoNudgeRequest(run.wallet.iota.api.requests.AutoNudgeRequest)

Example 17 with TaskManager

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

the class AppService method sendNewTransfer.

@Deprecated
public static void sendNewTransfer(Context context, Seeds.Seed seed, String toAddress, String amountIOTA, String message, String tag) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        SendTransferRequest tir = new SendTransferRequest(seed, toAddress, amountIOTA, message, tag);
        runTask(rt, tir);
    }
}
Also used : SendTransferRequest(run.wallet.iota.api.requests.SendTransferRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 18 with TaskManager

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

the class AppService method updateExchangeRatesHistory.

public static void updateExchangeRatesHistory(Context context, String currencyPair, int step) {
    TaskManager rt = new TaskManager(SERVICE);
    WebGetExchangeRatesHistoryRequest nir = new WebGetExchangeRatesHistoryRequest(currencyPair, step);
    runBasicTask(rt, nir);
}
Also used : WebGetExchangeRatesHistoryRequest(run.wallet.iota.api.requests.WebGetExchangeRatesHistoryRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 19 with TaskManager

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

the class AppService method attachNewAddress.

public static void attachNewAddress(Context context, Seeds.Seed seed, String address) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        TaskManager rt = new TaskManager(SERVICE);
        SendTransferRequest tir = new SendTransferRequest(seed, address, "0", "", Constants.NEW_ADDRESS_TAG);
        runTask(rt, tir);
    }
}
Also used : SendTransferRequest(run.wallet.iota.api.requests.SendTransferRequest) TaskManager(run.wallet.iota.api.TaskManager)

Example 20 with TaskManager

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

the class AppService method addressSecurityChange.

public static void addressSecurityChange(Context context, Seeds.Seed seed, Address address, int security) {
    if (Validator.isValidCaller() && Store.getCurrentSeed() != null) {
        if (security < 1)
            security = 1;
        if (security > 3)
            security = 3;
        AddressSecurityChangeRequest rtr = new AddressSecurityChangeRequest(seed, address, security);
        TaskManager rt = new TaskManager(SERVICE);
        runTask(rt, rtr);
    }
}
Also used : AddressSecurityChangeRequest(run.wallet.iota.api.requests.AddressSecurityChangeRequest) 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