Skip to content

Conversation

SamuliSalonen
Copy link

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

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
Copy link
Contributor

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
Copy link
Contributor

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)
Copy link
Contributor

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>
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants