Skip to content

Commit

Permalink
Update LiteDb to 5.0.17, add TestNet network warning, release 1.3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
matsakiv committed Sep 27, 2023
1 parent fd12fae commit 26a1b13
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 45 deletions.
28 changes: 14 additions & 14 deletions .github/workflows/release_win_osx_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,28 +24,28 @@ jobs:
- name: Restore NuGet Packages
run: nuget restore Atomex.Client.Desktop.sln

- name: Create Code Signing Certificate
run: |
New-Item -ItemType directory -Path certificate
Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WINDOWS_CERT_PFX_BASE64 }}'
certutil -decode certificate\certificate.txt certificate\certificate.pfx
# - name: Create Code Signing Certificate
# run: |
# New-Item -ItemType directory -Path certificate
# Set-Content -Path certificate\certificate.txt -Value '${{ secrets.WINDOWS_CERT_PFX_BASE64 }}'
# certutil -decode certificate\certificate.txt certificate\certificate.pfx

- name: Build Desktop app
run: dotnet publish Atomex.Client.Desktop.csproj -c Release -r win-x64

- name: Sign builded artifacts
run: |
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Core.dll
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Desktop.dll
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Desktop.exe
# - name: Sign builded artifacts
# run: |
# & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Core.dll
# & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Desktop.dll
# & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode bin\Release\net5.0\win-x64\publish\Atomex.Client.Desktop.exe

- name: Build Desktop app .msi installer
run: MSBuild Atomex.Client.Desktop.Installer/Atomex.Client.Desktop.Installer.wixproj /p:Configuration=Release /p:RuntimeIdentifiers=win-x64 /clp:ErrorsOnly

- name: Sign MSI installer
run: |
$version=(git describe --tags --abbrev=0)
& "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode "Atomex.Client.Desktop.Installer\Installs\Atomex.Client-$version.0-x64.msi"
# - name: Sign MSI installer
# run: |
# $version=(git describe --tags --abbrev=0)
# & "C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64\signtool.exe" sign /f certificate\certificate.pfx /p '${{ secrets.WINDOWS_CERT_PFX_PASS }}' /t http://timestamp.comodoca.com/authenticode "Atomex.Client.Desktop.Installer\Installs\Atomex.Client-$version.0-x64.msi"

- name: Upload windows release artifacts
uses: actions/upload-artifact@v2
Expand Down
34 changes: 20 additions & 14 deletions App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,8 @@ public override void OnFrameworkInitializationCompleted()
var currenciesProvider = new CurrenciesProvider(CurrenciesConfigurationString);
var symbolsProvider = new SymbolsProvider(SymbolsConfiguration);

var bitfinexQuotesProvider = new BitfinexQuotesProvider(
currencies: currenciesProvider
.GetCurrencies(Network.MainNet)
.GetOrderedPreset()
.Select(c => c.Name),
baseCurrency: QuotesProvider.Usd,
log: LoggerFactory.CreateLogger<BitfinexQuotesProvider>());

var tezToolsQuotesProvider = new TezToolsQuotesProvider(
log: LoggerFactory.CreateLogger<TezToolsQuotesProvider>());

var quotesProvider = new MultiSourceQuotesProvider(
log: LoggerFactory.CreateLogger<MultiSourceQuotesProvider>(),
bitfinexQuotesProvider,
tezToolsQuotesProvider);
log: LoggerFactory.CreateLogger<MultiSourceQuotesProvider>());

// init Atomex client app
AtomexApp = new AtomexApp(logger: LoggerFactory.CreateLogger("AtomexApp"))
Expand All @@ -102,6 +89,25 @@ public override void OnFrameworkInitializationCompleted()
.UseSymbolsUpdater(new SymbolsUpdater(symbolsProvider))
.UseQuotesProvider(quotesProvider);

