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

NO-TICKET - Add metadata change logs #1852

Merged
merged 3 commits into from
Jun 20, 2023

Conversation

gslevinkov
Copy link
Contributor

Description of Work

  • you can decipher now metadata field on get_metadata and update_metadata requests
  • in Debug build there is inner mechanism that collects all the changes to metadata to understand what's going on: what changed, when, and which fields. helpful to understand what went wrong

PhoneNumberUtil.PhoneNumberFormat.INTERNATIONAL
)
internationalFormat.replace("+$phoneCode", emptyString())
if (exampleNumber != null) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

to remove unwanted trash logs when exampleNumber is null

@@ -132,6 +132,7 @@ class GatewayServiceCreateWalletMapper(
phoneNumberTimestampSec = epochUnixTimeSeconds,
socialShareOwnerEmail = socialShareOwnerId,
emailTimestampSec = epochUnixTimeSeconds,
authProviderTimestampSec = epochUnixTimeSeconds
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we forgot to add this here

?: if (web3AuthData != null) "Not loaded" else "None"

textViewWeb3Value.text = web3DataJson
textViewMetadataValue.text = metadataJson

buttonMetadataLogs.setOnClickListener {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

share logs in debug panel

@@ -92,6 +93,15 @@ object NetworkModule : InjectionModule {
interceptor = RpcInterceptor(get(), get())
)
}
single<RpcApi> {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved RpcApi to our module because there was not enough logging for update_metadata requests

.orEmpty()
if (cipheredMetadata.isNotBlank()) {
// get json like GatewayOnboardingMetadataCiphered
val metadataAsJson = kotlin.runCatching {
Copy link
Contributor

Choose a reason for hiding this comment

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

if you move runCatching to the next line, it would be much easier to read

single<RpcApi> {
getRetrofit(
// no need for baseUrl here, we pass URL inside RpcApi
baseUrl = "http://localhost/",
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 that needs to be refactored.
Move URL passing here.

@davran1001 fyi

@gslevinkov gslevinkov merged commit baebace into develop Jun 20, 2023
2 of 3 checks passed
@gslevinkov gslevinkov deleted the feature/NO-TICKET-add-metadata-logger branch June 20, 2023 11:48
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.

4 participants