add mainnet welcome message with release warning

This commit is contained in:
woodser 2024-02-16 09:31:41 -05:00
parent 36f6dd7ade
commit 98129c70ed
2 changed files with 26 additions and 5 deletions

View File

@ -2178,10 +2178,19 @@ popup.shutDownInProgress.headline=Shut down in progress
popup.shutDownInProgress.msg=Shutting down application can take a few seconds.\nPlease don't interrupt this process. popup.shutDownInProgress.msg=Shutting down application can take a few seconds.\nPlease don't interrupt this process.
popup.attention.forTradeWithId=Attention required for trade with ID {0} popup.attention.forTradeWithId=Attention required for trade with ID {0}
popup.attention.welcome.test=Welcome to the Haveno test instance!\n\n\ popup.attention.welcome.stagenet=Welcome to the Haveno test instance!\n\n\
This platform allows you to test Haveno's protocol. Make sure to follow the instructions[HYPERLINK:https://github.com/haveno-dex/haveno/blob/master/docs/installing.md].\n\n\ This platform allows you to test Haveno's protocol. Make sure to follow the instructions[HYPERLINK:https://github.com/haveno-dex/haveno/blob/master/docs/installing.md].\n\n\
If you encounter any problem, please let us know by opening an issue [HYPERLINK:https://github.com/haveno-dex/haveno/issues/new].\n\n\ If you encounter any problem, please let us know by opening an issue [HYPERLINK:https://github.com/haveno-dex/haveno/issues/new].\n\n\
This is a test instance. Do not use real money! This is a test instance. Do not use real money!
popup.attention.welcome.mainnet=Welcome to Haveno!\n\n\
This platform allows you to trade Monero for fiat currencies or other cryptocurrencies in a decentralized way.\n\n\
Get started by creating a new payment account then making or taking an offer.\n\n\
If you encounter any problem, please let us know by opening an issue [HYPERLINK:https://github.com/haveno-dex/haveno/issues/new].
popup.attention.welcome.mainnet.test=Welcome to Haveno!\n\n\
This platform allows you to trade Monero for fiat currencies or other cryptocurrencies in a decentralized way.\n\n\
Get started by creating a new payment account then making or taking an offer.\n\n\
If you encounter any problem, please let us know by opening an issue [HYPERLINK:https://github.com/haveno-dex/haveno/issues/new].\n\n\
Haveno was recently released for public testing. Please use small amounts!
popup.info.multiplePaymentAccounts.headline=Multiple payment accounts available popup.info.multiplePaymentAccounts.headline=Multiple payment accounts available
popup.info.multiplePaymentAccounts.msg=You have multiple payment accounts available for this offer. Please make sure you've picked the right one. popup.info.multiplePaymentAccounts.msg=You have multiple payment accounts available for this offer. Please make sure you've picked the right one.

View File

@ -45,6 +45,7 @@ import haveno.core.presentation.SupportTicketsPresentation;
import haveno.core.presentation.TradePresentation; import haveno.core.presentation.TradePresentation;
import haveno.core.provider.price.PriceFeedService; import haveno.core.provider.price.PriceFeedService;
import haveno.core.trade.ArbitratorTrade; import haveno.core.trade.ArbitratorTrade;
import haveno.core.trade.HavenoUtils;
import haveno.core.trade.TradeManager; import haveno.core.trade.TradeManager;
import haveno.core.user.DontShowAgainLookup; import haveno.core.user.DontShowAgainLookup;
import haveno.core.user.Preferences; import haveno.core.user.Preferences;
@ -273,12 +274,23 @@ public class MainViewModel implements ViewModel, HavenoSetup.HavenoSetupListener
UserThread.execute(() -> getShowAppScreen().set(true)); UserThread.execute(() -> getShowAppScreen().set(true));
// show welcome message if not mainnet // show welcome message
if (Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_STAGENET) { if (Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_STAGENET) {
String key = "welcome.test"; String key = "welcome.stagenet";
if (DontShowAgainLookup.showAgain(key)) { if (DontShowAgainLookup.showAgain(key)) {
UserThread.runAfter(() -> { UserThread.runAfter(() -> {
new Popup().attention(Res.get("popup.attention.welcome.test")). new Popup().attention(Res.get("popup.attention.welcome.stagenet")).
dontShowAgainId(key)
.closeButtonText(Res.get("shared.iUnderstand"))
.show();
}, 1);
}
} else if (Config.baseCurrencyNetwork() == BaseCurrencyNetwork.XMR_MAINNET) {
String key = "welcome.mainnet";
boolean isReleaseLimited = HavenoUtils.isReleasedWithinDays(HavenoUtils.RELEASE_LIMIT_DAYS);
if (DontShowAgainLookup.showAgain(key)) {
UserThread.runAfter(() -> {
new Popup().attention(Res.get(isReleaseLimited ? "popup.attention.welcome.mainnet.test" : "popup.attention.welcome.mainnet")).
dontShowAgainId(key) dontShowAgainId(key)
.closeButtonText(Res.get("shared.iUnderstand")) .closeButtonText(Res.get("shared.iUnderstand"))
.show(); .show();