Skip to content

Commit

Permalink
add comfirmation status #275
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhvk committed Jul 2, 2020
1 parent 8bd3e1a commit 21899f0
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/app/DepositPage/DepositPageRenderer.jsx
Expand Up @@ -34,7 +34,7 @@ export default function DepositRenderer({
{
title: <FormattedMessage id="portfolioPage.depositWithdraw.table.status" />,
field: 'status',
width: '12%',
width: '16%',
},
{
title: <FormattedMessage id="portfolioPage.depositWithdraw.table.amount" />,
Expand All @@ -50,12 +50,12 @@ export default function DepositRenderer({
{
title: <FormattedMessage id="portfolioPage.depositWithdraw.table.txHash" />,
field: 'txHash',
width: '25%',
width: '23%',
},
{
title: <FormattedMessage id="portfolioPage.depositWithdraw.table.depositAddress" />,
field: 'depositAddress',
width: '25%',
width: '23%',
},
]

Expand Down
6 changes: 5 additions & 1 deletion src/components/DataTableHistory/DataTableHistory.jsx
Expand Up @@ -35,7 +35,11 @@ function renderCell(item, field) {
{truncateTripleText(item[field], 8)}
</ExteralLink>)
case 'status':
return STATUS[item[field]]
if (item.tokenConfirmations && item['status'] === 'PROCESSING') {
return (<span>{STATUS[item['status']]} {`(${item.confirmations}/${item.tokenConfirmations})`}</span>)
}

return STATUS[item['status']]
default:
return item[field]
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/DepositTable/DepositTableRenderer.jsx
Expand Up @@ -50,7 +50,7 @@ const DepositTableRenderer = (props: Props) => {
} = props
return (
<React.Fragment>
<MainTitle>Balance <SmallText muted>&asymp; ${BigNumber(totalBalance).toFormat(2)}</SmallText></MainTitle>
<MainTitle><FormattedMessage id="portfolioPage.balance" /> <SmallText muted>&asymp; ${BigNumber(totalBalance).toFormat(2)}</SmallText></MainTitle>
<TableSection>
<RowSpaceBetween style={{ marginBottom: '10px' }}>
<OperationButtonWrapper>
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/en.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "Manual",
"exchangeLendingPage.orders.liqInfor1": "Collateral token / Lending token",
"exchangeLendingPage.orders.liqInfor2": "Hover on liquidating price to see details",
"portfolioPage.balance": "Balance",
"portfolioPage.send": "Send",
"portfolioPage.receive": "Receive",
"portfolioPage.hideZeroAmounts": "Hide zero amounts",
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/fr.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "Manual",
"exchangeLendingPage.orders.liqInfor1": "Collateral token / Lending token",
"exchangeLendingPage.orders.liqInfor2": "Hover on liquidating price to see details",
"portfolioPage.balance": "Balance",
"portfolioPage.send": "Envoyer",
"portfolioPage.receive": "Recevoir",
"portfolioPage.hideZeroAmounts": "Masquer les montants nuls",
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/ja.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "マニュアル",
"exchangeLendingPage.orders.liqInfor1": "担保トークン/貸出トークン",
"exchangeLendingPage.orders.liqInfor2": "清算価格にカーソルを合わせると詳細が表示されます",
"portfolioPage.balance": "Balance",
"portfolioPage.send": "送信",
"portfolioPage.receive": "受信",
"portfolioPage.hideZeroAmounts": "0で金額を非表示",
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/nl.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "Manual",
"exchangeLendingPage.orders.liqInfor1": "Collateral token / Lending token",
"exchangeLendingPage.orders.liqInfor2": "Hover on liquidating price to see details",
"portfolioPage.balance": "Balance",
"portfolioPage.send": "Verzenden",
"portfolioPage.receive": "Ontvangen",
"portfolioPage.hideZeroAmounts": "Verberg lege rekeningen",
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/tr.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "Manuel",
"exchangeLendingPage.orders.liqInfor1": "Teminatlanmış Token / Borç Verilmiş Token",
"exchangeLendingPage.orders.liqInfor2": "Ayrıntıları görmek için likitide fiyatının üzerine gelin",
"portfolioPage.balance": "Balance",
"portfolioPage.send": "Gönder",
"portfolioPage.receive": "Al",
"portfolioPage.hideZeroAmounts": "Sıfır tutarları gizle",
Expand Down
1 change: 1 addition & 0 deletions src/locales/langs/vi.json
Expand Up @@ -208,6 +208,7 @@
"exchangeLendingPage.orders.topUpManual": "Tự TopUp",
"exchangeLendingPage.orders.liqInfor1": "Đồng thế chấp/ Đồng cho vay",
"exchangeLendingPage.orders.liqInfor2": "Trỏ vào giá để xem chi tiết",
"portfolioPage.balance": "Số dư",
"portfolioPage.send": "Gửi",
"portfolioPage.receive": "Nhận",
"portfolioPage.hideZeroAmounts": "Ẩn số dư bằng 0",
Expand Down
1 change: 1 addition & 0 deletions src/store/models/depositPage.js
Expand Up @@ -32,6 +32,7 @@ export default function depositPageSelector(state: State) {
const decimals = token ? token.decimals : amountPrecision
deposit.amount = BigNumber(deposit.amount).dividedBy(10**decimals).toFixed(8)
deposit.scanUrl = token.explorerUrl
deposit.tokenConfirmations = token.confirmations

return deposit
})
Expand Down

0 comments on commit 21899f0

Please sign in to comment.