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
50517ad6
Commit
50517ad6
authored
May 09, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show unused address
parent
eec7ee54
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
37 additions
and
21 deletions
+37
-21
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+1
-0
wallet-info.ts
Breeze.UI/src/app/shared/classes/wallet-info.ts
+12
-0
wallet-load.ts
Breeze.UI/src/app/shared/classes/wallet-load.ts
+3
-3
api.service.ts
Breeze.UI/src/app/shared/services/api.service.ts
+8
-3
receive.component.html
Breeze.UI/src/app/wallet/receive/receive.component.html
+4
-10
receive.component.ts
Breeze.UI/src/app/wallet/receive/receive.component.ts
+9
-5
No files found.
Breeze.UI/src/app/login/login.component.ts
View file @
50517ad6
...
...
@@ -85,6 +85,7 @@ export class LoginComponent implements OnInit {
console
.
log
(
response
);
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
let
responseMessage
=
response
.
json
();
this
.
globalService
.
setCurrentWalletName
(
walletLoad
.
name
)
this
.
router
.
navigate
([
'/wallet'
]);
}
},
...
...
Breeze.UI/src/app/shared/classes/wallet-info.ts
0 → 100644
View file @
50517ad6
export
class
WalletInfo
{
constructor
(
walletName
:
string
,
coinType
:
number
,
accountName
:
string
)
{
this
.
walletName
=
walletName
;
this
.
coinType
=
coinType
;
this
.
accountName
=
accountName
;
}
public
walletName
:
string
;
public
coinType
:
number
;
public
accountName
:
string
;
}
Breeze.UI/src/app/shared/classes/wallet-load.ts
View file @
50517ad6
...
...
@@ -6,7 +6,7 @@ export class WalletLoad {
this
.
name
=
name
;
}
p
rivate
password
:
string
;
p
rivate
folderPath
:
string
;
p
rivate
name
:
string
;
p
ublic
password
:
string
;
p
ublic
folderPath
:
string
;
p
ublic
name
:
string
;
}
Breeze.UI/src/app/shared/services/api.service.ts
View file @
50517ad6
import
{
Injectable
}
from
'@angular/core'
;
import
{
Http
,
Headers
,
Response
}
from
'@angular/http'
;
import
{
Http
,
Headers
,
Response
,
RequestOptions
,
URLSearchParams
}
from
'@angular/http'
;
import
{
Observable
}
from
'rxjs/Observable'
;
import
'rxjs/add/operator/map'
;
import
'rxjs/add/operator/catch'
;
...
...
@@ -7,6 +7,7 @@ import 'rxjs/add/operator/catch';
import
{
WalletCreation
}
from
'../classes/wallet-creation'
;
import
{
WalletRecovery
}
from
'../classes/wallet-recovery'
;
import
{
WalletLoad
}
from
'../classes/wallet-load'
;
import
{
WalletInfo
}
from
'../classes/wallet-info'
;
import
{
Mnemonic
}
from
'../classes/mnemonic'
;
/**
...
...
@@ -87,9 +88,13 @@ export class ApiService {
/**
* Get unused receive addresses for a certain wallet from the API.
*/
getUnusedReceiveAddresses
():
Observable
<
any
>
{
getUnusedReceiveAddress
(
data
:
WalletInfo
):
Observable
<
any
>
{
let
params
:
URLSearchParams
=
new
URLSearchParams
();
params
.
set
(
'walletName'
,
data
.
walletName
);
params
.
set
(
'coinType'
,
data
.
coinType
.
toString
());
params
.
set
(
'accountName'
,
data
.
accountName
);
return
this
.
http
.
get
(
this
.
mockApiUrl
+
'/wallet/receive'
)
.
get
(
this
.
webApiUrl
+
'/wallet/address'
,
new
RequestOptions
({
headers
:
this
.
headers
,
search
:
params
})
)
.
map
((
response
:
Response
)
=>
response
);
}
}
Breeze.UI/src/app/wallet/receive/receive.component.html
View file @
50517ad6
...
...
@@ -2,20 +2,14 @@
<h1>
Receive
</h1>
<div>
<div>
<table
*
ngIf=
"address
es"
>
<table
*
ngIf=
"address
"
>
<thead>
<th>
Unused Receive Addresse
s:
</th>
<th>
Receive addres
s:
</th>
</thead>
<tr
*
ngFor=
"let address of addresses"
>
<tr>
<td>
{{ address }}
</td>
</tr>
</table>
</div>
</div>
<div>
<label>
Used Receive Addresses
</label>
</div>
<div>
<label>
Change Addresses
</label>
</div>
</div>
Breeze.UI/src/app/wallet/receive/receive.component.ts
View file @
50517ad6
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ApiService
}
from
'../../shared/services/api.service'
import
{
ApiService
}
from
'../../shared/services/api.service'
;
import
{
WalletInfo
}
from
'../../shared/classes/wallet-info'
;
@
Component
({
selector
:
'receive-component'
,
...
...
@@ -11,19 +13,21 @@ import { ApiService } from '../../shared/services/api.service'
export
class
ReceiveComponent
{
constructor
(
private
apiService
:
ApiService
)
{}
private
address
es
:
any
;
private
address
:
any
;
private
errorMessage
:
string
;
private
walletInfo
:
WalletInfo
;
ngOnInit
()
{
this
.
getUnusedReceiveAddresses
();
}
private
getUnusedReceiveAddresses
()
{
this
.
apiService
.
getUnusedReceiveAddresses
()
this
.
walletInfo
=
new
WalletInfo
(
"Test"
,
0
,
"Test"
)
this
.
apiService
.
getUnusedReceiveAddress
(
this
.
walletInfo
)
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
this
.
address
es
=
response
.
json
().
addresses
;
this
.
address
=
response
.
json
()
;
}
},
error
=>
{
...
...
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