mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-22 06:41:41 +01:00
Use REGTEST as network for BTC_DAO_TESTNET
- As teh network is used for filtering asset types BSQ has 3 asset types, one per network we need to use REGTEST as network. The methods for checking which BaseCurrencyNetwork are using name() now instead of network as we have 2 times REGTEST. - Fix bug with not calling showFeeInfoAndPublishMyProposal for bonded role proposals.
This commit is contained in:
parent
a24cf065cb
commit
0800301539
4 changed files with 15 additions and 15 deletions
|
@ -28,7 +28,7 @@ public enum BaseCurrencyNetwork {
|
|||
BTC_MAINNET(MainNetParams.get(), "BTC", "MAINNET", "Bitcoin"),
|
||||
BTC_TESTNET(TestNet3Params.get(), "BTC", "TESTNET", "Bitcoin"),
|
||||
BTC_REGTEST(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"),
|
||||
BTC_DAO_TESTNET(RegTestParams.get(), "BTC", "DAO_TESTNET", "Bitcoin"); // server side regtest
|
||||
BTC_DAO_TESTNET(RegTestParams.get(), "BTC", "REGTEST", "Bitcoin"); // server side regtest
|
||||
|
||||
@Getter
|
||||
private final NetworkParameters parameters;
|
||||
|
@ -47,19 +47,19 @@ public enum BaseCurrencyNetwork {
|
|||
}
|
||||
|
||||
public boolean isMainnet() {
|
||||
return "MAINNET".equals(network);
|
||||
return "BTC_MAINNET".equals(name());
|
||||
}
|
||||
|
||||
public boolean isTestnet() {
|
||||
return "TESTNET".equals(network);
|
||||
return "BTC_TESTNET".equals(name());
|
||||
}
|
||||
|
||||
public boolean isDaoTestNet() {
|
||||
return "DAO_TESTNET".equals(network);
|
||||
return "BTC_DAO_TESTNET".equals(name());
|
||||
}
|
||||
|
||||
public boolean isRegtest() {
|
||||
return "REGTEST".equals(network);
|
||||
return "BTC_REGTEST".equals(name());
|
||||
}
|
||||
|
||||
public long getDefaultMinFeePerByte() {
|
||||
|
|
|
@ -100,9 +100,9 @@ public enum Param {
|
|||
// but can be also a burner address if we prefer to burn the BTC
|
||||
RECIPIENT_BTC_ADDRESS(BisqEnvironment.getBaseCurrencyNetwork().isMainnet() ?
|
||||
"1BVxNn3T12veSK6DgqwU4Hdn7QHcDDRag7" : // mainnet
|
||||
BisqEnvironment.getBaseCurrencyNetwork().isRegtest() ?
|
||||
"2N5J6MyjAsWnashimGiNwoRzUXThsQzRmbv" : // regtest
|
||||
"2N4mVTpUZAnhm9phnxB7VrHB4aBhnWrcUrV", // testnet
|
||||
BisqEnvironment.getBaseCurrencyNetwork().isTestnet() ?
|
||||
"2N4mVTpUZAnhm9phnxB7VrHB4aBhnWrcUrV" : // testnet
|
||||
"mquz1zFmhs7iy8qJTkhY7C9bhJ5S3g8Xim", // regtest or DAO testnet (regtest)
|
||||
ParamType.ADDRESS),
|
||||
|
||||
// Fee for activating an asset or re-listing after deactivation due lack of trade activity. Fee per day of trial period without activity checks.
|
||||
|
|
|
@ -257,7 +257,6 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
|||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Private
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
@ -279,11 +278,11 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
|||
Coin fee = daoFacade.getProposalFee(daoFacade.getChainHeight());
|
||||
|
||||
if (type.equals(ProposalType.BONDED_ROLE)) {
|
||||
final long requiredBond = proposalDisplay.bondedRoleTypeComboBox.getSelectionModel().getSelectedItem().getRequiredBond();
|
||||
final long availableBalance = bsqWalletService.getAvailableBalance().value;
|
||||
long requiredBond = proposalDisplay.bondedRoleTypeComboBox.getSelectionModel().getSelectedItem().getRequiredBond();
|
||||
long availableBalance = bsqWalletService.getAvailableBalance().value;
|
||||
|
||||
if (requiredBond > availableBalance) {
|
||||
final long missing = requiredBond - availableBalance;
|
||||
long missing = requiredBond - availableBalance;
|
||||
new Popup<>().warning(Res.get("dao.proposal.create.missingBsqFundsForBond",
|
||||
bsqFormatter.formatCoinWithCode(missing)))
|
||||
.actionButtonText(Res.get("dao.proposal.create.publish"))
|
||||
|
@ -291,6 +290,8 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
|||
showFeeInfoAndPublishMyProposal(proposal, transaction, miningFee, txSize, fee);
|
||||
})
|
||||
.show();
|
||||
} else {
|
||||
showFeeInfoAndPublishMyProposal(proposal, transaction, miningFee, txSize, fee);
|
||||
}
|
||||
} else {
|
||||
showFeeInfoAndPublishMyProposal(proposal, transaction, miningFee, txSize, fee);
|
||||
|
@ -330,7 +331,6 @@ public class MakeProposalView extends ActivatableView<GridPane, Void> implements
|
|||
}
|
||||
|
||||
private void doPublishMyProposal(Proposal proposal, Transaction transaction) {
|
||||
|
||||
busyLabel.setVisible(true);
|
||||
busyAnimation.play();
|
||||
makeProposalButton.setDisable(true);
|
||||
|
|
|
@ -225,8 +225,8 @@ public class PreferencesView extends ActivatableViewAndModel<GridPane, Preferenc
|
|||
@Override
|
||||
public String toString(BaseCurrencyNetwork baseCurrencyNetwork) {
|
||||
return baseCurrencyNetwork != null ?
|
||||
(baseCurrencyNetwork.getCurrencyName() + "_" + baseCurrencyNetwork.getNetwork())
|
||||
: "";
|
||||
Res.get(baseCurrencyNetwork.name()) :
|
||||
Res.get("na");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue