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
fe21fa84
Commit
fe21fa84
authored
Sep 28, 2017
by
nopara73
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing recovery message
parent
f99a4a4f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
recover.component.ts
Breeze.UI/src/app/setup/recover/recover.component.ts
+18
-6
No files found.
Breeze.UI/src/app/setup/recover/recover.component.ts
View file @
fe21fa84
...
@@ -115,6 +115,7 @@ export class RecoverComponent implements OnInit {
...
@@ -115,6 +115,7 @@ export class RecoverComponent implements OnInit {
}
}
private
recoverWallets
(
recoverWallet
:
WalletRecovery
)
{
private
recoverWallets
(
recoverWallet
:
WalletRecovery
)
{
let
bitcoinErrorMessage
=
""
;
this
.
apiService
this
.
apiService
.
recoverBitcoinWallet
(
recoverWallet
)
.
recoverBitcoinWallet
(
recoverWallet
)
.
subscribe
(
.
subscribe
(
...
@@ -122,6 +123,7 @@ export class RecoverComponent implements OnInit {
...
@@ -122,6 +123,7 @@ export class RecoverComponent implements OnInit {
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
//Bitcoin Wallet Recovered
//Bitcoin Wallet Recovered
}
}
this
.
recoverStratisWallet
(
recoverWallet
,
bitcoinErrorMessage
);
},
},
error
=>
{
error
=>
{
this
.
isRecovering
=
false
;
this
.
isRecovering
=
false
;
...
@@ -133,16 +135,17 @@ export class RecoverComponent implements OnInit {
...
@@ -133,16 +135,17 @@ export class RecoverComponent implements OnInit {
console
.
log
(
error
);
console
.
log
(
error
);
}
}
else
{
else
{
alert
(
error
.
json
().
errors
[
0
].
message
)
;
bitcoinErrorMessage
=
error
.
json
().
errors
[
0
].
message
;
}
}
}
}
},
this
.
recoverStratisWallet
(
recoverWallet
,
bitcoinErrorMessage
);
()
=>
this
.
recoverStratisWallet
(
recoverWallet
)
}
)
)
;
;
}
}
private
recoverStratisWallet
(
recoverWallet
:
WalletRecovery
){
private
recoverStratisWallet
(
recoverWallet
:
WalletRecovery
,
bitcoinErrorMessage
:
string
){
let
stratisErrorMessage
=
""
;
this
.
apiService
this
.
apiService
.
recoverStratisWallet
(
recoverWallet
)
.
recoverStratisWallet
(
recoverWallet
)
.
subscribe
(
.
subscribe
(
...
@@ -151,6 +154,7 @@ export class RecoverComponent implements OnInit {
...
@@ -151,6 +154,7 @@ export class RecoverComponent implements OnInit {
alert
(
"Your wallet has been recovered.
\n
You will be redirected to the decryption page."
);
alert
(
"Your wallet has been recovered.
\n
You will be redirected to the decryption page."
);
this
.
router
.
navigate
([
''
])
this
.
router
.
navigate
([
''
])
}
}
this
.
AlertIfNeeded
(
bitcoinErrorMessage
,
stratisErrorMessage
);
},
},
error
=>
{
error
=>
{
this
.
isRecovering
=
false
;
this
.
isRecovering
=
false
;
...
@@ -162,11 +166,19 @@ export class RecoverComponent implements OnInit {
...
@@ -162,11 +166,19 @@ export class RecoverComponent implements OnInit {
console
.
log
(
error
);
console
.
log
(
error
);
}
}
else
{
else
{
alert
(
error
.
json
().
errors
[
0
].
message
)
;
stratisErrorMessage
=
error
.
json
().
errors
[
0
].
message
;
}
}
}
}
}
this
.
AlertIfNeeded
(
bitcoinErrorMessage
,
stratisErrorMessage
);
}
)
)
;
;
}
}
private
AlertIfNeeded
(
bitcoinErrorMessage
:
string
,
stratisErrorMessage
:
string
)
{
if
(
bitcoinErrorMessage
!==
""
||
stratisErrorMessage
!==
""
)
{
let
errorMessage
=
"Bitcoin wallet recovery:
\n
"
+
bitcoinErrorMessage
+
"
\n\n
Stratis wallet recovery:
\n
"
+
stratisErrorMessage
;
alert
(
errorMessage
);
}
}
}
}
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