mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 15:10:44 +01:00
Copy account data to clipboard
Use ctrl+c to copy accountagewitness and pubkey to clipboard in a format to be used by arbitrator to sign the account
This commit is contained in:
parent
0e7dd21745
commit
de25105fa8
3 changed files with 21 additions and 0 deletions
|
@ -880,4 +880,10 @@ public class AccountAgeWitnessService {
|
|||
!peerHasSignedWitness(trade) &&
|
||||
tradeAmountIsSufficient(trade.getTradeAmount());
|
||||
}
|
||||
|
||||
public String signInfoFromAccount(PaymentAccount paymentAccount) {
|
||||
var pubKey = keyRing.getSignatureKeyPair().getPublic();
|
||||
var witness = getMyWitness(paymentAccount.getPaymentAccountPayload());
|
||||
return Utilities.bytesAsHexString(witness.getHash()) + "," + Utilities.bytesAsHexString(pubKey.getEncoded());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ public abstract class PaymentAccountsView<R extends Node, M extends ActivatableW
|
|||
accountAgeWitnessService.getAccountAgeWitnessUtils().logSigners();
|
||||
} else if (Utilities.isCtrlShiftPressed(KeyCode.U, event)) {
|
||||
accountAgeWitnessService.getAccountAgeWitnessUtils().logUnsignedSignerPubKeys();
|
||||
} else if (Utilities.isAltOrCtrlPressed(KeyCode.C, event)) {
|
||||
copyAccount();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -174,4 +176,7 @@ public abstract class PaymentAccountsView<R extends Node, M extends ActivatableW
|
|||
protected abstract void buildForm();
|
||||
|
||||
protected abstract void onSelectAccount(PaymentAccount paymentAccount);
|
||||
|
||||
protected void copyAccount() {
|
||||
}
|
||||
}
|
||||
|
|
|
@ -99,6 +99,7 @@ import bisq.core.util.validation.InputValidator;
|
|||
import bisq.common.config.Config;
|
||||
import bisq.common.util.Tuple2;
|
||||
import bisq.common.util.Tuple3;
|
||||
import bisq.common.util.Utilities;
|
||||
|
||||
import org.bitcoinj.core.Coin;
|
||||
|
||||
|
@ -540,5 +541,14 @@ public class FiatAccountsView extends PaymentAccountsView<GridPane, FiatAccounts
|
|||
gridRow = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void copyAccount() {
|
||||
var selectedAccount = paymentAccountsListView.getSelectionModel().getSelectedItem();
|
||||
if (selectedAccount == null) {
|
||||
return;
|
||||
}
|
||||
Utilities.copyToClipboard(accountAgeWitnessService.signInfoFromAccount(selectedAccount));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue