Skip to content

Commit 54b2060

Browse files
committed
pool+accounts: display trader key in account section
1 parent 25434d5 commit 54b2060

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

app/src/components/pool/account/AccountSummary.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,12 @@ const AccountSummary: React.FC = () => {
6969
<span>{l('accountStatus')}</span>
7070
<StatusBadge pending={account.isPending}>{account.stateLabel}</StatusBadge>
7171
</SummaryItem>
72+
<SummaryItem>
73+
<span>{l('traderKey')}</span>
74+
<Tip overlay={account.traderKey} capitalize={false}>
75+
<span>{account.traderKeyEllipsed}</span>
76+
</Tip>
77+
</SummaryItem>
7278
<SummaryItem>
7379
<span>{l('fundingTxn')}</span>
7480
<Tip overlay={account.fundingTxnId} capitalize={false}>

app/src/i18n/locales/en-US.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@
9595
"cmps.pool.account.AccountSummary.expiresIn": "Expires in",
9696
"cmps.pool.account.AccountSummary.expiresHeight": "{{remaining}} blocks (Height #{{height}})",
9797
"cmps.pool.account.AccountSummary.accountStatus": "Account Status",
98+
"cmps.pool.account.AccountSummary.traderKey": "Trader Key",
9899
"cmps.pool.account.AccountSummary.fundingTxn": "Funding Transaction",
99100
"cmps.pool.account.AccountSummary.currentBalance": "Current Balance",
100101
"cmps.pool.account.AccountSummary.openOrdersCount": "Open Orders",

app/src/store/models/account.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ export default class Account {
2222
this.update(poolAccount);
2323
}
2424

25+
/** the first and last 6 chars of the trader key */
26+
get traderKeyEllipsed() {
27+
return ellipseInside(this.traderKey, 4);
28+
}
29+
2530
/** the first and last 6 chars of the funding txn id */
2631
get fundingTxnIdEllipsed() {
2732
return ellipseInside(this.fundingTxnId, 4);

0 commit comments

Comments
 (0)