mycelium-com / wallet-ios

94 stars 41 forks source link

Two app instances display different exchange rate value #20

Closed magicwave closed 7 years ago

magicwave commented 7 years ago
  1. installed v6 on iPhone 7, iOS 10.1.1
  2. made two receive transactions.
  3. restore-from-backup-install of v6 on iPhone 5, iOS 10.1.1 - transactions identical, as expected
  4. made another receive transaction on iPhone 7
  5. deleted app from iPhone 5
  6. restore-from-backup-install to iPhone 5
    Observe:
    • on Balance tab view, both phones display "Main Account" 0.260475 BTC balance,
    • iPhone 5 displays "Exchange rate: 775.97 USD"
    • iPhone 7 displays "Exchange rate: 776.12 USD"
    • Transaction tab view (displayed in BTC): identical in all respects - timestamp, key, confirmation, amount
    • On the Balance tab view, the refresh button action invoked simultaneously on both phones consistently results in disparity in displayed USD exchange rate values. Are they somehow querying different exchange rate sources?

Questions:

Giszmo commented 7 years ago

Ok, I see how in real life situations, where you exchange with somebody, having the same rate for the same provider matters. I'm not an iOS dev but on Android the behavior is:

Treat rates older than 5 minutes as stale (invalid). Treat rates less than 2.5 minutes old as "good enough" and reject doing an update.

This is to reduce server load where the app would otherwise constantly request the rate in quick succession. On Android I made that 2.5 minutes 5 seconds now but I assume it's the same thing on iOS.

You can start both apps in parallel, to get the first exchange rate in parallel and then it should match.

magicwave commented 7 years ago

Just to follow up: what I didn't understand as a user is that the in-app Settings provides an option to select from a number of Exchange Rate Providers. It happened that between apps on different devices, different Exchange Rate Providers were selected. This accounts for the discrepancy in the exchange rate displayed between the two app instances.

Giszmo commented 7 years ago

Thanks. Closing.