-
Notifications
You must be signed in to change notification settings - Fork 2
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
Update account import #250
Conversation
these can happen on any network error and also happen at 404 - not found - that's not an error, just means no profile exists for the account
@@ -161,8 +161,8 @@ class RemoteConfigService { | |||
}, | |||
"eosTestnet": { | |||
"name": "Jungle4 Testnet", | |||
"endpoint": "https://jungle4.dfuse.eosnation.io", | |||
"fastEndpoint": "https://jungle4.dfuse.eosnation.io", | |||
"endpoint": "http://jungle.eosusa.io/", |
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.
should we be changing these endpoints in firebase and not locally?
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.
I was changing them in firebase, but the local app doesn't update for whatever reason.
The mobile phones were updating correctly
@@ -22,12 +22,13 @@ class ProfileService { | |||
final map = Map<String, dynamic>.from(response.data); | |||
return Result.value(ProfileData.fromJson(map, user.network, [])); | |||
} else { | |||
LogHelper.e('get profile status error', stacktrace: StackTrace.current); | |||
LogHelper.i('get profile status error'); |
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.
lets pass the server error ${response.statusMessage}
to this log
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.
done
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.
overall looks good. minor comments
I tried to catch the 404 but somehow it's impossible .. dio throws an exception on 404, it doesn't return the status 404. So it always goes into the catch of the try catch on 404. It's a little unclean since 404 is not an error, really. But will not pack this into this pr |
@@ -22,12 +22,13 @@ class ProfileService { | |||
final map = Map<String, dynamic>.from(response.data); | |||
return Result.value(ProfileData.fromJson(map, user.network, [])); | |||
} else { | |||
LogHelper.e('get profile status error', stacktrace: StackTrace.current); |
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.
this doesn't happen - a 404 ends in the catch block of this try/catch because dio throws
The history plugin is officially deprecated and many nodes don't support it
This changes our account import to use a different call in the chain API - should be more stable.
A couple of changes
Note: The new call can return accounts multiple times, when an account has owner and active keys that are the same, so it needs to de-duplicate the list.