Skip to content

Commit 1ebfd71

Browse files
committed
Include exchange-rate cache in support log output
The info log payload sent to the logs server now carries a snapshot of the in-memory exchange-rate cache, including the subscribed pair lists and per-rate expirations, so support can distinguish pairs that were never requested from pairs that failed to resolve.
1 parent 5def8cf commit 1ebfd71

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/actions/LogActions.tsx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import { getCurrencyCode } from '../util/CurrencyInfoHelpers'
3232
import { base58 } from '../util/encoding'
3333
import { clearLogs, logWithType, readLogs } from '../util/logger'
3434
import { getOsVersion } from '../util/utils'
35+
import { getExchangeRateCacheDump } from './ExchangeRateActions'
3536

3637
const logsUri = 'https://logs1.edge.app/v1/log/'
3738

@@ -242,6 +243,13 @@ os: ${Platform.OS} ${Platform.Version}
242243
device: ${getBrand()} ${getDeviceId()}
243244
`
244245

246+
// Include the current exchange-rate cache, so support can see which
247+
// rate pairs the app is subscribed to and which rates it actually has:
248+
const rateCache = getExchangeRateCacheDump()
249+
logOutput.data += `***Exchange Rate Cache***\n${
250+
rateCache == null ? 'not loaded' : JSON.stringify(rateCache)
251+
}\n`
252+
245253
// Get activity logs
246254
const activityLogs = await readLogs('activity')
247255
activityOutput.data += activityLogs ?? ''

0 commit comments

Comments
 (0)