-
Notifications
You must be signed in to change notification settings - Fork 1
Basic wallet integration mockup #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Create wallet controller that will be taking care of talking to the wallets. Currently implemented methods are: Deposit: called by a wallet server when it detects a new incoming transaction Withdraw: called by user to transfer funds CreateCornaddy: generates a new cornaddress
/// <summary> | ||
/// Lists all implemented wallet methods on the high level api as constants for Attribute access | ||
/// </summary> | ||
public enum ImplementedWalletMethods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should go ahead and add all methods to this just so we have them for the future, maybe not
/// <summary> | ||
/// Wallet client interface used to communicate with the wallet implementation | ||
/// </summary> | ||
public interface IWalletClient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this need an interface?
/// Creates wallet error object with HTTP_ERROR flag indicating that the error was in the request | ||
/// </summary> | ||
/// <returns></returns> | ||
private WalletError CreateHttpErrorResponse(HttpResponseMessage message) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would stack trace help here?
/// If call was succesfull (IsError is false), m_Content will be of type T, otherwise m_Content will be of type WalletError | ||
/// </summary> | ||
/// <typeparam name="T">Succesfull response datatype</typeparam> | ||
public class ParsedWalletResponse<T> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One of the wallet responses should just be "walletresponse"
/// Deserialized Transaction info response returned by the gettransaction call | ||
/// </summary> | ||
[Serializable] | ||
public class TransactionInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can call this blockchainTx
/// <summary> | ||
/// Deserialized error object returned by the wallet | ||
/// </summary> | ||
public class WalletError |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this project needs and !Error or !exception interface.
Create wallet controller that will be taking care of talking to the wallets.
Currently implemented methods are:
Deposit: called by a wallet server when it detects a new incoming transaction
Withdraw: called by user to transfer funds
CreateCornaddy: generates a new cornaddress