Skip to content
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

Client type #21

Open
wants to merge 3 commits into
base: xumm
Choose a base branch
from
Open

Client type #21

wants to merge 3 commits into from

Conversation

okasato
Copy link

@okasato okasato commented Apr 20, 2020

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
    A feature change: add a new variable, clientType, to know the type of client (e.g. mobile, desktop, etc.)

  • What is the current behavior? (You can also link to an open issue here)
    None

  • What is the new behavior (if this is a feature change)?
    This change is adding the new variable: clientType in Sologenic Tx Handler and adding a new interface Client in types/utils.
    Initializing the constructor in Sologenic Tx Handler, the clientType is initialized.

  • Other information:
    clientType is 'mobile' by default.

* Type of client application using Sologenic Tx Handler
*/
protected clientType: string = 'mobile';

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

default should not be mobile. Leave it as an empty string

@@ -115,7 +120,8 @@ export class SologenicTxHandler extends EventEmitter {
*/
constructor(
rippleApiOptions: SologenicTypes.RippleAPIOptions,
sologenicOptions: SologenicTypes.TransactionHandlerOptions
sologenicOptions: SologenicTypes.TransactionHandlerOptions,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why don't we include the client options in SologenicOptions? I don't see why we need to have the third type. We can just easily add a property in sologenicOptions.


if (typeof clientOptions.clientType !== 'undefined') {
this.clientType = clientOptions.clientType;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the proposed scenario you can just use:
if (typeof clientOptions.clientType !== 'undefined') {
this.clientType = sologenicOptions.clientType;
}

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