Skip to content

Commit

Permalink
Add token TON balance info
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey Nedobylsky committed Jun 7, 2021
1 parent e046533 commit 182fa3d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions modules/ui/popups.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,13 @@ class Popups {
$('.tokenName').text(tokenInfo.name);
$('.tokenWalletAddress').html(`<a data-clipboard="${walletAddress}" class="autoClipboard" ><i class="material-icons buttonIcon">content_copy</i>${Utils.shortenPubkey(walletAddress)}</a>`)
$('.tokenRootAddress').html(`<a data-clipboard="${rootTokenAddress}" class="autoClipboard" >${Utils.shortenPubkey(rootTokenAddress)}</a>`);
try {
let balance = await messenger.rpcCall('main_getWalletBalance', [walletAddress], 'background');
$('.tokenTonBalance').html(Utils.unsignedNumberToSigned(balance));
}catch (e){
$('.tokenTonBalance').html(``);
console.log('ERROR GETTING TOKEN WALLET TON BALANCE', e)
}

$('.tokenWalletTokenIcon').html(tokenInfo.icon);

Expand Down
5 changes: 4 additions & 1 deletion pages/tokenWallet.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ <h1 class="tokenName" style="margin-bottom: 5px;"> <div class="preloader"></

<h1 class="tokenWalletBalance">0.0</h1>
<div class="">
<h3 class="">
<h3 style="margin-bottom: -5px;">
<span class="tokenWalletAddress">0:0</span>
</h3>
<div style="font-size: 8pt">
<span class="tokenTonBalance">0</span>
</div>


<div class="row walletButtonsRow ifTokenWalletExists">
Expand Down

0 comments on commit 182fa3d

Please sign in to comment.