Skip to content

Commit

Permalink
Add weight_threshold in the authorities tab
Browse files Browse the repository at this point in the history
* Add weight_threshold in the authorities tab

* Fix missing numbers in Asset info
  • Loading branch information
freak5g authored May 24, 2023
1 parent a5fbc22 commit 3df021f
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 21 deletions.
3 changes: 2 additions & 1 deletion app/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
"Asset": "Asset",
"Vesting balances": "Vesting balances",
"Owner keys": "Owner keys",
"Threshold": "Threshold",
"Weight": "Weight",
"Threshold" : "Threshold",
"Active keys": "Active keys",
"Memo key": "Memo key",
"Issued Assets": "Issued Assets",
Expand Down
1 change: 1 addition & 0 deletions app/i18n/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"Asset": "资产",
"Vesting balances": "待解冻余额",
"Owner keys": "资金密钥",
"Weight": "权重",
"Threshold": "阈值",
"Active keys": "账户密钥",
"Memo key": "备注密钥",
Expand Down
37 changes: 23 additions & 14 deletions app/sections/accounts/account.html
Original file line number Diff line number Diff line change
Expand Up @@ -233,20 +233,25 @@
<td class="align-right"><font size="-1">{{ok.threshold}}</font></td>
</tbody>
</table>

<table class="table" ng-if="owner_accounts.length">
<thead>
<thead>
<tr>
<th>
<span data-translate="Account"></span>
</th>
<th class="align-right"><span data-translate="Threshold"></span></th>
<th>
<span data-translate="Account"></span>
</th>
<th class="align-right"><span data-translate="Weight"></span></th>
</tr>
</thead>
<tbody>
</thead>
<tbody>
<tr data-ng-repeat="oa in owner_accounts">
<td align="left"><a href="#/accounts/{{oa.account}}/"><font size="-1">{{oa.account_name}}</font></a></td>
<td class="align-right"><font size="-1">{{oa.threshold}}</font></td>
</tbody>
<td align="left"><a href="#/accounts/{{oa.account}}/"><font size="-1">{{oa.account_name}}</font></a></td>
<td class="align-right"><font size="-1">{{oa.threshold}}</font></td>
</tr>
<tr>
<td class="align-right" colspan="2"><font size="-1"><span data-translate="Threshold"></span>: {{account.owner_threshold}}</font></td>
</tr>
</tbody>
</table>
</div>
</div>
Expand Down Expand Up @@ -278,13 +283,17 @@
<th>
<span data-translate="Account"></span>
</th>
<th class="align-right"><span data-translate="Threshold"></span></th>
<th class="align-right"><span data-translate="Weight"></span></th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="aa in active_accounts">
<td align="left"><a href="#/accounts/{{aa.account}}/"><font size="-1">{{aa.account_name}}</font></a></td>
<td class="align-right"><font size="-1">{{aa.threshold}}</font></td>
<tr data-ng-repeat="aa in active_accounts">
<td align="left"><a href="#/accounts/{{aa.account}}/"><font size="-1">{{aa.account_name}}</font></a></td>
<td class="align-right"><font size="-1">{{aa.threshold}}</font></td>
</tr>
<tr>
<td class="align-right" colspan="2"><font size="-1"><span data-translate="Threshold"></span>: {{account.active_threshold}}</font></td>
</tr>
</tbody>
</table>
</div>
Expand Down
6 changes: 4 additions & 2 deletions app/sections/accounts/accounts.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@ import {sha256} from "js-sha256";
lifetime_fees_paid: utilities.formatBalance(lifetime_fees_paid, 5),
bts_balance: utilities.formatBalance(core_balance, 5),
vesting: vesting_balances,
memo_key: fullAccount.account.options.memo_key
memo_key: fullAccount.account.options.memo_key,
owner_threshold: fullAccount.account.owner.weight_threshold,
active_threshold: fullAccount.account.active.weight_threshold
};
if ($scope.account) {
$scope.account = Object.assign(new_account, $scope.account);
Expand Down Expand Up @@ -118,7 +120,7 @@ import {sha256} from "js-sha256";
accountService.parseAuth(fullAccount.account.active.key_auths, "key", function (returnData) {
$scope.active_keys = returnData;
});

accountService.parseAuth(fullAccount.account.active.account_auths, "account",
function (returnData) {
$scope.active_accounts = returnData;
Expand Down
8 changes: 4 additions & 4 deletions app/sections/assets/asset.html
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ <h2>{{data.symbol}}</h2>
<span data-translate="Description"></span>
</li>
<li class="list-group-item">
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.max_supply | number}} {{data.symbol}}</span>
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.max_supply}} {{data.symbol}}</span>
<span data-translate="Max supply"></span>
</li>
<li class="list-group-item">
Expand All @@ -107,15 +107,15 @@ <h2>{{data.symbol}}</h2>
<span data-translate="Precision"></span>
</li>
<li class="list-group-item">
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.fee_pool | number}} {{data.symbol}}</span>
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.fee_pool}} {{data.symbol}}</span>
<span data-translate="Fee pool"></span>
</li>
<li class="list-group-item">
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.current_supply | number}} {{data.symbol}}</span>
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.current_supply}} {{data.symbol}}</span>
<span data-translate="Current supply"></span>
</li>
<li class="list-group-item">
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.confidential_supply | number}} {{data.symbol}} </span>
<span class="badge" style="background-color: #FFFFFF; color: #000000">{{data.confidential_supply}} {{data.symbol}} </span>
<span data-translate="Confidential supply"></span>
</li>
</ul>
Expand Down

0 comments on commit 3df021f

Please sign in to comment.