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
ee8ee60b
Commit
ee8ee60b
authored
8 years ago
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add wallet recovery method
parent
4d60bfc8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
4 deletions
+19
-4
api.service.ts
Breeze.UI/src/app/shared/api/api.service.ts
+13
-4
wallet-recovery.ts
Breeze.UI/src/app/shared/wallet-recovery.ts
+6
-0
No files found.
Breeze.UI/src/app/shared/api/api.service.ts
View file @
ee8ee60b
...
@@ -4,7 +4,8 @@ import { Observable } from 'rxjs/Observable';
...
@@ -4,7 +4,8 @@ import { Observable } from 'rxjs/Observable';
import
'rxjs/add/operator/map'
;
import
'rxjs/add/operator/map'
;
import
'rxjs/add/operator/catch'
;
import
'rxjs/add/operator/catch'
;
import
{
SafeCreation
}
from
'../safe-creation'
;
import
{
WalletCreation
}
from
'../wallet-creation'
;
import
{
WalletRecovery
}
from
'../wallet-recovery'
;
import
{
Mnemonic
}
from
'../mnemonic'
;
import
{
Mnemonic
}
from
'../mnemonic'
;
/**
/**
...
@@ -21,10 +22,18 @@ export class ApiService {
...
@@ -21,10 +22,18 @@ export class ApiService {
/**
/**
* Create a new wallet.
* Create a new wallet.
*/
*/
createWallet
(
data
:
SafeCreation
):
Observable
<
any
>
{
createWallet
(
data
:
WalletCreation
):
Observable
<
any
>
{
console
.
log
(
JSON
.
stringify
(
data
));
return
this
.
http
return
this
.
http
.
post
(
this
.
webApiUrl
+
'api/safe'
,
JSON
.
stringify
(
data
),
{
headers
:
this
.
headers
})
.
post
(
this
.
webApiUrl
+
'/wallet/create/'
,
JSON
.
stringify
(
data
),
{
headers
:
this
.
headers
})
.
map
(
response
=>
response
.
json
());
}
/**
* Recover a wallet.
*/
recoverWallet
(
data
:
WalletRecovery
):
Observable
<
any
>
{
return
this
.
http
.
post
(
this
.
webApiUrl
+
'/wallet/recover/'
,
JSON
.
stringify
(
data
),
{
headers
:
this
.
headers
})
.
map
(
response
=>
response
.
json
());
.
map
(
response
=>
response
.
json
());
}
}
...
...
This diff is collapsed.
Click to expand it.
Breeze.UI/src/app/shared/wallet-recovery.ts
0 → 100644
View file @
ee8ee60b
export
class
WalletRecovery
{
mnemonic
:
string
;
password
:
string
;
date
:
string
;
network
:
string
;
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
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