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
40dad775
Commit
40dad775
authored
May 15, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add fee slider and password box
parent
cee187c6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
5 deletions
+41
-5
send.component.css
Breeze.UI/src/app/wallet/send/send.component.css
+4
-0
send.component.html
Breeze.UI/src/app/wallet/send/send.component.html
+10
-1
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+27
-4
No files found.
Breeze.UI/src/app/wallet/send/send.component.css
View file @
40dad775
#sendForm
{
padding
:
10px
;
}
#feeSlider
{
width
:
200px
;
}
Breeze.UI/src/app/wallet/send/send.component.html
View file @
40dad775
...
...
@@ -2,7 +2,7 @@
<h1>
Send
</h1>
<form
[
formGroup
]="
sendForm
"
(
ngSubmit
)="
send
()"
>
<div
class=
"form-group"
>
<label>
Pay To
:
</label>
<label>
Pay To
</label>
<input
class=
"form-control"
formControlName=
"address"
type=
"text"
placeholder=
"Please enter the recipients address."
>
<div
*
ngIf=
"formErrors.address"
class=
"alert alert-danger"
>
{{formErrors.address}}
</div>
</div>
...
...
@@ -11,6 +11,15 @@
<input
class=
"form-control"
formControlName=
"amount"
type=
"text"
placeholder=
"Please enter the amount you want to send."
>
<div
*
ngIf=
"formErrors.amount"
class=
"alert alert-danger"
>
{{formErrors.amount}}
</div>
</div>
<div
class=
"form-group"
>
<label>
Fee
</label>
<input
class=
"form-control"
id=
"feeSlider"
formControlName=
"fee"
type=
"range"
min=
"1"
max=
"3"
value=
"2"
>
</div>
<div
class=
"form-group"
>
<label>
Wallet Password
</label>
<input
class=
"form-control"
formControlName=
"password"
type=
"password"
placeholder=
"Please enter your wallet password."
>
<div
*
ngIf=
"formErrors.password"
class=
"alert alert-danger"
>
{{formErrors.password}}
</div>
</div>
<button
type=
"submit"
[
disabled
]="!
sendForm
.
valid
"
class=
"btn btn-success"
>
Send
</button>
<button
type=
"button"
class=
"btn"
(
click
)="
activeModal
.
close
('
Close
click
')"
>
Close
</button>
</form>
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
40dad775
...
...
@@ -26,7 +26,9 @@ export class SendComponent {
private
buildSendForm
():
void
{
this
.
sendForm
=
this
.
fb
.
group
({
"address"
:
[
""
,
Validators
.
required
],
"amount"
:
[
""
,
Validators
.
required
]
"amount"
:
[
""
,
Validators
.
required
],
"fee"
:
[
2
,
Validators
.
required
],
"password"
:
[
""
,
Validators
.
required
]
});
this
.
sendForm
.
valueChanges
...
...
@@ -52,7 +54,9 @@ export class SendComponent {
formErrors
=
{
'address'
:
''
,
'amount'
:
''
'amount'
:
''
,
'fee'
:
''
,
'password'
:
''
};
validationMessages
=
{
...
...
@@ -61,6 +65,12 @@ export class SendComponent {
},
'amount'
:
{
'required'
:
'An amount is required.'
},
'fee'
:
{
'required'
:
'A fee is required.'
},
'password'
:
{
'required'
:
'Your password is required.'
}
};
...
...
@@ -70,10 +80,10 @@ export class SendComponent {
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
(),
"account 0"
,
"123"
,
this
.
sendForm
.
get
(
"password"
).
value
,
this
.
sendForm
.
get
(
"address"
).
value
,
this
.
sendForm
.
get
(
"amount"
).
value
,
"medium"
,
this
.
getFeeType
()
,
true
);
...
...
@@ -96,6 +106,19 @@ export class SendComponent {
);
};
private
getFeeType
(){
let
feeValue
=
this
.
sendForm
.
get
(
"fee"
).
value
;
switch
(
feeValue
){
case
1
:
return
"low"
;
case
2
:
return
"medium"
;
case
3
:
return
"high"
;
}
}
private
sendTransaction
(
hex
:
string
)
{
let
transaction
=
new
TransactionSending
(
hex
);
this
.
apiService
...
...
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