use only txids for unlocking tips
This commit is contained in:
parent
5f1775d478
commit
cc1ddfa16e
2 changed files with 3 additions and 6 deletions
|
@ -29,7 +29,6 @@ public class UnlockTipsTask extends AsyncTask<Void, Void, Boolean> {
|
|||
public Boolean doInBackground(Void... params) {
|
||||
|
||||
List<String> txids = new ArrayList<>();
|
||||
List<String> claimIds = new ArrayList<>();
|
||||
|
||||
try {
|
||||
Map<String, Object> options = new HashMap<>();
|
||||
|
@ -42,18 +41,15 @@ public class UnlockTipsTask extends AsyncTask<Void, Void, Boolean> {
|
|||
for (int i = 0; i < items.length(); i++) {
|
||||
JSONObject item = items.getJSONObject(i);
|
||||
String txid = Helper.getJSONString("txid", null, item);
|
||||
String claimId = Helper.getJSONString("claim_id", null, item);
|
||||
if (!Helper.isNullOrEmpty(txid) && !Helper.isNullOrEmpty(claimId)) {
|
||||
if (!Helper.isNullOrEmpty(txid)) {
|
||||
txids.add(txid);
|
||||
claimIds.add(claimId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (txids.size() > 0 && txids.size() == claimIds.size()) {
|
||||
if (txids.size() > 0) {
|
||||
options = new HashMap<>();
|
||||
options.put("txid", txids);
|
||||
options.put("claim_id", claimIds);
|
||||
options.put("blocking", true);
|
||||
Lbry.genericApiCall(Lbry.METHOD_TXO_SPEND, options);
|
||||
}
|
||||
|
|
|
@ -1108,6 +1108,7 @@ public class PublishFormFragment extends BaseFragment implements
|
|||
|
||||
// Run the logPublish task
|
||||
if (!BuildConfig.DEBUG) {
|
||||
claimResult.setSigningChannel(claim.getSigningChannel());
|
||||
LogPublishTask logPublish = new LogPublishTask(claimResult);
|
||||
logPublish.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue