Skip to content

Commit

Permalink
Merge branch 'master' into feature/meme-frames
Browse files Browse the repository at this point in the history
  • Loading branch information
michielpost authored Jun 19, 2024
2 parents a93d8c7 + 94a203a commit 29f038b
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 14 deletions.
7 changes: 7 additions & 0 deletions src/aoWebWallet/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace aoWebWallet
{
public static class Constants
{
public static string AoTokenId => "m3PaWzK4PTG9lAaqYQPaPdOcXdO8hYqi5Fe9NWqXd0w";
}
}
24 changes: 17 additions & 7 deletions src/aoWebWallet/Services/StorageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,25 @@ public async ValueTask<List<Token>> GetTokenIds()

public static void AddSystemTokens(List<Token> result)
{
AddSystemToken(result, "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc",
AddSystemToken(result, Constants.AoTokenId,
new TokenData
{
TokenId = "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc",
Denomination = 3,
Logo = "eIOOJiqtJucxvB4k8a-sEKcKpKTh9qQgOV3Au7jlGYc",
Name = "AOCRED",
Ticker = "testnet-AOCRED"
}); //CRED
TokenId = Constants.AoTokenId,
Denomination = 12,
Logo = "UkS-mdoiG8hcAClhKK8ch4ZhEzla0mCPDOix9hpdSFE",
Name = "AO",
Ticker = "AO"
}); //AO

AddSystemToken(result, "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc",
new TokenData
{
TokenId = "Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc",
Denomination = 3,
Logo = "eIOOJiqtJucxvB4k8a-sEKcKpKTh9qQgOV3Au7jlGYc",
Name = "AOCRED",
Ticker = "testnet-AOCRED"
}); //CRED


AddSystemToken(result, "8p7ApPZxC_37M06QHVejCQrKsHbcJEerd3jWNkDUWPQ",
Expand Down
12 changes: 8 additions & 4 deletions src/aoWebWallet/Shared/BalanceDataComponent.razor
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,15 @@
<MudSpacer />
<MudSpacer />
<MudStack Justify="Justify.FlexEnd" Class="send-receive-buttons-mobile" Spacing="0" Row="true">
<MudTooltip Text="Deposit tokens" Arrow="true" Placement="Placement.Top">
<MudButton Variant="Variant.Filled" Size="Size.Small" Color="Color.Primary" EndIcon="@Icons.Material.Filled.ArrowDownward" aria-label="Receive" OnClick="()=>{Receive(BalanceDataVM);}"><span Class="d-none d-sm-flex">Receive</span></MudButton>
</MudTooltip>

@if (BalanceDataVM.Token.TokenId != Constants.AoTokenId)
{
<MudTooltip Text="Deposit tokens" Arrow="true" Placement="Placement.Top">
<MudButton Variant="Variant.Filled" Size="Size.Small" Color="Color.Primary" EndIcon="@Icons.Material.Filled.ArrowDownward" aria-label="Receive" OnClick="()=>{Receive(BalanceDataVM);}"><span Class="d-none d-sm-flex">Receive</span></MudButton>
</MudTooltip>
}

@if (CanSend)
@if (CanSend && BalanceDataVM.Token.TokenId != Constants.AoTokenId)
{
var hasBalance = BalanceDataVM.BalanceDataLoader.Data?.Balance ?? 0;
<MudTooltip Text="Withdraw tokens" Arrow="true" Placement="Placement.Bottom">
Expand Down
3 changes: 2 additions & 1 deletion src/aoWebWallet/ViewModels/WalletDetailViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ public WalletDetailViewModel(MainViewModel mainViewModel,
public async Task Initialize(string address)
{
VisibleTokenList = new();
VisibleTokenList.Add("Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc");
VisibleTokenList.Add(Constants.AoTokenId); //AO
VisibleTokenList.Add("Sa0iBLPNyJQrwpTTG-tWLQU-1QeUAJA73DdxGGiKoJc"); //TESTNET-CRED

ResetTokenTransferlist();

Expand Down
4 changes: 2 additions & 2 deletions src/aoWebWallet/aoWebWallet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

<ItemGroup>
<PackageReference Include="ArweaveAO" Version="0.0.3" />
<PackageReference Include="ArweaveBlazor" Version="0.0.8" />
<PackageReference Include="ArweaveBlazor" Version="0.0.9" />
<PackageReference Include="ClipLazor" Version="2.1.1" />
<PackageReference Include="CodeBeam.MudBlazor.Extensions" Version="6.9.2" />
<PackageReference Include="MudBlazor" Version="6.19.1" />
<PackageReference Include="MudBlazor" Version="6.20.0" />
<PackageReference Include="Blazored.LocalStorage" Version="4.5.0" />
<PackageReference Include="BlazorWasmPreRendering.Build" Version="4.0.0" />
<PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
Expand Down

0 comments on commit 29f038b

Please sign in to comment.