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

fix(dashpay): improve progress UI for mixing and otherfixes timeskew progress #1261

Merged
merged 4 commits into from
Mar 12, 2024

Conversation

HashEngineering
Copy link
Collaborator

Issue being fixed or feature implemented

Related PR's and Dependencies

Screenshots / Videos

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

@HashEngineering HashEngineering self-assigned this Feb 28, 2024
Comment on lines +50 to 66
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 -> { }
}
Copy link
Collaborator Author

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.

Comment on lines +1 to +10
<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>
Copy link
Collaborator Author

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.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2024-02-28 at 8 09 28 AM

@HashEngineering HashEngineering merged commit e8b9a18 into dashpay Mar 12, 2024
1 check passed
@Syn-McJ Syn-McJ deleted the dashpay-fixes-timeskew-progress branch March 14, 2024 04:59
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.

2 participants