Skip to content

Commit

Permalink
Merge pull request #40 from Team-MPM/Groups
Browse files Browse the repository at this point in the history
Release 0.1.1
  • Loading branch information
g-martin772 committed Jun 17, 2024
2 parents 7ede69b + fff340b commit e9a8803
Show file tree
Hide file tree
Showing 7 changed files with 1,120 additions and 14 deletions.
6 changes: 3 additions & 3 deletions MPM-Betting.Blazor.ComponentLibrary/DesktopView/Matches.razor
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,11 @@ else

private async Task PlaceBet()
{
int amount;
long amount;
int homeScore, awayScore;
try
{
amount = int.Parse(BetAmount);
amount = long.Parse(BetAmount);
homeScore = int.Parse(scoreBets.HomeScore);
awayScore = int.Parse(scoreBets.AwayScore);
}
Expand Down Expand Up @@ -579,7 +579,7 @@ else
UpdateLoading(true);


var result = await UserDomain.PlaceGameBet(quote, homeScore, awayScore, SelectedMatch.Id, int.Parse(BetAmount));
var result = await UserDomain.PlaceGameBet(quote, homeScore, awayScore, SelectedMatch.Id, long.Parse(BetAmount));

if (result.IsFaulted)
{
Expand Down
12 changes: 9 additions & 3 deletions MPM-Betting.Blazor.ComponentLibrary/DesktopView/NavBar.razor
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ else
MpmDbContext m_DbContext;
private bool cancelClose;
private bool reedemable = false;
private int Points { get; set; }
private long Points { get; set; }
private bool IsFirstLogin = false;

private string m_ImageUrl = "./Images/default-profile-picture.png";
Expand Down Expand Up @@ -277,11 +277,11 @@ else



private string ConvertToLog10(int number)
private string ConvertToLog10(long number)
{
if (number == 0)
return "0";
int mag = (int)(Math.Floor(Math.Log10(number)) / 3);
long mag = (int)(Math.Floor(Math.Log10(number)) / 3);
double divisor = Math.Pow(10, mag * 3);

double shortNumber = number / divisor;
Expand All @@ -304,6 +304,12 @@ else
case 4:
suffix = "t";
break;
case 5:
suffix = "qt";
break;
case 6:
suffix = "qit";
break;
default:
suffix = "a fuck ton";
break;
Expand Down
2 changes: 1 addition & 1 deletion MPM-Betting.DataModel/User/MpmUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public class MpmUser : IdentityUser
{
public List<UserGroupEntry> UserGroupEntries { get; set; } = [];

public int Points { get; set; } = 0;
public long Points { get; set; } = 0;
public DateTime LastRedeemed { get; set; } = DateTime.MinValue;

public List<Achievement> Achievments { get; set; } = [];
Expand Down
Loading

0 comments on commit e9a8803

Please sign in to comment.