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
bc225cb7
Commit
bc225cb7
authored
May 14, 2017
by
Jeremy Bokobza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change some collection types in the wallet object
parent
cea9240b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
17 deletions
+14
-17
Wallet.cs
Breeze/src/Breeze.Wallet/Wallet.cs
+4
-4
WalletManager.cs
Breeze/src/Breeze.Wallet/WalletManager.cs
+10
-13
No files found.
Breeze/src/Breeze.Wallet/Wallet.cs
View file @
bc225cb7
...
@@ -121,7 +121,7 @@ namespace Breeze.Wallet
...
@@ -121,7 +121,7 @@ namespace Breeze.Wallet
/// The accounts used in the wallet.
/// The accounts used in the wallet.
/// </summary>
/// </summary>
[
JsonProperty
(
PropertyName
=
"accounts"
)]
[
JsonProperty
(
PropertyName
=
"accounts"
)]
public
I
Enumerable
<
HdAccount
>
Accounts
{
get
;
set
;
}
public
I
Collection
<
HdAccount
>
Accounts
{
get
;
set
;
}
/// <summary>
/// <summary>
/// Gets the first account that contains no transaction.
/// Gets the first account that contains no transaction.
...
@@ -227,13 +227,13 @@ namespace Breeze.Wallet
...
@@ -227,13 +227,13 @@ namespace Breeze.Wallet
/// The list of external addresses, typically used for receiving money.
/// The list of external addresses, typically used for receiving money.
/// </summary>
/// </summary>
[
JsonProperty
(
PropertyName
=
"externalAddresses"
)]
[
JsonProperty
(
PropertyName
=
"externalAddresses"
)]
public
I
Enumerable
<
HdAddress
>
ExternalAddresses
{
get
;
set
;
}
public
I
Collection
<
HdAddress
>
ExternalAddresses
{
get
;
set
;
}
/// <summary>
/// <summary>
/// The list of internal addresses, typically used to receive change.
/// The list of internal addresses, typically used to receive change.
/// </summary>
/// </summary>
[
JsonProperty
(
PropertyName
=
"internalAddresses"
)]
[
JsonProperty
(
PropertyName
=
"internalAddresses"
)]
public
I
Enumerable
<
HdAddress
>
InternalAddresses
{
get
;
set
;
}
public
I
Collection
<
HdAddress
>
InternalAddresses
{
get
;
set
;
}
/// <summary>
/// <summary>
/// Gets the type of coin this account is for.
/// Gets the type of coin this account is for.
...
@@ -374,7 +374,7 @@ namespace Breeze.Wallet
...
@@ -374,7 +374,7 @@ namespace Breeze.Wallet
/// A list of transactions involving this address.
/// A list of transactions involving this address.
/// </summary>
/// </summary>
[
JsonProperty
(
PropertyName
=
"transactions"
)]
[
JsonProperty
(
PropertyName
=
"transactions"
)]
public
I
Enumerable
<
TransactionData
>
Transactions
{
get
;
set
;
}
public
I
Collection
<
TransactionData
>
Transactions
{
get
;
set
;
}
}
}
/// <summary>
/// <summary>
...
...
Breeze/src/Breeze.Wallet/WalletManager.cs
View file @
bc225cb7
...
@@ -289,14 +289,14 @@ namespace Breeze.Wallet
...
@@ -289,14 +289,14 @@ namespace Breeze.Wallet
BitcoinPubKeyAddress
address
=
this
.
GenerateAddress
(
account
.
ExtendedPubKey
,
i
,
isChange
,
network
);
BitcoinPubKeyAddress
address
=
this
.
GenerateAddress
(
account
.
ExtendedPubKey
,
i
,
isChange
,
network
);
// add address details
// add address details
addresses
=
addresses
.
Concat
(
new
[]
{
new
HdAddress
addresses
.
Add
(
new
HdAddress
{
{
Index
=
i
,
Index
=
i
,
HdPath
=
CreateBip44Path
(
account
.
GetCoinType
(),
account
.
Index
,
i
,
isChange
),
HdPath
=
CreateBip44Path
(
account
.
GetCoinType
(),
account
.
Index
,
i
,
isChange
),
ScriptPubKey
=
address
.
ScriptPubKey
,
ScriptPubKey
=
address
.
ScriptPubKey
,
Address
=
address
.
ToString
(),
Address
=
address
.
ToString
(),
Transactions
=
new
List
<
TransactionData
>()
Transactions
=
new
List
<
TransactionData
>()
}
}
);
});
addressesCreated
.
Add
(
address
.
ToString
());
addressesCreated
.
Add
(
address
.
ToString
());
}
}
...
@@ -514,9 +514,7 @@ namespace Breeze.Wallet
...
@@ -514,9 +514,7 @@ namespace Breeze.Wallet
var
address
=
receivingAddress
??
changeAddress
;
var
address
=
receivingAddress
??
changeAddress
;
if
(
address
!=
null
)
if
(
address
!=
null
)
{
{
address
.
Transactions
=
address
.
Transactions
.
Concat
(
new
[]
address
.
Transactions
.
Add
(
new
TransactionData
{
new
TransactionData
{
{
Amount
=
amount
,
Amount
=
amount
,
BlockHeight
=
blockHeight
,
BlockHeight
=
blockHeight
,
...
@@ -524,7 +522,6 @@ namespace Breeze.Wallet
...
@@ -524,7 +522,6 @@ namespace Breeze.Wallet
Id
=
transactionHash
,
Id
=
transactionHash
,
CreationTime
=
DateTimeOffset
.
FromUnixTimeMilliseconds
(
blockTime
??
time
),
CreationTime
=
DateTimeOffset
.
FromUnixTimeMilliseconds
(
blockTime
??
time
),
Index
=
index
Index
=
index
}
});
});
// notify a transaction has been found
// notify a transaction has been found
...
...
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