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
20d4beef
Commit
20d4beef
authored
May 12, 2017
by
Jeremy Bokobza
Browse files
Options
Browse Files
Download
Plain Diff
merge from master
parents
317813fd
25588866
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
179 additions
and
145 deletions
+179
-145
package.json
Breeze.UI/package.json
+25
-25
login.component.ts
Breeze.UI/src/app/login/login.component.ts
+1
-1
dashboard.component.css
Breeze.UI/src/app/wallet/dashboard/dashboard.component.css
+0
-0
dashboard.component.html
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
+36
-0
dashboard.component.spec.ts
...e.UI/src/app/wallet/dashboard/dashboard.component.spec.ts
+0
-0
dashboard.component.ts
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
+65
-0
history.component.html
Breeze.UI/src/app/wallet/history/history.component.html
+16
-13
history.component.ts
Breeze.UI/src/app/wallet/history/history.component.ts
+5
-3
dashboard.component.html
Breeze.UI/src/app/wallet/menu/dashboard.component.html
+0
-2
dashboard.component.ts
Breeze.UI/src/app/wallet/menu/dashboard.component.ts
+0
-42
menu.component.css
Breeze.UI/src/app/wallet/menu/menu.component.css
+6
-0
menu.component.html
Breeze.UI/src/app/wallet/menu/menu.component.html
+11
-11
wallet-routing.module.ts
Breeze.UI/src/app/wallet/wallet-routing.module.ts
+3
-1
wallet.component.css
Breeze.UI/src/app/wallet/wallet.component.css
+0
-12
wallet.component.html
Breeze.UI/src/app/wallet/wallet.component.html
+2
-2
wallet.module.ts
Breeze.UI/src/app/wallet/wallet.module.ts
+1
-1
Breeze.Api.csproj
Breeze/src/Breeze.Api/Breeze.Api.csproj
+1
-1
Breeze.Daemon.csproj
Breeze/src/Breeze.Daemon/Breeze.Daemon.csproj
+1
-1
Breeze.Wallet.csproj
Breeze/src/Breeze.Wallet/Breeze.Wallet.csproj
+2
-2
ChainExtensions.cs
Breeze/src/Breeze.Wallet/ChainExtensions.cs
+0
-24
Tracker.cs
Breeze/src/Breeze.Wallet/Tracker.cs
+2
-2
WalletManager.cs
Breeze/src/Breeze.Wallet/WalletManager.cs
+2
-2
No files found.
Breeze.UI/package.json
View file @
20d4beef
...
...
@@ -22,35 +22,35 @@
},
"private"
:
true
,
"dependencies"
:
{
"@angular/animations"
:
"^4.1.
0
"
,
"@angular/common"
:
"^4.1.
0
"
,
"@angular/compiler"
:
"^4.1.
0
"
,
"@angular/compiler-cli"
:
"^4.1.
0
"
,
"@angular/core"
:
"^4.1.
0
"
,
"@angular/forms"
:
"^4.1.
0
"
,
"@angular/http"
:
"^4.1.
0
"
,
"@angular/platform-browser"
:
"^4.1.
0
"
,
"@angular/platform-browser-dynamic"
:
"^4.1.
0
"
,
"@angular/platform-server"
:
"^4.1.
0
"
,
"@angular/router"
:
"^4.1.
0
"
,
"@angular/animations"
:
"^4.1.
2
"
,
"@angular/common"
:
"^4.1.
2
"
,
"@angular/compiler"
:
"^4.1.
2
"
,
"@angular/compiler-cli"
:
"^4.1.
2
"
,
"@angular/core"
:
"^4.1.
2
"
,
"@angular/forms"
:
"^4.1.
2
"
,
"@angular/http"
:
"^4.1.
2
"
,
"@angular/platform-browser"
:
"^4.1.
2
"
,
"@angular/platform-browser-dynamic"
:
"^4.1.
2
"
,
"@angular/platform-server"
:
"^4.1.
2
"
,
"@angular/router"
:
"^4.1.
2
"
,
"bootstrap"
:
"^4.0.0-alpha.6"
,
"core-js"
:
"^2.4.1"
,
"rxjs"
:
"^5.
3
.0"
,
"zone.js"
:
"^0.8.
9
"
"rxjs"
:
"^5.
4
.0"
,
"zone.js"
:
"^0.8.
10
"
},
"devDependencies"
:
{
"@angular/cli"
:
"^1.0.
1
"
,
"@angular/compiler-cli"
:
"^4.1.
0
"
,
"@angular/cli"
:
"^1.0.
3
"
,
"@angular/compiler-cli"
:
"^4.1.
2
"
,
"@types/electron"
:
"^1.4.37"
,
"@types/jasmine"
:
"2.5.47"
,
"@types/node"
:
"~7.0.1
5
"
,
"autoprefixer"
:
"^
6.7.7
"
,
"@types/node"
:
"~7.0.1
8
"
,
"autoprefixer"
:
"^
7.0.1
"
,
"codelyzer"
:
"3.0.1"
,
"concurrently"
:
"^3.4.0"
,
"copy-webpack-plugin"
:
"4.0.1"
,
"css-loader"
:
"^0.28.1"
,
"cssnano"
:
"^3.10.0"
,
"electron"
:
"^1.6.
6
"
,
"electron"
:
"^1.6.
7
"
,
"electron-packager"
:
"^8.7.0"
,
"exports-loader"
:
"^0.6.4"
,
"extract-text-webpack-plugin"
:
"^2.1.0"
,
...
...
@@ -60,11 +60,11 @@
"jasmine-core"
:
"~2.6.1"
,
"jasmine-spec-reporter"
:
"~4.1.0"
,
"json-loader"
:
"^0.5.4"
,
"karma"
:
"~1.
6
.0"
,
"karma-chrome-launcher"
:
"~2.
0.0
"
,
"karma"
:
"~1.
7
.0"
,
"karma-chrome-launcher"
:
"~2.
1.1
"
,
"karma-cli"
:
"~1.0.1"
,
"karma-coverage-istanbul-reporter"
:
"^1.2.1"
,
"karma-electron"
:
"^5.
1
.1"
,
"karma-electron"
:
"^5.
2
.1"
,
"karma-jasmine"
:
"~1.1.0"
,
"karma-jasmine-html-reporter"
:
"^0.2.2"
,
"karma-sourcemap-loader"
:
"^0.3.7"
,
...
...
@@ -73,16 +73,16 @@
"postcss-url"
:
"^6.0.4"
,
"protractor"
:
"~5.1.1"
,
"raw-loader"
:
"^0.5.1"
,
"sass-loader"
:
"^6.0.
3
"
,
"sass-loader"
:
"^6.0.
5
"
,
"script-loader"
:
"^0.7.0"
,
"source-map-loader"
:
"^0.2.1"
,
"style-loader"
:
"^0.17.0"
,
"stylus-loader"
:
"^3.0.1"
,
"ts-node"
:
"~3.0.
2
"
,
"tslint"
:
"~5.
1
.0"
,
"ts-node"
:
"~3.0.
4
"
,
"tslint"
:
"~5.
2
.0"
,
"typescript"
:
"^2.3.2"
,
"url-loader"
:
"^0.5.8"
,
"webpack"
:
"^2.
4
.1"
,
"webpack"
:
"^2.
5
.1"
,
"webpack-dev-server"
:
"~2.4.5"
}
}
Breeze.UI/src/app/login/login.component.ts
View file @
20d4beef
...
...
@@ -85,7 +85,7 @@ export class LoginComponent implements OnInit {
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
let
responseMessage
=
response
.
json
();
this
.
globalService
.
setWalletName
(
walletLoad
.
name
)
this
.
globalService
.
setCoinType
(
0
);
this
.
globalService
.
setCoinType
(
1
);
this
.
router
.
navigate
([
'/wallet'
]);
}
},
...
...
Breeze.UI/src/app/wallet/
menu
/dashboard.component.css
→
Breeze.UI/src/app/wallet/
dashboard
/dashboard.component.css
View file @
20d4beef
File moved
Breeze.UI/src/app/wallet/dashboard/dashboard.component.html
0 → 100644
View file @
20d4beef
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col"
>
<div>
Active Balance
</div>
<div>
Balance: {{confirmedBalance | coinNotation | coinAbbreviation}}
</div>
</div>
<div
class=
"col"
>
<div>
Current Value
</div>
<div>
Over 9000
</div>
</div>
</div>
<div
class=
"row"
>
<div
class=
"col"
>
<div>
Transactions
</div>
<table
*
ngIf=
"transactions; else noTransactions"
>
<thead>
<th>
Timestamp
</th>
<th>
Amount
</th>
<th>
Confirmed
</th>
<th>
Transaction ID
</th>
</thead>
<tr
*
ngFor=
"let transaction of transactions; let i=index"
>
<div
*
ngIf=
"i<5"
>
<!--<td *ngIf="{{ transaction.amount }} < 0; else received">SENT</td>
<td #received>RECEIVED</td>-->
<td>
{{ transaction.timestamp }}
</td>
<td>
{{ transaction.amount }}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.txId }}
</td>
</div>
</tr>
</table>
<ng-template
#
noTransactions
>
Looks like you haven't had any transactions yet
</ng-template>
</div>
</div>
</div>
Breeze.UI/src/app/wallet/
menu
/dashboard.component.spec.ts
→
Breeze.UI/src/app/wallet/
dashboard
/dashboard.component.spec.ts
View file @
20d4beef
File moved
Breeze.UI/src/app/wallet/dashboard/dashboard.component.ts
0 → 100644
View file @
20d4beef
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ApiService
}
from
'../../shared/services/api.service'
;
import
{
GlobalService
}
from
'../../shared/services/global.service'
;
import
{
WalletInfo
}
from
'../../shared/classes/wallet-info'
;
@
Component
({
selector
:
'dashboard-component'
,
templateUrl
:
'./dashboard.component.html'
,
styleUrls
:
[
'./dashboard.component.css'
],
})
export
class
DashboardComponent
{
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
)
{}
private
balanceResponse
:
any
;
private
confirmedBalance
:
number
;
private
unconfirmedBalance
:
number
;
private
transactions
:
any
;
private
errorMessage
:
string
;
ngOnInit
()
{
this
.
getWalletBalance
();
this
.
getHistory
();
};
private
getWalletBalance
()
{
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
apiService
.
getWalletBalance
(
walletInfo
)
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
this
.
balanceResponse
=
response
.
json
();
this
.
confirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
unconfirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
}
}
);
};
private
getHistory
()
{
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
apiService
.
getWalletHistory
(
walletInfo
)
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
if
(
response
.
json
().
transactions
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
;
}
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
}
}
);
};
}
Breeze.UI/src/app/wallet/history/history.component.html
View file @
20d4beef
<h1>
History
</h1>
<table
*
ngIf=
"transactions"
>
<thead>
<th>
Timestamp
</th>
<th>
Amount
</th>
<th>
Confirmed
</th>
<th>
Transaction ID
</th>
</thead>
<tr
*
ngFor=
"let transaction of transactions"
>
<td>
{{ transaction.timestamp }}
</td>
<td>
{{ transaction.amount }}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.txId }}
</td>
</tr>
<table
*
ngIf=
"transactions; else noTransactions"
>
<thead>
<th>
Timestamp
</th>
<th>
Amount
</th>
<th>
Confirmed
</th>
<th>
Transaction ID
</th>
</thead>
<tr
*
ngFor=
"let transaction of transactions"
>
<!--<td *ngIf="{{ transaction.amount }} < 0; else received">SENT</td>
<td #received>RECEIVED</td>-->
<td>
{{ transaction.timestamp }}
</td>
<td>
{{ transaction.amount }}
</td>
<td>
{{ transaction.confirmed }}
</td>
<td>
{{ transaction.txId }}
</td>
</tr>
</table>
<ng-template
#
noTransactions
>
Looks like you haven't made any transactions yet.
</ng-template>
Breeze.UI/src/app/wallet/history/history.component.ts
View file @
20d4beef
...
...
@@ -18,16 +18,18 @@ export class HistoryComponent {
private
errorMessage
:
string
;
ngOnInit
()
{
this
.
get
Wallet
History
();
this
.
getHistory
();
}
private
get
Wallet
History
()
{
private
getHistory
()
{
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
apiService
.
getWalletHistory
(
walletInfo
)
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
this
.
transactions
=
response
.
json
().
transactions
;
if
(
response
.
json
().
transactions
.
length
>
0
)
{
this
.
transactions
=
response
.
json
().
transactions
;
}
}
},
error
=>
{
...
...
Breeze.UI/src/app/wallet/menu/dashboard.component.html
deleted
100644 → 0
View file @
317813fd
<p>
Balance: {{confirmedBalance | coinNotation | coinAbbreviation}}
</p>
<p>
Unconfirmed: {{unconfirmedBalance | coinNotation | coinAbbreviation}}
<p>
Breeze.UI/src/app/wallet/menu/dashboard.component.ts
deleted
100644 → 0
View file @
317813fd
import
{
Component
,
OnInit
}
from
'@angular/core'
;
import
{
ApiService
}
from
'../../shared/services/api.service'
;
import
{
GlobalService
}
from
'../../shared/services/global.service'
;
import
{
WalletInfo
}
from
'../../shared/classes/wallet-info'
;
@
Component
({
selector
:
'dashboard-component'
,
templateUrl
:
'./dashboard.component.html'
,
styleUrls
:
[
'./dashboard.component.css'
],
})
export
class
DashboardComponent
{
constructor
(
private
apiService
:
ApiService
,
private
globalService
:
GlobalService
)
{}
private
balanceResponse
:
any
;
private
confirmedBalance
:
number
;
private
unconfirmedBalance
:
number
;
private
errorMessage
:
string
;
ngOnInit
()
{
this
.
getWalletBalance
();
}
private
getWalletBalance
()
{
let
walletInfo
=
new
WalletInfo
(
this
.
globalService
.
getWalletName
(),
this
.
globalService
.
getCoinType
())
this
.
apiService
.
getWalletBalance
(
walletInfo
)
.
subscribe
(
response
=>
{
if
(
response
.
status
>=
200
&&
response
.
status
<
400
)
{
this
.
balanceResponse
=
response
.
json
();
this
.
confirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountConfirmed
;
this
.
unconfirmedBalance
=
this
.
balanceResponse
.
balances
[
0
].
amountUnconfirmed
;
}
},
error
=>
{
if
(
error
.
status
>=
400
)
{
this
.
errorMessage
=
<
any
>
error
;
console
.
log
(
this
.
errorMessage
);
}
}
);
}
}
Breeze.UI/src/app/wallet/menu/menu.component.css
View file @
20d4beef
.navbar
{
height
:
100px
;
width
:
100%
;
margin
:
0
;
padding
:
0
;
}
Breeze.UI/src/app/wallet/menu/menu.component.html
View file @
20d4beef
<nav
class=
"navbar navbar-
fixed-top
"
>
<div
class=
"container"
>
<a
class=
"navbar-brand"
>
Breeze
</a
>
<dashboard-component></dashboard-component
>
<ul
class=
"nav navbar-nav"
routerLinkActive=
"active"
>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"send"
>
Send
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"receive"
>
Receive
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"history"
>
History
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
(
click
)="
logOut
()"
>
Logout
</a></li
>
</ul
>
</div>
<nav
class=
"navbar navbar-
toggleable-sm navbar-fixed-top navbar-light bg-faded
"
>
<div
class=
"container"
>
<ul
class=
"navbar-nav mr-auto"
routerLinkActive=
"active"
>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"dashboard"
>
Dashboard
</a></li
>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"send"
>
Send
</a></li
>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"receive"
>
Receive
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
routerLink=
"history"
>
History
</a></li>
<li
class=
"nav-item"
><a
class=
"nav-link"
(
click
)="
logOut
()"
>
Logout
</a></li>
</ul
>
<div
class=
"navbar-brand"
>
Breeze
</div
>
</div>
</nav>
Breeze.UI/src/app/wallet/wallet-routing.module.ts
View file @
20d4beef
...
...
@@ -5,12 +5,14 @@ import { WalletComponent } from './wallet.component';
import
{
SendComponent
}
from
'./send/send.component'
;
import
{
ReceiveComponent
}
from
'./receive/receive.component'
;
import
{
HistoryComponent
}
from
'./history/history.component'
;
import
{
DashboardComponent
}
from
'./dashboard/dashboard.component'
;
const
routes
:
Routes
=
[
{
path
:
''
,
redirectTo
:
'wallet'
,
pathMatch
:
'full'
},
{
path
:
'wallet'
,
component
:
WalletComponent
,
children
:
[
{
path
:
''
,
redirectTo
:
'history'
,
pathMatch
:
'full'
},
{
path
:
''
,
redirectTo
:
'dashboard'
,
pathMatch
:
'full'
},
{
path
:
'dashboard'
,
component
:
DashboardComponent
},
{
path
:
'send'
,
component
:
SendComponent
},
{
path
:
'receive'
,
component
:
ReceiveComponent
},
{
path
:
'history'
,
component
:
HistoryComponent
}
...
...
Breeze.UI/src/app/wallet/wallet.component.css
View file @
20d4beef
#sidepanel
{
margin
:
0
;
padding
:
0
;
height
:
100%
;
width
:
200px
;
position
:
fixed
;
overflow
:
auto
;
}
#content
{
margin-left
:
200px
;
}
\ No newline at end of file
Breeze.UI/src/app/wallet/wallet.component.html
View file @
20d4beef
<div
id=
"container"
>
<div
id=
"
sidepanel
"
>
<div
id=
"
navigation
"
>
<app-menu></app-menu>
</div>
<div
id=
"content"
>
<router-outlet></router-outlet>
</div>
</div>
\ No newline at end of file
</div>
Breeze.UI/src/app/wallet/wallet.module.ts
View file @
20d4beef
...
...
@@ -4,7 +4,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import
{
WalletComponent
}
from
'./wallet.component'
;
import
{
MenuComponent
}
from
'./menu/menu.component'
;
import
{
DashboardComponent
}
from
'./
menu
/dashboard.component'
;
import
{
DashboardComponent
}
from
'./
dashboard
/dashboard.component'
;
import
{
SendComponent
}
from
'./send/send.component'
;
import
{
ReceiveComponent
}
from
'./receive/receive.component'
;
import
{
HistoryComponent
}
from
'./history/history.component'
;
...
...
Breeze/src/Breeze.Api/Breeze.Api.csproj
View file @
20d4beef
...
...
@@ -29,7 +29,7 @@
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="1.1.1" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
5
-alpha" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
6
-alpha" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="1.0.0-rc3" />
<PackageReference Include="System.Reactive" Version="3.1.1" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
...
...
Breeze/src/Breeze.Daemon/Breeze.Daemon.csproj
View file @
20d4beef
...
...
@@ -20,7 +20,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="1.1.1" />
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="1.1.1" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
5
-alpha" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.
6
-alpha" />
</ItemGroup>
</Project>
Breeze/src/Breeze.Wallet/Breeze.Wallet.csproj
View file @
20d4beef
...
...
@@ -17,9 +17,9 @@
<ItemGroup>
<PackageReference Include="ConcurrentHashSet" Version="1.0.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="1.0.3" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.5-alpha" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="1.0.3" />
<PackageReference Include="System.ValueTuple" Version="4.3.1" />
<PackageReference Include="Stratis.Bitcoin" Version="1.0.1.6-alpha" />
</ItemGroup>
</Project>
Breeze/src/Breeze.Wallet/ChainExtensions.cs
View file @
20d4beef
...
...
@@ -16,30 +16,6 @@ namespace Breeze.Wallet
return
chain
.
Tip
.
Header
.
BlockTime
.
ToUnixTimeSeconds
()
>
(
DateTimeOffset
.
Now
.
ToUnixTimeSeconds
()
-
TimeSpan
.
FromHours
(
1
).
TotalSeconds
);
}
/// <summary>
/// Gets the type of the coin this chain relates to.
/// Obviously this method and how we figure out what coin we're on needs to be revisited.
/// </summary>
/// <param name="chain">The chain.</param>
/// <returns></returns>
/// <exception cref="System.Exception">No support for this coin.</exception>
public
static
CoinType
GetCoinType
(
this
ConcurrentChain
chain
)
{
uint256
genesis
=
chain
.
Genesis
.
Header
.
GetHash
();
switch
(
genesis
.
ToString
())
{
case
"000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"
:
return
CoinType
.
Bitcoin
;
case
"b0e511e965aeb40614ca65a1b79bd6e4e7ef299fa23e575a64b079691e9d4690"
:
return
CoinType
.
Stratis
;
case
"000000000933ea01ad0ee984209779baaec3ced90fa3f408719526f8d77f4943"
:
return
CoinType
.
Testnet
;
default
:
throw
new
Exception
(
"No support for this coin."
);
}
}
/// <summary>
/// Gets the height of the first block created after this date.
/// </summary>
...
...
Breeze/src/Breeze.Wallet/Tracker.cs
View file @
20d4beef
...
...
@@ -22,13 +22,13 @@ namespace Breeze.Wallet
private
readonly
BlockNotification
blockNotification
;
private
readonly
CoinType
coinType
;
public
Tracker
(
IWalletManager
walletManager
,
ConcurrentChain
chain
,
Signals
signals
,
BlockNotification
blockNotification
)
public
Tracker
(
IWalletManager
walletManager
,
ConcurrentChain
chain
,
Signals
signals
,
BlockNotification
blockNotification
,
Network
network
)
{
this
.
walletManager
=
walletManager
as
WalletManager
;
this
.
chain
=
chain
;
this
.
signals
=
signals
;
this
.
blockNotification
=
blockNotification
;
this
.
coinType
=
chain
.
GetCoinType
()
;
this
.
coinType
=
(
CoinType
)
network
.
Consensus
.
CoinType
;
}
/// <inheritdoc />
...
...
Breeze/src/Breeze.Wallet/WalletManager.cs
View file @
20d4beef
...
...
@@ -36,7 +36,7 @@ namespace Breeze.Wallet
/// </summary>
public
event
EventHandler
<
TransactionFoundEventArgs
>
TransactionFound
;
public
WalletManager
(
ConcurrentChain
chain
)
public
WalletManager
(
ConcurrentChain
chain
,
Network
netwrok
)
{
this
.
Wallets
=
new
List
<
Wallet
>();
...
...
@@ -46,7 +46,7 @@ namespace Breeze.Wallet
this
.
Load
(
this
.
DeserializeWallet
(
path
));
}
this
.
coinType
=
chain
.
GetCoinType
()
;
this
.
coinType
=
(
CoinType
)
netwrok
.
Consensus
.
CoinType
;
// load data in memory for faster lookups
// TODO get the coin type from somewhere else
...
...
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