Browse Source
Dont cache manager applications
Because if you plug another device which have different firmware
version, it will list incompatible apps.
master
meriadec
7 years ago
No known key found for this signature in database
GPG Key ID: 1D2FC2305E2CB399
1 changed files with
1 additions and
4 deletions
-
src/components/ManagerPage/AppsList.js
|
|
@ -37,8 +37,6 @@ const List = styled(Box).attrs({ |
|
|
|
flex-wrap: wrap; |
|
|
|
` |
|
|
|
|
|
|
|
let CACHED_APPS = null |
|
|
|
|
|
|
|
const ICONS_FALLBACK = { |
|
|
|
bitcoin_testnet: 'bitcoin', |
|
|
|
} |
|
|
@ -85,8 +83,7 @@ class AppsList extends PureComponent<Props, State> { |
|
|
|
async fetchAppList() { |
|
|
|
try { |
|
|
|
const { targetId, version } = this.props |
|
|
|
const appsList = CACHED_APPS || (await listApps.send({ targetId, version }).toPromise()) |
|
|
|
CACHED_APPS = appsList |
|
|
|
const appsList = await listApps.send({ targetId, version }).toPromise() |
|
|
|
if (!this._unmounted) { |
|
|
|
this.setState({ appsList, status: 'idle', appsLoaded: true }) |
|
|
|
} |
|
|
|