Remove network package testing implementation

This commit is contained in:
dtvv 2018-09-03 10:49:25 -06:00
parent 4a566a1e3a
commit e283f7cb65
3 changed files with 18 additions and 38 deletions

View file

@ -53,7 +53,7 @@ dependencies {
exclude group: 'com.android.support', module: 'support-annotations' exclude group: 'com.android.support', module: 'support-annotations'
}) })
implementation 'com.jaredrummler:material-spinner:1.2.5' implementation 'com.jaredrummler:material-spinner:1.2.5'
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion" implementation "org.jetbrains.kotlin:kotlin-stdlib:1.1.60"
//testCompile 'com.android.support.test:runner:1.0.1' //testCompile 'com.android.support.test:runner:1.0.1'
implementation 'com.afollestad.material-dialogs:core:0.9.6.0' //DTVV Thrusday 31 July 2018 implementation 'com.afollestad.material-dialogs:core:0.9.6.0' //DTVV Thrusday 31 July 2018
implementation 'com.android.support:appcompat-v7:27.1.1' implementation 'com.android.support:appcompat-v7:27.1.1'

View file

@ -9,6 +9,9 @@ import cy.agorise.crystalwallet.requestmanagers.ValidateExistBitsharesAccountReq
import cy.agorise.crystalwallet.viewmodels.validators.customImpl.interfaces.UIValidator import cy.agorise.crystalwallet.viewmodels.validators.customImpl.interfaces.UIValidator
import cy.agorise.crystalwallet.viewmodels.validators.customImpl.interfaces.UIValidatorListener import cy.agorise.crystalwallet.viewmodels.validators.customImpl.interfaces.UIValidatorListener
import cy.agorise.crystalwallet.views.natives.CustomTextInputEditText import cy.agorise.crystalwallet.views.natives.CustomTextInputEditText
import cy.agorise.crystalwallet.requestmanagers.CryptoNetInfoRequestListener
/* /*
* *
@ -166,64 +169,41 @@ class BitsharesAccountNameValidation : CustomValidationField, UIValidator {
creatingAccountMaterialDialog.build() creatingAccountMaterialDialog.build()
creatingAccountMaterialDialog.show() creatingAccountMaterialDialog.show()
val request = ValidateExistBitsharesAccountRequest(newValue) val request = ValidateExistBitsharesAccountRequest(newValue)
request.setListener { request.setListener {
/* /*
* Dismiss the dialog of loading * Dismiss the dialog of loading
* */ * */
creatingAccountMaterialDialog.dismiss() creatingAccountMaterialDialog.dismiss()
if (request.accountExists) { if (!request.accountExists) {
/* /*
* The account exists and is not valid * The account exists and is not valid
* */ * */
accountNameField.fieldValidatorModel.setInvalid() accountNameField.fieldValidatorModel.setInvalid()
accountNameField.fieldValidatorModel.message = accountNameField.resources.getString(R.string.account_name_already_exist) accountNameField.fieldValidatorModel.message = accountNameField.resources.getString(R.string.account_name_already_exist)
/*
* Deliver the response
* */
if (uiValidatorListener != null) {
uiValidatorListener.onValidationFailed(globalCustomValidationField)
}
/*
* Deliver response to local callback
* */
if (onAccountExist != null) {
onAccountExist!!.onAccountExists()
}
} else { } else {
/* /*
* Passed all validations * Passed all validations
* */ * */
accountNameField.fieldValidatorModel.setValid() accountNameField.fieldValidatorModel.setValid()
/* /*
* Deliver the response * Deliver the response
* */ * */
if (uiValidatorListener != null) { if (uiValidatorListener != null) {
uiValidatorListener.onValidationSucceeded(globalCustomValidationField) uiValidatorListener.onValidationSucceeded(globalCustomValidationField)
} }
} }
} }
CryptoNetInfoRequests.getInstance().addRequest(request)
/*GrapheneApiGenerator.setActivity(activity); //Set the activity to catch errors }
val onErrorWebSocker = object : GrapheneApiGenerator.OnErrorWebSocket { /*
override fun onError(exception: java.lang.Exception?) {
creatingAccountMaterialDialog.dismiss();
}
}
GrapheneApiGenerator.setOnErrorWebSocket(onErrorWebSocker); //Set the activity to catch errors
CryptoNetInfoRequests.getInstance().addRequest(request)*/
}/*
* Passed initial validations, next final validations * Passed initial validations, next final validations
* */ * */
} }

View file

@ -10,7 +10,7 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.1.4' classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.60"
// NOTE: Do not place your application dependencies here; they belong // NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files // in the individual module build.gradle files
} }