Skip to content

Commit

Permalink
DFI in Vaults added to holdings overview, better UI for exhcange stat…
Browse files Browse the repository at this point in the history
…us, Small inkognito fix
  • Loading branch information
igorshelkovenkov committed Jan 4, 2022
1 parent d3f2aa4 commit 6395bcf
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 44 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"email": "[email protected]",
"url": "https://www.defichain-income.com"
},
"version": "8.10.0",
"version": "8.10.1",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
48 changes: 24 additions & 24 deletions src/app/app.component.html

Large diffs are not rendered by default.

48 changes: 32 additions & 16 deletions src/app/components/dex-statistics/dex-statistics.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -303,26 +303,42 @@ <h1 class='text-lg font-bold'>Block</h1>
<div class='inline-lg-block rounded bg-gray-100 dark:bg-gray-600 dark:text-white p-2'>
<h1 class='text-lg font-bold'>Status Exchanges</h1>
<h2 class='text-lg font-bold'>Kucoin</h2>
<div class='grid gap-2'>
<div>
<div
class='inline-block rounded-full bg-pink-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Deposit: {{exchange?.kucoinStatusDeposit ? 'ONLINE' : 'OFFLINE'}}
</div>
<div
class='inline-block rounded-full bg-pink-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Withdraw: {{exchange?.kucoinStatusWithdraw ? 'ONLINE' : 'OFFLINE' }}
</div>
<div class='my-2 dark:text-gray-100'>
<span class='mr-2'>Deposit:</span>
<div *ngIf='exchange && exchange?.kucoinStatusDeposit'
class='inline-block rounded-full bg-green-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Online
</div>
<div *ngIf="exchange && !exchange?.kucoinStatusDeposit"
class='inline-block rounded-full bg-red-600 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Offline
</div>
</div>
<div class='my-2 dark:text-gray-100'>
<span
class='mr-2'>Withdraw:</span>
<div *ngIf='exchange && exchange?.kucoinStatusWithdraw'
class='inline-block rounded-full bg-green-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Online
</div>
<div *ngIf="exchange && !exchange?.kucoinStatusWithdraw"
class='inline-block rounded-full bg-red-600 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Offline
</div>
</div>
<h2 class='text-lg font-bold'>Bittrex</h2>
<div class='grid gap-2'>
<div>
<div
class='inline-block rounded-full bg-pink-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
{{exchange?.bittrexStatus}}
</div>
<div class='my-2 dark:text-gray-100'>
<span class='mr-2'>Status:</span>
<div *ngIf="exchange?.bittrexStatus === 'ONLINE'"
class='inline-block rounded-full bg-green-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Online
</div>
<div *ngIf="exchange?.bittrexStatus === 'OFFLINE'"
class='inline-block rounded-full bg-red-600 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Offline
</div>
</div>
<div class='grid gap-2'>
<div>
<div
class='inline-block rounded-full bg-pink-500 hover:bg-gray-800 transition-all text-white text-sm px-2 py-1 cursor-pointer text-center'>
Expand Down
18 changes: 18 additions & 0 deletions src/app/components/value/value.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,22 @@ <h3 class='text-lg font-semibold mt-4 mb-1 dark:text-gray-100'>
</div>
</div>

<div *ngIf="getCollateralCountVaults('DFI') > 0" class='text-xl relative'>
<div class='text-pink-500 font-semibold inline-block overflow-hidden overflow-ellipsis pr-2'>
{{isIncognitoModeOn ? '****' : getCollateralCountVaults('DFI') | number: '1.2-2' }}
<br />
<div
class='text-xs text-gray-400'
>
<app-price *ngIf='!isIncognitoModeOn' [fiat]='fiat' [usdPrice]='getDfiInVaultUsd()'></app-price>
<div *ngIf='isIncognitoModeOn'>****</div>
</div>
</div>
<div class='inline-block h-full align-middle dark:text-gray-100'>
Vaults
</div>
</div>

<div *ngIf='wallet?.dfiInMasternodes > 0' class='text-xl relative'>
<div class='text-pink-500 font-semibold inline-block overflow-hidden overflow-ellipsis pr-2'>
{{isIncognitoModeOn ? '****' : wallet?.dfiInMasternodes - getFreezerDfiCount() | number: '1.2-2' }}
Expand All @@ -121,6 +137,8 @@ <h3 class='text-lg font-semibold mt-4 mb-1 dark:text-gray-100'>
</div>
</div>



<div *ngIf='getFreezerDfiCount()> 0' class='text-xl relative'>
<div class='text-pink-500 font-semibold inline-block overflow-hidden overflow-ellipsis pr-2'>
{{isIncognitoModeOn ? '****' : getFreezerDfiCount() | number: '1.2-2' }}
Expand Down
2 changes: 1 addition & 1 deletion src/app/components/value/value.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ export class ValueComponent implements OnInit, OnChanges {
getDfiCount(): number {
return this.wallet.dfi + this.wallet.dfiInEthPool + this.wallet.dfiInBtcPool + this.wallet.dfiInUsdtPool + this.wallet.dfiInUsdcPool
+ this.wallet.dfiInLtcPool + this.wallet.dfiInDogePool + this.wallet.dfiInBchPool + this.wallet.dfiInUsdPool
+ this.dfiInStaking + this.wallet.dfiInMasternodes;
+ this.dfiInStaking + this.wallet.dfiInMasternodes + this.getCollateralCountVaults('DFI');
}

getAnteilStakingOfAllValue(): number {
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.prod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const environment = {
address_vaults: 'https://ocean.defichain.com/v0/mainnet/address/ADDRESS_VAULTS/vaults',
mamon_account: 'https://sync.defichain-masternode-monitor.com/v1/KEY/masternodes',
mamon_account_node: 'https://api.defichain-masternode-monitor.com/v1/masternodes/info/',
version: '8.10.0',
version: '8.10.1',
bittrex: 'https://api.bittrex.com/v3/currencies/DFI',
kucoin: 'https://api.kucoin.com/api/v1/currencies/DFI',
graphql: 'https://graphql.defichain-income.com/graphql',
Expand Down
2 changes: 1 addition & 1 deletion src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const environment = {
address_vaults: 'https://ocean.defichain.com/v0/mainnet/address/ADDRESS_VAULTS/vaults',
mamon_account: 'https://sync.defichain-masternode-monitor.com/v1/KEY/masternodes',
mamon_account_node: 'https://api.defichain-masternode-monitor.com/v1/masternodes/info/',
version: '8.10.0',
version: '8.10.1',
graphql: 'https://graphql.defichain-income.com/graphql',
// Matomo
// No tracking for local -> wrong id
Expand Down
5 changes: 5 additions & 0 deletions src/interface/Changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ export class Changelog {

this.logs = new Array<Log>();

this.log = new Log();
this.log.version = '8.10.1 - 4.1.2022';
this.log.comment = 'DFI in Vaults added to holdings overview, better UI for exhcange status, Small inkognito fix';
this.logs.push(this.log);

this.log = new Log();
this.log.version = '8.10.0 - 4.1.2022';
this.log.comment = 'Computed Blocktime last 200 Blocks, Exchange Status added';
Expand Down

0 comments on commit 6395bcf

Please sign in to comment.