-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/block-core/angor
- Loading branch information
Showing
11 changed files
with
168 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 53 additions & 1 deletion
54
src/Angor/Avalonia/AngorApp/Sections/Wallet/WalletViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,57 @@ | ||
using System.Collections.ObjectModel; | ||
|
||
namespace AngorApp.Sections.Wallet; | ||
|
||
public class WalletViewModel : ReactiveObject | ||
public class WalletViewModel : ReactiveObject, IWalletViewModel | ||
{ | ||
public IWallet Wallet { get; set; } | ||
} | ||
|
||
public interface IWalletViewModel | ||
{ | ||
public IWallet Wallet { get; set; } | ||
} | ||
|
||
public class WalletViewModelDesign : IWalletViewModel | ||
{ | ||
public IWallet Wallet { get; set; } = new WalletDesign(); | ||
} | ||
|
||
public class WalletDesign : IWallet | ||
{ | ||
public IEnumerable<ITransaction> History { get; } = | ||
[ | ||
new TransactionDesign() { Address = "someaddress1", Amount = 0.0001m, UtxoCount = 12, Path = "path", ViewRawJson = "json"}, | ||
new TransactionDesign() { Address = "someaddress2", Amount = 0.0003m, UtxoCount = 15, Path = "path", ViewRawJson = "json"}, | ||
new TransactionDesign() { Address = "someaddress3", Amount = 0.0042m, UtxoCount = 15, Path = "path", ViewRawJson = "json"}, | ||
new TransactionDesign() { Address = "someaddress4", Amount = 0.00581m, UtxoCount = 15, Path = "path", ViewRawJson = "json"}, | ||
]; | ||
} | ||
|
||
public class TransactionDesign : ITransaction | ||
{ | ||
public string Address { get; set; } | ||
public decimal Amount { get; set; } | ||
public string Path { get; set; } | ||
public int UtxoCount { get; set; } | ||
public string ViewRawJson { get; set; } | ||
} | ||
|
||
public interface IWallet | ||
{ | ||
public IEnumerable<ITransaction> History { get; } | ||
} | ||
|
||
public class WalletModel : IWallet | ||
{ | ||
public IEnumerable<ITransaction> History { get; } | ||
} | ||
|
||
public interface ITransaction | ||
{ | ||
public string Address { get; } | ||
public decimal Amount { get; } | ||
public string Path { get; } | ||
public int UtxoCount { get; } | ||
public string ViewRawJson { get; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.