Skip to content

Commit a4ebfd3

Browse files
committed
Player Profile boilerplate shows the balance amount as a decimal instead of wei
1 parent 7aebf12 commit a4ebfd3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Packages/Sequence-Unity/Sequence/SequenceFrontend/Scripts/UI/Boilerplates/PlayerProfile/SequencePlayerProfile.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using Sequence.Demo;
33
using Sequence.EmbeddedWallet;
4+
using Sequence.Utils;
45
using TMPro;
56
using UnityEngine;
67

@@ -54,9 +55,10 @@ public async void Show(IWallet wallet, Chain chain, Action onClose = null)
5455

5556
var walletAddress = _wallet.GetWalletAddress();
5657
var indexer = new ChainIndexer(_chain);
57-
var balance = await indexer.GetEtherBalance(walletAddress);
58-
59-
_etherBalanceText.text = $"{balance.balanceWei} ETH";
58+
var balanceResponse = await indexer.GetEtherBalance(walletAddress);
59+
60+
var balance = DecimalNormalizer.ReturnToNormal(balanceResponse.balanceWei);
61+
_etherBalanceText.text = $"{balance} ETH";
6062
_messagePopup.gameObject.SetActive(false);
6163
EnableLoading(false);
6264

0 commit comments

Comments
 (0)