quotesProvider.ConfigureOnStart = provider =>
{
if (AtomexApp?.Account?.Network == Network.MainNet)
{
var bitfinexQuotesProvider = new BitfinexQuotesProvider(
currencies: AtomexApp.CurrenciesProvider
.GetCurrencies(Network.MainNet)
.GetOrderedPreset()
.Select(c => c.Name),
baseCurrency: QuotesProvider.Usd,
log: LoggerFactory.CreateLogger<BitfinexQuotesProvider>());
var tezToolsQuotesProvider = new TezToolsQuotesProvider(
log: LoggerFactory.CreateLogger<TezToolsQuotesProvider>());
provider.AddProviders(bitfinexQuotesProvider, tezToolsQuotesProvider);
}
};

var mainWindow = new MainWindow();
DialogService = new DialogService();

Expand Down
15 changes: 0 additions & 15 deletions Atomex.Client.Desktop.sln
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atomex.Blockchain.Tezos", "
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Atomex.Tests", "atomex.client.core\Atomex.Tests\Atomex.Tests.csproj", "{3907CA8F-3816-4CDA-BD04-FEB296C0002D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LiteDB", "atomex.client.core\LiteDB\LiteDB\LiteDB.csproj", "{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -266,18 +264,6 @@ Global
{3907CA8F-3816-4CDA-BD04-FEB296C0002D}.Release|x64.Build.0 = Release|Any CPU
{3907CA8F-3816-4CDA-BD04-FEB296C0002D}.Release|x86.ActiveCfg = Release|Any CPU
{3907CA8F-3816-4CDA-BD04-FEB296C0002D}.Release|x86.Build.0 = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|x64.ActiveCfg = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|x64.Build.0 = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|x86.ActiveCfg = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Debug|x86.Build.0 = Debug|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|Any CPU.Build.0 = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|x64.ActiveCfg = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|x64.Build.0 = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|x86.ActiveCfg = Release|Any CPU
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand All @@ -299,7 +285,6 @@ Global
{67D825D2-D5BC-4027-B5E5-7B7E3AD4C3A1} = {6165844F-33D3-433A-91B8-62481908D2C7}
{D8A24924-3C1D-4397-A9CF-1F1E99143481} = {6165844F-33D3-433A-91B8-62481908D2C7}
{3907CA8F-3816-4CDA-BD04-FEB296C0002D} = {6165844F-33D3-433A-91B8-62481908D2C7}
{5EEDB7C1-ADFA-491A-9C34-408AD1AEEC1E} = {6165844F-33D3-433A-91B8-62481908D2C7}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {8A77B597-6CC1-4B27-A6A6-F5740970481E}
Expand Down
9 changes: 9 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -350,4 +350,7 @@ NOTE: Do not sign out or close the application until the swap is completed, othe
<data name="SvCantEstimateFees" xml:space="preserve">
<value>Can't estimate fees</value>
</data>
<data name="TestNetWalletWarning" xml:space="preserve">
<value>WARNING! You are using a test wallet (TestNet), the coins on which have no real monetary value! Be careful and beware of scammers!</value>
</data>
</root>
15 changes: 14 additions & 1 deletion ViewModels/MainWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,17 @@ public MainWindowViewModel(IAtomexApp app, IMainView? mainView = null)
ShowContent(_walletMainViewModel);
if (app.Account?.Network == Core.Network.TestNet)
{
var messageViewModel = MessageViewModel.Message(
title: "Warning",
text: Resources.TestNetWalletWarning,
nextTitle: "Ok",
nextAction: () => App.DialogService.Close());
App.DialogService.Show(messageViewModel);
}
if (AccountRestored)
{
var restoreViewModel = new RestoreDialogViewModel(_app)
Expand Down Expand Up @@ -162,7 +173,9 @@ private void OnAtomexClientChangedEventHandler(object? sender, AtomexClientChang
private async void OnUpdateClick()
{
await SignOut(withAppUpdate: true);
if (_app.AtomexClient != null) return;

if (_app.AtomexClient != null)
return;

OnUpdateAction?.Invoke();
UpdateStarted = true;
Expand Down

0 comments on commit 26a1b13

Please sign in to comment.