mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 15:00:30 +01:00
Handle encrypted BSQ wallet
This commit is contained in:
parent
dcfb5faf1e
commit
78a837ec68
2 changed files with 4 additions and 1 deletions
|
@ -103,6 +103,7 @@ public abstract class WalletService {
|
|||
protected final CopyOnWriteArraySet<TxConfidenceListener> txConfidenceListeners = new CopyOnWriteArraySet<>();
|
||||
protected final CopyOnWriteArraySet<BalanceListener> balanceListeners = new CopyOnWriteArraySet<>();
|
||||
protected Wallet wallet;
|
||||
@Getter
|
||||
protected KeyParameter aesKey;
|
||||
@Getter
|
||||
protected IntegerProperty chainHeightProperty = new SimpleIntegerProperty();
|
||||
|
|
|
@ -316,7 +316,9 @@ public class MyBlindVoteListService implements PersistedDataHost, DaoStateListen
|
|||
// The EC key is in the blockchain already. We prefer here to stick with EC key. If any change
|
||||
// in BitcoinJ would break our consensus we would need to fall back to the old BitcoinJ EC
|
||||
// implementation.
|
||||
ECKey.ECDSASignature signature = key.sign(Sha256Hash.wrap(blindVoteTxId));
|
||||
ECKey.ECDSASignature signature = bsqWalletService.isEncrypted() ?
|
||||
key.sign(Sha256Hash.wrap(blindVoteTxId), bsqWalletService.getAesKey()) :
|
||||
key.sign(Sha256Hash.wrap(blindVoteTxId));
|
||||
signatureAsBytes = signature.toCanonicalised().encodeToDER();
|
||||
} else {
|
||||
// In case we use it for requesting the currently available merit we don't apply a signature
|
||||
|
|
Loading…
Add table
Reference in a new issue