Browse Source

Merge pull request #874 from gre/ManagerUnexpected

Drop error called ManagerUnexpectedError
master
Gaëtan Renaudeau 7 years ago
committed by GitHub
parent
commit
56aefd5af8
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/helpers/apps/installApp.js
  2. 3
      src/helpers/apps/uninstallApp.js
  3. 3
      static/i18n/en/errors.yml

3
src/helpers/apps/installApp.js

@ -9,7 +9,6 @@ import type { LedgerScriptParams } from 'helpers/common'
import { createCustomErrorClass } from '../errors'
const ManagerUnexpectedError = createCustomErrorClass('ManagerUnexpected')
const ManagerNotEnoughSpaceError = createCustomErrorClass('ManagerNotEnoughSpace')
const ManagerDeviceLockedError = createCustomErrorClass('ManagerDeviceLocked')
const ManagerAppAlreadyInstalledError = createCustomErrorClass('ManagerAppAlreadyInstalled')
@ -27,7 +26,7 @@ function remapError(promise) {
case e.message.endsWith('6a83'):
throw new ManagerAppRelyOnBTCError()
default:
throw new ManagerUnexpectedError(e.message, { msg: e.message })
throw e
}
})
}

3
src/helpers/apps/uninstallApp.js

@ -8,7 +8,6 @@ import { createDeviceSocket } from 'helpers/socket'
import type { LedgerScriptParams } from 'helpers/common'
import { createCustomErrorClass } from '../errors'
const ManagerUnexpectedError = createCustomErrorClass('ManagerUnexpectedError')
const ManagerDeviceLockedError = createCustomErrorClass('ManagerDeviceLocked')
const ManagerUninstallBTCDep = createCustomErrorClass('ManagerUninstallBTCDep')
@ -20,7 +19,7 @@ function remapError(promise) {
case e.message.endsWith('6a83'):
throw new ManagerUninstallBTCDep()
default:
throw new ManagerUnexpectedError(e.message, { msg: e.message })
throw e
}
})
}

3
static/i18n/en/errors.yml

@ -65,9 +65,6 @@ ManagerDeviceLocked:
ManagerNotEnoughSpace:
title: Sorry, insufficient device storage
description: Uninstall some apps to increase available storage and try again.
ManagerUnexpected:
title: That's unexpected ({{msg}}) #(Manager: {{msg}})
description: Please try again.
ManagerUninstallBTCDep:
title: Sorry, Bitcoin is required # include {{currencyName}}
description: First uninstall apps that depend on Bitcoin.

Loading…
Cancel
Save