mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-01-31 15:22:16 +00:00
Payment channels: more informative exception message if you forget to add the client wallet extension.
This commit is contained in:
parent
85554f511f
commit
baeaa64201
@ -376,6 +376,7 @@ public class PaymentChannelClientState {
|
||||
@VisibleForTesting synchronized void doStoreChannelInWallet(Sha256Hash id) {
|
||||
StoredPaymentChannelClientStates channels = (StoredPaymentChannelClientStates)
|
||||
wallet.getExtensions().get(StoredPaymentChannelClientStates.EXTENSION_ID);
|
||||
checkNotNull(channels, "You have not added the StoredPaymentChannelClientStates extension to the wallet.");
|
||||
checkState(channels.getChannel(id, multisigContract.getHash()) == null);
|
||||
storedChannel = new StoredClientChannel(id, multisigContract, refundTx, myKey, valueToMe, refundFees, true);
|
||||
channels.putChannel(storedChannel);
|
||||
|
Loading…
Reference in New Issue
Block a user