Browse Source
Added generic error for zero fees on bitcoinkind currencies
develop
Juan Cortes Ross
6 years ago
No known key found for this signature in database
GPG Key ID: 34A99C03E9455EB8
4 changed files with
24 additions and
31 deletions
-
src/bridge/LibcoreBridge.js
-
src/components/FeesField/BitcoinKind.js
-
static/i18n/en/app.json
-
yarn.lock
|
|
@ -103,6 +103,8 @@ const getFees = async (a, transaction) => { |
|
|
|
const checkValidTransaction = (a, t) => |
|
|
|
!t.feePerByte |
|
|
|
? Promise.reject(new FeeNotLoaded()) |
|
|
|
: t.feePerByte.eq(0) |
|
|
|
? Promise.resolve(false) |
|
|
|
: !t.amount |
|
|
|
? Promise.resolve(true) |
|
|
|
: getFees(a, t) |
|
|
|
|
|
@ -147,7 +147,13 @@ class FeesField extends Component<OwnProps, State> { |
|
|
|
onChange={onChange} |
|
|
|
onChangeFocus={this.onChangeFocus} |
|
|
|
loading={!feePerByte && !error} |
|
|
|
error={!feePerByte && error ? new FeeNotLoaded() : null} |
|
|
|
error={ |
|
|
|
!feePerByte && error |
|
|
|
? new FeeNotLoaded() |
|
|
|
: feePerByte && feePerByte.isZero() |
|
|
|
? new Error(t('errors.FeesAreRequired.title')) |
|
|
|
: null |
|
|
|
} |
|
|
|
renderRight={ |
|
|
|
<InputRight>{t('send.steps.amount.unitPerByte', { unit: satoshi.code })}</InputRight> |
|
|
|
} |
|
|
|
|
|
@ -738,6 +738,9 @@ |
|
|
|
"title": "{{message}}", |
|
|
|
"description": "Something went wrong. Please retry or contact us." |
|
|
|
}, |
|
|
|
"FeesAreRequired": { |
|
|
|
"title": "Fees are required" |
|
|
|
}, |
|
|
|
"AccountNameRequired": { |
|
|
|
"title": "An account name is required", |
|
|
|
"description": "Please provide an account name" |
|
|
|
|
|
@ -13495,17 +13495,7 @@ react-treebeard@^2.1.0: |
|
|
|
shallowequal "^0.2.2" |
|
|
|
velocity-react "^1.3.1" |
|
|
|
|
|
|
|
react@*, react@^16.2.0: |
|
|
|
version "16.6.1" |
|
|
|
resolved "https://registry.yarnpkg.com/react/-/react-16.6.1.tgz#ee2aef4f0a09e494594882029821049772f915fe" |
|
|
|
integrity sha512-OtawJThYlvRgm9BXK+xTL7BIlDx8vv21j+fbQDjRRUyok6y7NyjlweGorielTahLZHYIdKUoK2Dp9ByVWuMqxw== |
|
|
|
dependencies: |
|
|
|
loose-envify "^1.1.0" |
|
|
|
object-assign "^4.1.1" |
|
|
|
prop-types "^15.6.2" |
|
|
|
scheduler "^0.11.0" |
|
|
|
|
|
|
|
react@^16.6.3: |
|
|
|
react@*, react@^16.2.0, react@^16.6.3: |
|
|
|
version "16.6.3" |
|
|
|
resolved "https://registry.yarnpkg.com/react/-/react-16.6.3.tgz#25d77c91911d6bbdd23db41e70fb094cc1e0871c" |
|
|
|
integrity sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw== |
|
|
@ -14424,14 +14414,6 @@ sax@^1.2.4, sax@~1.2.1, sax@~1.2.4: |
|
|
|
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" |
|
|
|
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== |
|
|
|
|
|
|
|
scheduler@^0.11.0: |
|
|
|
version "0.11.0" |
|
|
|
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.0.tgz#def1f1bfa6550cc57981a87106e65e8aea41a6b5" |
|
|
|
integrity sha512-MAYbBfmiEHxF0W+c4CxMpEqMYK+rYF584VP/qMKSiHM6lTkBKKYOJaDiSILpJHla6hBOsVd6GucPL46o2Uq3sg== |
|
|
|
dependencies: |
|
|
|
loose-envify "^1.1.0" |
|
|
|
object-assign "^4.1.1" |
|
|
|
|
|
|
|
scheduler@^0.11.2: |
|
|
|
version "0.11.3" |
|
|
|
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b" |
|
|
|