-
Notifications
You must be signed in to change notification settings - Fork 13
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
base: xumm
Are you sure you want to change the base?
Client type #21
Conversation
…nt into type/utils
* Type of client application using Sologenic Tx Handler | ||
*/ | ||
protected clientType: string = 'mobile'; | ||
|
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.
default should not be mobile. Leave it as an empty string
src/lib/txhandler.ts
Outdated
@@ -115,7 +120,8 @@ export class SologenicTxHandler extends EventEmitter { | |||
*/ | |||
constructor( | |||
rippleApiOptions: SologenicTypes.RippleAPIOptions, | |||
sologenicOptions: SologenicTypes.TransactionHandlerOptions | |||
sologenicOptions: SologenicTypes.TransactionHandlerOptions, |
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 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; | ||
} |
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.
in the proposed scenario you can just use:
if (typeof clientOptions.clientType !== 'undefined') {
this.clientType = sologenicOptions.clientType;
}
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.