Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
Breeze
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DeStream-public
Breeze
Commits
e10d0e5f
Commit
e10d0e5f
authored
Sep 27, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Seperate coin notation from coin abbreviation
parent
74d1abc2
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
25 additions
and
18 deletions
+25
-18
coin-notation.pipe.ts
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
+13
-13
dashboard.component.html
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
+3
-2
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+2
-0
history.component.html
Breeze.UI/src/app/wallet/history/history.component.html
+1
-1
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+2
-0
transaction-details.component.html
...et/transaction-details/transaction-details.component.html
+2
-2
transaction-details.component.ts
...llet/transaction-details/transaction-details.component.ts
+2
-0
No files found.
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
View file @
e10d0e5f
...
@@ -13,46 +13,46 @@ export class CoinNotationPipe implements PipeTransform {
...
@@ -13,46 +13,46 @@ export class CoinNotationPipe implements PipeTransform {
private
coinNotation
:
number
;
private
coinNotation
:
number
;
private
decimalLimit
=
8
;
private
decimalLimit
=
8
;
transform
(
value
:
any
):
any
{
transform
(
value
:
number
):
number
{
let
temp
;
let
temp
;
if
(
typeof
value
===
'number'
)
{
if
(
typeof
value
===
'number'
)
{
switch
(
this
.
getCoinUnit
())
{
switch
(
this
.
getCoinUnit
())
{
case
"BTC"
:
case
"BTC"
:
temp
=
value
/
100000000
;
temp
=
value
/
100000000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" BTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"mBTC"
:
case
"mBTC"
:
temp
=
value
/
100000
;
temp
=
value
/
100000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" mBTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"uBTC"
:
case
"uBTC"
:
temp
=
value
/
100
;
temp
=
value
/
100
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" uBTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TBTC"
:
case
"TBTC"
:
temp
=
value
/
100000000
;
temp
=
value
/
100000000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TBTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TmBTC"
:
case
"TmBTC"
:
temp
=
value
/
100000
;
temp
=
value
/
100000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TmBTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TuBTC"
:
case
"TuBTC"
:
temp
=
value
/
100
;
temp
=
value
/
100
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TuBTC"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"STRAT"
:
case
"STRAT"
:
temp
=
value
/
100000000
;
temp
=
value
/
100000000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" STRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"mSTRAT"
:
case
"mSTRAT"
:
temp
=
value
/
100000
;
temp
=
value
/
100000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" mSTRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"uSTRAT"
:
case
"uSTRAT"
:
temp
=
value
/
100
;
temp
=
value
/
100
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" uSTRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TSTRAT"
:
case
"TSTRAT"
:
temp
=
value
/
100000000
;
temp
=
value
/
100000000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TSTRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TmSTRAT"
:
case
"TmSTRAT"
:
temp
=
value
/
100000
;
temp
=
value
/
100000
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TmSTRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
case
"TuSTRAT"
:
case
"TuSTRAT"
:
temp
=
value
/
100
;
temp
=
value
/
100
;
return
temp
.
toFixed
(
this
.
decimalLimit
)
+
" TuSTRAT"
;
return
temp
.
toFixed
(
this
.
decimalLimit
);
}
}
}
}
}
}
...
...
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
View file @
e10d0e5f
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<p
class=
"lead"
>
<p
class=
"lead"
>
<!--<strong><span class="h2">29</span>.76500293</strong>-->
<!--<strong><span class="h2">29</span>.76500293</strong>-->
<strong>
{{ confirmedBalance | coinNotation }}
</strong>
<strong>
{{ confirmedBalance | coinNotation }}
</strong>
<
!--<small class="text-uppercase">btc</small>--
>
<
small
class=
"text-uppercase"
>
{{ coinUnit }}
</small
>
</p>
</p>
</div>
</div>
<!-- /col-->
<!-- /col-->
...
@@ -26,6 +26,7 @@
...
@@ -26,6 +26,7 @@
<h5>
Unconfirmed balance
</h5>
<h5>
Unconfirmed balance
</h5>
<p
class=
"lead"
>
<p
class=
"lead"
>
<strong>
{{ unconfirmedBalance | coinNotation }}
</strong>
<strong>
{{ unconfirmedBalance | coinNotation }}
</strong>
<small
class=
"text-uppercase"
>
{{ coinUnit }}
</small>
</p>
</p>
</div>
</div>
<!-- /col-->
<!-- /col-->
...
@@ -56,7 +57,7 @@
...
@@ -56,7 +57,7 @@
<span
*
ngIf=
"transaction.transactionType == 'received'"
class=
"text-success"
>
+
</span>
<span
*
ngIf=
"transaction.transactionType == 'received'"
class=
"text-success"
>
+
</span>
<span
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"text-danger"
>
-
</span>
<span
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"text-danger"
>
-
</span>
{{ transaction.transactionAmount | coinNotation }}
{{ transaction.transactionAmount | coinNotation }}
<
!--<small class="text-uppercase">btc</small>--
>
<
small
class=
"text-uppercase"
>
{{ coinUnit }}
</small
>
<span
*
ngIf=
"transaction.transactionConfirmedInBlock"
class=
"badge badge-success text-capitalize"
>
Confirmed
</span>
<span
*
ngIf=
"transaction.transactionConfirmedInBlock"
class=
"badge badge-success text-capitalize"
>
Confirmed
</span>
<span
*
ngIf=
"!transaction.transactionConfirmedInBlock"
class=
"badge badge-warning text-capitalize"
>
Pending
</span>
<span
*
ngIf=
"!transaction.transactionConfirmedInBlock"
class=
"badge badge-warning text-capitalize"
>
Pending
</span>
</li>
</li>
...
...
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
View file @
e10d0e5f
...
@@ -25,11 +25,13 @@ export class DashboardComponent implements OnInit {
...
@@ -25,11 +25,13 @@ export class DashboardComponent implements OnInit {
public
confirmedBalance
:
number
;
public
confirmedBalance
:
number
;
public
unconfirmedBalance
:
number
;
public
unconfirmedBalance
:
number
;
public
transactionArray
:
TransactionInfo
[];
public
transactionArray
:
TransactionInfo
[];
public
coinUnit
:
string
;
private
walletBalanceSubscription
:
Subscription
;
private
walletBalanceSubscription
:
Subscription
;
private
walletHistorySubscription
:
Subscription
;
private
walletHistorySubscription
:
Subscription
;
ngOnInit
()
{
ngOnInit
()
{
this
.
startSubscriptions
();
this
.
startSubscriptions
();
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
};
};
ngOnDestroy
()
{
ngOnDestroy
()
{
...
...
Breeze.UI/src/app/wallet/history/history.component.html
View file @
e10d0e5f
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
<span
*
ngIf=
"transaction.transactionType == 'received'"
class=
"text-success"
>
+
</span>
<span
*
ngIf=
"transaction.transactionType == 'received'"
class=
"text-success"
>
+
</span>
<span
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"text-danger"
>
-
</span>
<span
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"text-danger"
>
-
</span>
{{ transaction.transactionAmount | coinNotation }}
{{ transaction.transactionAmount | coinNotation }}
<
!--<small class="text-uppercase">btc</small>--
>
<
small
class=
"text-uppercase"
>
{{ coinUnit }}
</small
>
<span
*
ngIf=
"transaction.transactionConfirmedInBlock"
class=
"badge badge-success text-capitalize"
>
Confirmed
</span>
<span
*
ngIf=
"transaction.transactionConfirmedInBlock"
class=
"badge badge-success text-capitalize"
>
Confirmed
</span>
<span
*
ngIf=
"!transaction.transactionConfirmedInBlock"
class=
"badge badge-warning text-capitalize"
>
Pending
</span>
<span
*
ngIf=
"!transaction.transactionConfirmedInBlock"
class=
"badge badge-warning text-capitalize"
>
Pending
</span>
</li>
</li>
...
...
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
e10d0e5f
...
@@ -22,11 +22,13 @@ export class HistoryComponent {
...
@@ -22,11 +22,13 @@ export class HistoryComponent {
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
,
private
modalService
:
NgbModal
)
{}
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
,
private
modalService
:
NgbModal
)
{}
public
transactions
:
TransactionInfo
[];
public
transactions
:
TransactionInfo
[];
public
coinUnit
:
string
;
private
errorMessage
:
string
;
private
errorMessage
:
string
;
private
walletHistorySubscription
:
Subscription
;
private
walletHistorySubscription
:
Subscription
;
ngOnInit
()
{
ngOnInit
()
{
this
.
startSubscriptions
();
this
.
startSubscriptions
();
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
}
}
ngOnDestroy
()
{
ngOnDestroy
()
{
...
...
Breeze.UI/src/app/wallet/transaction-details/transaction-details.component.html
View file @
e10d0e5f
...
@@ -12,8 +12,8 @@
...
@@ -12,8 +12,8 @@
</ul>
</ul>
<ul
class=
"list-inline row"
>
<ul
class=
"list-inline row"
>
<li
class=
"list-inline-item col blockLabel"
>
Amount
</li>
<li
class=
"list-inline-item col blockLabel"
>
Amount
</li>
<li
*
ngIf=
"transaction.transactionType == 'received'"
class=
"list-inline-item col-9 blockText text-success"
>
{{ transaction.transactionAmount | coinNotation }}
</li>
<li
*
ngIf=
"transaction.transactionType == 'received'"
class=
"list-inline-item col-9 blockText text-success"
>
{{ transaction.transactionAmount | coinNotation }}
{{ coinUnit }}
</li>
<li
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"list-inline-item col-9 blockText text-danger"
>
-{{ transaction.transactionAmount | coinNotation }}
</li>
<li
*
ngIf=
"transaction.transactionType == 'sent'"
class=
"list-inline-item col-9 blockText text-danger"
>
-{{ transaction.transactionAmount | coinNotation }}
{{ coinUnit }}
</li>
</ul>
</ul>
<ul
class=
"list-inline row"
>
<ul
class=
"list-inline row"
>
<li
*
ngIf=
"transaction.transactionType == 'received'"
class=
"list-inline-item col blockLabel"
>
From
</li>
<li
*
ngIf=
"transaction.transactionType == 'received'"
class=
"list-inline-item col blockLabel"
>
From
</li>
...
...
Breeze.UI/src/app/wallet/transaction-details/transaction-details.component.ts
View file @
e10d0e5f
...
@@ -18,12 +18,14 @@ export class TransactionDetailsComponent implements OnInit, OnDestroy {
...
@@ -18,12 +18,14 @@ export class TransactionDetailsComponent implements OnInit, OnDestroy {
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
,
public
activeModal
:
NgbActiveModal
)
{}
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
,
public
activeModal
:
NgbActiveModal
)
{}
public
copied
:
boolean
=
false
;
public
copied
:
boolean
=
false
;
public
coinUnit
:
string
;
private
generalWalletInfoSubscription
:
Subscription
;
private
generalWalletInfoSubscription
:
Subscription
;
private
lastBlockSyncedHeight
:
number
;
private
lastBlockSyncedHeight
:
number
;
private
confirmations
:
number
;
private
confirmations
:
number
;
ngOnInit
()
{
ngOnInit
()
{
this
.
startSubscriptions
();
this
.
startSubscriptions
();
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
}
}
ngOnDestroy
()
{
ngOnDestroy
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment