-
Notifications
You must be signed in to change notification settings - Fork 171
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
fix(dashpay): improve progress UI for mixing and otherfixes timeskew progress #1261
Conversation
var timeSource = "NTP" | ||
|
||
val networkTimes = arrayListOf<Long>() | ||
for (i in 0..3) { | ||
try { | ||
val time = queryNtpTime("pool.ntp.org") | ||
if (time != null && time > 0) { networkTimes.add(time) } | ||
} catch (e: SocketTimeoutException) { | ||
// swallow | ||
} | ||
} | ||
networkTimes.sort() | ||
when (networkTimes.size) { | ||
3 -> networkTime = networkTimes[2] | ||
2 -> networkTime = (networkTimes[0] + networkTimes[1]) / 2 | ||
else -> { } | ||
} |
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.
perhaps later we should use the same mechanism of Dash Core for timeskew, as this gets complicated.
Sometimes the NTP server returns a number less than zero, so this is ignored.
Sometimes when the app starts up, there is a dialog about 6 or 7 second timeskew, but subsequent calls return 1 or 2 seconds difference.
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="12dp" | ||
android:height="12dp" | ||
android:viewportWidth="12" | ||
android:viewportHeight="12"> | ||
<path | ||
android:pathData="M6.416,1.314C5.561,1.238 4.702,1.398 3.931,1.775C3.16,2.153 2.507,2.734 2.043,3.456C1.579,4.178 1.321,5.013 1.298,5.871C1.274,6.729 1.486,7.577 1.909,8.323L0.783,8.963C0.242,8.011 -0.028,6.929 0.002,5.835C0.032,4.741 0.361,3.676 0.953,2.755C1.545,1.834 2.378,1.093 3.361,0.611C4.344,0.13 5.44,-0.073 6.531,0.024L6.416,1.314Z" | ||
android:fillColor="#008DE4" | ||
android:fillType="evenOdd"/> | ||
</vector> |
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 thought we had a circular progress indicator, but couldn't find it. I remember adding it to Coinbase.
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.
Issue being fixed or feature implemented
Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: