mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-10-05 22:16:59 +00:00
fixed prepareTransfers thx @th0br0
This commit is contained in:
@@ -457,10 +457,10 @@ public class IotaAPI extends IotaAPICore {
|
||||
String[] balances = balancesResponse.getBalances();
|
||||
|
||||
List<Input> confirmedInputs = new ArrayList<>();
|
||||
int totalBalance = 0;
|
||||
long totalBalance = 0;
|
||||
int i = 0;
|
||||
for (String balance : balances) {
|
||||
long thisBalance = Integer.parseInt(balance);
|
||||
long thisBalance = Long.parseLong(balance);
|
||||
|
||||
// If input has balance, add it to confirmedInputs
|
||||
if (thisBalance > 0) {
|
||||
@@ -904,8 +904,6 @@ public class IotaAPI extends IotaAPICore {
|
||||
*/
|
||||
public List<Transaction> initiateTransfer(int securitySum, final String inputAddress, String remainderAddress,
|
||||
final List<Transfer> transfers, boolean testMode) throws InvalidAddressException, InvalidBundleException, InvalidTransferException {
|
||||
StopWatch sw = new StopWatch();
|
||||
|
||||
|
||||
// If message or tag is not supplied, provide it
|
||||
// Also remove the checksum of the address if it's there
|
||||
@@ -1006,7 +1004,7 @@ public class IotaAPI extends IotaAPICore {
|
||||
long totalBalance = 0;
|
||||
|
||||
for (String balance : balances) {
|
||||
long thisBalance = Integer.parseInt(balance);
|
||||
long thisBalance = Long.parseLong(balance);
|
||||
|
||||
totalBalance += thisBalance;
|
||||
}
|
||||
@@ -1157,4 +1155,4 @@ public class IotaAPI extends IotaAPICore {
|
||||
return new IotaAPI(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user