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
789fb4b9
Commit
789fb4b9
authored
Jun 28, 2017
by
dev0tion
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix indents and some clean up
parent
742c231f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
62 additions
and
77 deletions
+62
-77
app.component.ts
Breeze.UI/src/app/app.component.ts
+1
-21
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+6
-3
create.component.ts
Breeze.UI/src/app/setup/create/create.component.ts
+2
-2
global.service.ts
Breeze.UI/src/app/shared/services/global.service.ts
+22
-22
dashboard.component.html
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
+7
-7
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+16
-14
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+2
-1
receive.component.ts
Breeze.UI/src/app/wallet/receive/receive.component.ts
+2
-5
send.component.ts
Breeze.UI/src/app/wallet/send/send.component.ts
+4
-2
No files found.
Breeze.UI/src/app/app.component.ts
View file @
789fb4b9
...
@@ -16,25 +16,5 @@ export class AppComponent implements OnInit {
...
@@ -16,25 +16,5 @@ export class AppComponent implements OnInit {
ngOnInit
()
{
ngOnInit
()
{
this
.
router
.
navigate
([
'/login'
]);
this
.
router
.
navigate
([
'/login'
]);
//this.checkWalletStatus();
}
}
}
// private checkWalletStatus(){
// this.apiService.getWalletStatus()
// .subscribe(
// response => {
// if (response.status >= 200 && response.status < 400) {
// this.responseMessage = response;
// this.router.navigate(['/login']);
// }
// },
// error => {
// this.errorMessage = <any>error;
// if (error.status === 400 || error.status === 404) {
// this.router.navigate(['/setup']);
// console.log(this.errorMessage);
// }
// }
// );
// }
}
\ No newline at end of file
Breeze.UI/src/app/login/login.component.ts
View file @
789fb4b9
...
@@ -11,10 +11,11 @@ import { WalletLoad } from '../shared/classes/wallet-load';
...
@@ -11,10 +11,11 @@ import { WalletLoad } from '../shared/classes/wallet-load';
templateUrl
:
'./login.component.html'
,
templateUrl
:
'./login.component.html'
,
styleUrls
:
[
'./login.component.css'
]
styleUrls
:
[
'./login.component.css'
]
})
})
export
class
LoginComponent
implements
OnInit
{
export
class
LoginComponent
implements
OnInit
{
constructor
(
private
globalService
:
GlobalService
,
private
apiService
:
ApiService
,
private
router
:
Router
,
private
fb
:
FormBuilder
)
{
constructor
(
private
globalService
:
GlobalService
,
private
apiService
:
ApiService
,
private
router
:
Router
,
private
fb
:
FormBuilder
)
{
this
.
buildDecryptForm
();
this
.
buildDecryptForm
();
}
}
private
openWalletForm
:
FormGroup
;
private
openWalletForm
:
FormGroup
;
private
hasWallet
:
boolean
=
false
;
private
hasWallet
:
boolean
=
false
;
...
@@ -109,7 +110,8 @@ export class LoginComponent implements OnInit {
...
@@ -109,7 +110,8 @@ export class LoginComponent implements OnInit {
console
.
log
(
errorMessage
);
console
.
log
(
errorMessage
);
}
}
}
}
);
)
;
}
}
private
loadWallet
(
walletLoad
:
WalletLoad
)
{
private
loadWallet
(
walletLoad
:
WalletLoad
)
{
...
@@ -131,6 +133,7 @@ export class LoginComponent implements OnInit {
...
@@ -131,6 +133,7 @@ export class LoginComponent implements OnInit {
console
.
log
(
errorMessage
);
console
.
log
(
errorMessage
);
}
}
}
}
);
)
;
}
}
}
}
Breeze.UI/src/app/setup/create/create.component.ts
View file @
789fb4b9
...
@@ -21,7 +21,6 @@ export class CreateComponent {
...
@@ -21,7 +21,6 @@ export class CreateComponent {
private
createWalletForm
:
FormGroup
;
private
createWalletForm
:
FormGroup
;
private
newWallet
:
WalletCreation
;
private
newWallet
:
WalletCreation
;
private
mnemonic
:
string
;
private
mnemonic
:
string
;
private
buildCreateForm
():
void
{
private
buildCreateForm
():
void
{
...
@@ -104,6 +103,7 @@ export class CreateComponent {
...
@@ -104,6 +103,7 @@ export class CreateComponent {
console
.
log
(
errorMessage
);
console
.
log
(
errorMessage
);
}
}
}
}
);
)
;
}
}
}
}
Breeze.UI/src/app/shared/services/global.service.ts
View file @
789fb4b9
...
@@ -2,33 +2,33 @@ import {Injectable} from "@angular/core";
...
@@ -2,33 +2,33 @@ import {Injectable} from "@angular/core";
@
Injectable
()
@
Injectable
()
export
class
GlobalService
{
export
class
GlobalService
{
constructor
()
{}
constructor
()
{}
private
walletPath
:
string
;
private
walletPath
:
string
;
private
currentWalletName
:
string
;
private
currentWalletName
:
string
;
private
coinType
:
number
;
private
coinType
:
number
;
getWalletPath
()
{
getWalletPath
()
{
return
this
.
walletPath
;
return
this
.
walletPath
;
}
}
setWalletPath
(
walletPath
:
string
)
{
setWalletPath
(
walletPath
:
string
)
{
this
.
walletPath
=
walletPath
;
this
.
walletPath
=
walletPath
;
}
}
getWalletName
()
{
getWalletName
()
{
return
this
.
currentWalletName
;
return
this
.
currentWalletName
;
}
}
setWalletName
(
currentWalletName
:
string
)
{
setWalletName
(
currentWalletName
:
string
)
{
this
.
currentWalletName
=
currentWalletName
;
this
.
currentWalletName
=
currentWalletName
;
}
}
getCoinType
()
{
getCoinType
()
{
return
this
.
coinType
;
return
this
.
coinType
;
}
}
setCoinType
(
coinType
:
number
)
{
setCoinType
(
coinType
:
number
)
{
this
.
coinType
=
coinType
;
this
.
coinType
=
coinType
;
}
}
}
}
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
View file @
789fb4b9
...
@@ -28,13 +28,13 @@
...
@@ -28,13 +28,13 @@
<th>
Timestamp
</th>
<th>
Timestamp
</th>
</thead>
</thead>
<tr
*
ngFor=
"let transaction of transactions; let i=index"
>
<tr
*
ngFor=
"let transaction of transactions; let i=index"
>
<!--<td *ngIf="{{ transaction.amount }} < 0">SENT</td>
<!--<td *ngIf="{{ transaction.amount }} < 0">SENT</td>
<td *ngIf="{{ transaction.amount }} > 0">RECEIVED</td>-->
<td *ngIf="{{ transaction.amount }} > 0">RECEIVED</td>-->
<td
*
ngIf=
"i<5"
>
{{ transaction.type }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.type }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.amount | coinNotation }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.amount | coinNotation }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.id }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.id }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.confirmedInBlock }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.confirmedInBlock }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.timestamp * 1000 | date:'medium' }}
</td>
<td
*
ngIf=
"i<5"
>
{{ transaction.timestamp * 1000 | date:'medium' }}
</td>
</tr>
</tr>
</table>
</table>
<ng-template
#
noTransactions
>
Looks like you haven't made any transactions yet
</ng-template>
<ng-template
#
noTransactions
>
Looks like you haven't made any transactions yet
</ng-template>
...
...
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
View file @
789fb4b9
...
@@ -49,20 +49,21 @@ export class DashboardComponent {
...
@@ -49,20 +49,21 @@ export class DashboardComponent {
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
walletBalanceSubscription
=
this
.
apiService
.
getWalletBalance
(
walletInfo
)
this
.
walletBalanceSubscription
=
this
.
apiService
.
getWalletBalance
(
walletInfo
)
.
subscribe
(
.
subscribe
(
response
=>
{
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
let
balanceResponse
=
response
.
json
();
let
balanceResponse
=
response
.
json
();
this
.
confirmedBalance
=
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
confirmedBalance
=
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
unconfirmedBalance
=
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
this
.
unconfirmedBalance
=
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
let
errorMessage
=
<
any
>
error
;
console
.
log
(
errorMessage
);
}
}
}
);
},
error
=>
{
if
(
error
.
status
>=
400
)
{
let
errorMessage
=
<
any
>
error
;
console
.
log
(
errorMessage
);
}
}
)
;
};
};
private
getHistory
()
{
private
getHistory
()
{
...
@@ -82,6 +83,7 @@ export class DashboardComponent {
...
@@ -82,6 +83,7 @@ export class DashboardComponent {
console
.
log
(
errorMessage
);
console
.
log
(
errorMessage
);
}
}
}
}
);
)
;
};
};
}
}
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
789fb4b9
...
@@ -46,6 +46,7 @@ export class HistoryComponent {
...
@@ -46,6 +46,7 @@ export class HistoryComponent {
console
.
log
(
this
.
errorMessage
);
console
.
log
(
this
.
errorMessage
);
}
}
}
}
);
)
;
}
}
}
}
Breeze.UI/src/app/wallet/receive/receive.component.ts
View file @
789fb4b9
...
@@ -23,10 +23,6 @@ export class ReceiveComponent {
...
@@ -23,10 +23,6 @@ export class ReceiveComponent {
this
.
getUnusedReceiveAddresses
();
this
.
getUnusedReceiveAddresses
();
}
}
private
copyAddress
()
{
}
private
getUnusedReceiveAddresses
()
{
private
getUnusedReceiveAddresses
()
{
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
apiService
.
getUnusedReceiveAddress
(
walletInfo
)
this
.
apiService
.
getUnusedReceiveAddress
(
walletInfo
)
...
@@ -42,6 +38,7 @@ export class ReceiveComponent {
...
@@ -42,6 +38,7 @@ export class ReceiveComponent {
console
.
log
(
this
.
errorMessage
);
console
.
log
(
this
.
errorMessage
);
}
}
}
}
);
)
;
}
}
}
}
Breeze.UI/src/app/wallet/send/send.component.ts
View file @
789fb4b9
...
@@ -103,7 +103,8 @@ export class SendComponent {
...
@@ -103,7 +103,8 @@ export class SendComponent {
}
}
},
},
()
=>
this
.
sendTransaction
(
this
.
responseMessage
.
hex
)
()
=>
this
.
sendTransaction
(
this
.
responseMessage
.
hex
)
);
)
;
};
};
private
getFeeType
(){
private
getFeeType
(){
...
@@ -136,6 +137,7 @@ export class SendComponent {
...
@@ -136,6 +137,7 @@ export class SendComponent {
console
.
log
(
this
.
errorMessage
);
console
.
log
(
this
.
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