Skip to content

Commit

Permalink
Merge branch 'release/3.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
theofanis committed Dec 4, 2024
2 parents aea319c + f2ff408 commit c399f7b
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/BolWallet/BolWallet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<OutputType>Exe</OutputType>
<RootNamespace>BolWallet</RootNamespace>
<UseMaui>true</UseMaui>
<MauiVersion>9.0.10</MauiVersion>
<MauiVersion>9.0.12</MauiVersion>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>

Expand Down
17 changes: 17 additions & 0 deletions src/BolWallet/Pages/CertifyPage.razor
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,23 @@
</MudCard>
</MudItem>
}
@if (!ViewModel.IsMultiCitizenship && ViewModel.IsCheckProcessOver)
{
<MudItem xs="12" sm="7" style="margin-left: auto; margin-right: auto; margin-top: 10px;">
<MudCard Class="styled-card">
<MudCardHeader>
<CardHeaderAvatar>
<MudAvatar Color="Color.Success">
<MudIcon Icon="@Icons.Material.Rounded.ThumbUp"/>
</MudAvatar>
</CardHeaderAvatar>
<CardHeaderContent>
<MudText Typo="Typo.h6">ShortHash is not in MultiCitizenship List.</MudText>
</CardHeaderContent>
</MudCardHeader>
</MudCard>
</MudItem>
}
<MudItem hidden="@(!ViewModel.AlternativeAccounts.Any())" xs="12" sm="7" style="margin-left: auto; margin-right: auto; margin-top: 10px;">
<MudCard>
<MudCardActions>
Expand Down
2 changes: 1 addition & 1 deletion src/BolWallet/Platforms/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.bol.bolwallet" android:versionCode="9" android:versionName="3.0.0">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="org.bol.bolwallet" android:versionCode="10" android:versionName="3.1.0 (2024.1204.2140)">
<application android:allowBackup="true" android:icon="@mipmap/appicon" android:supportsRtl="true" android:label="BoL Wallet"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
Expand Down
4 changes: 2 additions & 2 deletions src/BolWallet/Platforms/MacCatalyst/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
<string>processing</string>
</array>
<key>CFBundleVersion</key>
<string>2024.1113.0540</string>
<string>2024.1204.2140</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.1.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
Expand Down
4 changes: 2 additions & 2 deletions src/BolWallet/Platforms/iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@
<key>NSPhotoLibraryUsageDescription</key>
<string>The app can use the photo library to select photos from your library and use them when creating a new wallet.</string>
<key>CFBundleVersion</key>
<string>2024.1113.0540</string>
<string>2024.1204.2140</string>
<key>CFBundleShortVersionString</key>
<string>3.0.0</string>
<string>3.1.0</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>NSHumanReadableCopyright</key>
Expand Down
18 changes: 14 additions & 4 deletions src/BolWallet/ViewModels/AddMultiCitizenshipViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -100,14 +100,24 @@ public async Task Register()
try
{
IsLoading = true;
await _bolService.AddMultiCitizenship(MultiCitizenshipModel.CountryCode, ShortHash);

string countryCode = !string.IsNullOrWhiteSpace(MultiCitizenshipShortHashModel.CountryCode)
? MultiCitizenshipShortHashModel.CountryCode
: MultiCitizenshipModel.CountryCode;

if (string.IsNullOrWhiteSpace(countryCode))
{
await Toast.Make("Country code is required to register.").Show();
return;
}

await _bolService.AddMultiCitizenship(countryCode, ShortHash);

for (int i = 0; i < 20; i++)
{
try
{
IsMultiCitizenshipRegistered =
await _bolService.IsMultiCitizenship(MultiCitizenshipModel.CountryCode, ShortHash);
IsMultiCitizenshipRegistered = await _bolService.IsMultiCitizenship(countryCode, ShortHash);
}
catch (RpcException)
{
Expand All @@ -126,7 +136,7 @@ public async Task Register()
{
IsLoading = false;
}
}
}

public void OnKnownShortHashToggleChange(bool newValue)
{
Expand Down
7 changes: 6 additions & 1 deletion src/BolWallet/ViewModels/CertifyViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,14 @@ public CertifyViewModel(IBolService bolService, INavigationService navigation)
[ObservableProperty]
private bool _certifyDisabled;

[ObservableProperty]
private bool _isCheckProcessOver;

public async Task Lookup()
{
try
{
IsCheckProcessOver = false;
IsLoading = true;
var alternativeCodeNames = (await _bolService.FindAlternativeCodeNames(CodeName)).ToArray();
var alternativeAccounts = new List<BolAccount>(alternativeCodeNames.Length);
Expand All @@ -64,8 +68,9 @@ public async Task Lookup()
IsAlternativeCertified = (AlternativeAccounts.Count > 1 &&
AlternativeAccounts
.Where(account => account.CodeName != CodeName)
.Any(account => account.Certifications >= 2));
.Any(account => account.Certifications > 0));
CertifyDisabled = IsMultiCitizenship || IsAlternativeCertified;
IsCheckProcessOver = true;
}
catch (Exception ex)
{
Expand Down

0 comments on commit c399f7b

Please sign in to comment.