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
02f08981
Unverified
Commit
02f08981
authored
Nov 22, 2017
by
Pieterjan Vanhoof
Committed by
GitHub
Nov 22, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #367 from stratisproject/ui
Add transaction fee to send confirmation
parents
a41d68db
0d3dcda1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
2 deletions
+11
-2
send-confirmation.component.html
...t/send/send-confirmation/send-confirmation.component.html
+4
-0
send-confirmation.component.ts
...let/send/send-confirmation/send-confirmation.component.ts
+5
-0
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+2
-2
No files found.
Breeze.UI/src/app/wallet/send/send-confirmation/send-confirmation.component.html
View file @
02f08981
...
...
@@ -20,6 +20,10 @@
<li
class=
"list-inline-item col blockLabel"
>
Amount
</li>
<li
class=
"list-inline-item col-9 blockText text-danger"
>
-{{ transaction.amount | number:'1.8-8' }} {{ coinUnit }}
</li>
</ul>
<ul
class=
"list-inline row"
>
<li
class=
"list-inline-item col blockLabel"
>
Fee
</li>
<li
class=
"list-inline-item col-9 blockText text-danger"
>
-{{ transactionFee }} {{ coinUnit }}
</li>
</ul>
<ul
class=
"list-inline row"
>
<li
class=
"list-inline-item col blockLabel"
>
Destination
</li>
<li
class=
"list-inline-item col blockText mt-2"
><code>
{{ transaction.destinationAddress }}
</code></li>
...
...
Breeze.UI/src/app/wallet/send/send-confirmation/send-confirmation.component.ts
View file @
02f08981
...
...
@@ -4,6 +4,8 @@ import { NgbModal, NgbActiveModal } from '@ng-bootstrap/ng-bootstrap';
import
{
GlobalService
}
from
'../../../shared/services/global.service'
;
import
{
CoinNotationPipe
}
from
'../../../shared/pipes/coin-notation.pipe'
;
@
Component
({
selector
:
'app-send-confirmation'
,
templateUrl
:
'./send-confirmation.component.html'
,
...
...
@@ -12,6 +14,7 @@ import { GlobalService } from '../../../shared/services/global.service';
export
class
SendConfirmationComponent
implements
OnInit
{
@
Input
()
transaction
:
any
;
@
Input
()
transactionFee
:
any
;
constructor
(
private
globalService
:
GlobalService
,
public
activeModal
:
NgbActiveModal
)
{
}
public
showDetails
:
boolean
=
false
;
...
...
@@ -19,6 +22,8 @@ export class SendConfirmationComponent implements OnInit {
ngOnInit
()
{
this
.
coinUnit
=
this
.
globalService
.
getCoinUnit
();
this
.
transactionFee
=
new
CoinNotationPipe
(
this
.
globalService
).
transform
(
this
.
transactionFee
);
this
.
transaction
.
amount
=
+
this
.
transaction
.
amount
+
+
this
.
transactionFee
;
}
toggleDetails
()
{
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
02f08981
...
...
@@ -4,6 +4,7 @@ import { FormGroup, FormControl, Validators, FormBuilder } from '@angular/forms'
import
{
ApiService
}
from
'../../shared/services/api.service'
;
import
{
GlobalService
}
from
'../../shared/services/global.service'
;
import
{
ModalService
}
from
'../../shared/services/modal.service'
;
import
{
CoinNotationPipe
}
from
'../../shared/pipes/coin-notation.pipe'
;
import
{
NgbModal
,
NgbActiveModal
}
from
'@ng-bootstrap/ng-bootstrap'
;
...
...
@@ -112,7 +113,6 @@ export class SendComponent implements OnInit {
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
){
balanceResponse
=
response
.
json
();
console
.
log
(
balanceResponse
);
}
},
error
=>
{
...
...
@@ -131,7 +131,7 @@ export class SendComponent implements OnInit {
}
},
()
=>
{
this
.
sendForm
.
patchValue
({
amount
:
balanceResponse
.
maxSpendableAmount
});
this
.
sendForm
.
patchValue
({
amount
:
+
new
CoinNotationPipe
(
this
.
globalService
).
transform
(
balanceResponse
.
maxSpendableAmount
)
});
this
.
estimatedFee
=
balanceResponse
.
fee
;
}
)
...
...
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