Improve popups

This commit is contained in:
Manfred Karrer 2015-11-16 17:52:01 +01:00
parent cb8761b74e
commit 6f523e02dd
14 changed files with 71 additions and 38 deletions

View file

@ -472,9 +472,10 @@ public class TradeWalletService {
// Check if OP_RETURN output with contract hash matches the one from the offerer
TransactionOutput contractHashOutput = new TransactionOutput(params, offerersDepositTx, Coin.ZERO,
ScriptBuilder.createOpReturnScript(contractHash).getProgram());
log.debug("contractHashOutput " + contractHashOutput);
TransactionOutput offerersContractHashOutput = offerersDepositTx.getOutputs().get(1);
if (!offerersContractHashOutput.equals(contractHashOutput))
log.debug("offerersContractHashOutput " + offerersContractHashOutput);
if (!offerersContractHashOutput.getScriptPubKey().equals(contractHashOutput.getScriptPubKey()))
throw new TransactionVerificationException("Offerers transaction output for the contract hash is not matching takers version.");
// Add all outputs from offerersDepositTx to depositTx

View file

@ -41,6 +41,11 @@ public class SignAndPublishDepositTxAsBuyer extends TradeTask {
try {
runInterceptHook();
log.debug("getContractAsJson");
log.debug("----------");
log.debug(trade.getContractAsJson());
log.debug("----------");
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
trade.setContractHash(contractHash);
processModel.getTradeWalletService().takerSignsAndPublishesDepositTx(

View file

@ -44,6 +44,7 @@ public class SignAndPublishDepositTxAsSeller extends TradeTask {
log.debug("----------");
log.debug(trade.getContractAsJson());
log.debug("----------");
byte[] contractHash = Hash.getHash(trade.getContractAsJson());
trade.setContractHash(contractHash);
processModel.getTradeWalletService().takerSignsAndPublishesDepositTx(

View file

@ -348,7 +348,13 @@ public class Preferences implements Serializable {
}
public boolean showAgain(String key) {
return getShowAgainMap().containsKey(key) && getShowAgainMap().get(key);
// if we add new and those are not in our stored map we display by default the new popup
if (!getShowAgainMap().containsKey(key)) {
showAgainMap.put(key, true);
storage.queueUpForSave();
}
return showAgainMap.get(key);
}
public boolean getTacAccepted() {