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
c215c2cc
Commit
c215c2cc
authored
Nov 09, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
View send modal feedback in modal
parent
1ddc0f62
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
7 deletions
+18
-7
send.component.html
Breeze.UI/src/app/wallet/send/send.component.html
+1
-0
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+17
-7
No files found.
Breeze.UI/src/app/wallet/send/send.component.html
View file @
c215c2cc
...
...
@@ -47,6 +47,7 @@
<input
type=
"password"
class=
"form-control form-control-success"
formControlName=
"password"
id=
"walletPassword"
placeholder=
"Please enter your wallet password."
>
<div
*
ngIf=
"formErrors.password"
class=
"form-control-feedback"
>
{{formErrors.password}}
</div>
</div>
<div
*
ngIf=
"apiError"
class=
"text-danger mt-2"
>
{{ apiError }}
</div>
</form>
<!-- /form-->
</div>
...
...
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
c215c2cc
...
...
@@ -28,6 +28,7 @@ export class SendComponent implements OnInit {
public
coinUnit
:
string
;
public
isSending
:
boolean
=
false
;
public
estimatedFee
:
number
;
public
apiError
:
string
;
private
transactionHex
:
string
;
private
responseMessage
:
any
;
private
errorMessage
:
string
;
...
...
@@ -66,6 +67,8 @@ export class SendComponent implements OnInit {
}
}
this
.
apiError
=
""
;
if
(
this
.
sendForm
.
get
(
"address"
).
valid
&&
this
.
sendForm
.
get
(
"amount"
).
valid
)
{
this
.
estimateFee
();
}
...
...
@@ -115,13 +118,15 @@ export class SendComponent implements OnInit {
error
=>
{
console
.
log
(
error
);
if
(
error
.
status
===
0
)
{
this
.
genericModalService
.
openModal
(
null
,
null
);
//this.genericModalService.openModal(null, null);
this
.
apiError
=
"Something went wrong while connecting to the API. Please restart the application."
}
else
if
(
error
.
status
>=
400
)
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
this
.
genericModalService
.
openModal
(
null
,
error
.
json
().
errors
[
0
].
message
);
//this.genericModalService.openModal(null, error.json().errors[0].message);
this
.
apiError
=
error
.
json
().
errors
[
0
].
message
;
}
}
},
...
...
@@ -158,7 +163,8 @@ export class SendComponent implements OnInit {
console
.
log
(
error
);
}
else
{
this
.
genericModalService
.
openModal
(
null
,
error
.
json
().
errors
[
0
].
message
);
//this.genericModalService.openModal(null, error.json().errors[0].message);
this
.
apiError
=
error
.
json
().
errors
[
0
].
message
;
}
}
},
...
...
@@ -195,13 +201,15 @@ export class SendComponent implements OnInit {
console
.
log
(
error
);
this
.
isSending
=
false
;
if
(
error
.
status
===
0
)
{
this
.
genericModalService
.
openModal
(
null
,
null
);
//this.genericModalService.openModal(null, null);
this
.
apiError
=
"Something went wrong while connecting to the API. Please restart the application."
}
else
if
(
error
.
status
>=
400
)
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
this
.
genericModalService
.
openModal
(
null
,
error
.
json
().
errors
[
0
].
message
);
//this.genericModalService.openModal(null, error.json().errors[0].message);
this
.
apiError
=
error
.
json
().
errors
[
0
].
message
;
}
}
},
...
...
@@ -235,13 +243,15 @@ export class SendComponent implements OnInit {
console
.
log
(
error
);
this
.
isSending
=
false
;
if
(
error
.
status
===
0
)
{
this
.
genericModalService
.
openModal
(
null
,
null
);
//this.genericModalService.openModal(null, null);
this
.
apiError
=
"Something went wrong while connecting to the API. Please restart the application."
}
else
if
(
error
.
status
>=
400
)
{
if
(
!
error
.
json
().
errors
[
0
])
{
console
.
log
(
error
);
}
else
{
this
.
genericModalService
.
openModal
(
null
,
error
.
json
().
errors
[
0
].
message
);
//this.genericModalService.openModal(null, error.json().errors[0].message);
this
.
apiError
=
error
.
json
().
errors
[
0
].
message
;
}
}
},
...
...
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