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
0ba55e7e
Commit
0ba55e7e
authored
May 15, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adjust coin notation pipe and add it to history component
parent
48998d5c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
coin-notation.pipe.ts
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
+16
-2
history.component.html
Breeze.UI/src/app/wallet/history/history.component.html
+1
-1
No files found.
Breeze.UI/src/app/shared/pipes/coin-notation.pipe.ts
View file @
0ba55e7e
...
@@ -5,10 +5,24 @@ import { Pipe, PipeTransform } from '@angular/core';
...
@@ -5,10 +5,24 @@ import { Pipe, PipeTransform } from '@angular/core';
})
})
export
class
CoinNotationPipe
implements
PipeTransform
{
export
class
CoinNotationPipe
implements
PipeTransform
{
private
coinUnit
=
"BTC"
;
private
coinNotation
:
number
;
transform
(
value
:
any
):
any
{
transform
(
value
:
any
):
any
{
if
(
!
value
)
return
value
;
if
(
!
value
)
return
value
;
let
coinNotation
=
Number
(
value
).
toFixed
(
8
);
this
.
coinNotation
=
value
;
return
coinNotation
;
switch
(
this
.
coinUnit
)
{
case
"BTC"
:
this
.
coinNotation
=
Number
(
value
.
toFixed
(
8
));
return
this
.
coinNotation
=
this
.
coinNotation
/
100000000
;
case
"mBTC"
:
this
.
coinNotation
=
Number
(
value
.
toFixed
(
8
));
return
this
.
coinNotation
=
this
.
coinNotation
/
100000
;
case
"uBTC"
:
this
.
coinNotation
=
Number
(
value
.
toFixed
(
8
));
return
this
.
coinNotation
=
this
.
coinNotation
/
100
;
}
}
}
}
}
Breeze.UI/src/app/wallet/history/history.component.html
View file @
0ba55e7e
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<!--<td *ngIf="{{ transaction.amount }} < 0; else received">SENT</td>
<!--<td *ngIf="{{ transaction.amount }} < 0; else received">SENT</td>
<td #received>RECEIVED</td>-->
<td #received>RECEIVED</td>-->
<td>
{{ transaction.timestamp }}
</td>
<td>
{{ transaction.timestamp }}
</td>
<td>
{{ transaction.amount }}
</td>
<td>
{{ transaction.amount
| coinNotation | coinAbbreviation
}}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.txId }}
</td>
<td>
{{ transaction.txId }}
</td>
</tr>
</tr>
...
...
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