Browse Source
Merge pull request #389 from gre/fix-input-address
Fix input address
master
Gaëtan Renaudeau
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with
5 additions and
5 deletions
-
package.json
-
src/components/RecipientAddress/index.js
-
src/components/modals/Send/01-step-amount.js
|
|
@ -3,7 +3,7 @@ |
|
|
|
"productName": "Ledger Live", |
|
|
|
"description": "Ledger Live - Desktop", |
|
|
|
"repository": "https://github.com/LedgerHQ/ledger-live-desktop", |
|
|
|
"version": "0.1.0-alpha.3", |
|
|
|
"version": "0.1.0-alpha.4", |
|
|
|
"author": "Ledger", |
|
|
|
"license": "MIT", |
|
|
|
"scripts": { |
|
|
|
|
|
@ -45,7 +45,7 @@ const BackgroundLayer = styled(Box)` |
|
|
|
type Props = { |
|
|
|
value: string, |
|
|
|
// return false if it can't be changed (invalid info)
|
|
|
|
onChange: (string, { amount?: number, currency?: CryptoCurrency }) => ?boolean, |
|
|
|
onChange: (string, ?{ amount?: number, currency?: CryptoCurrency }) => ?boolean, |
|
|
|
withQrCode: boolean, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -17,6 +17,7 @@ const AccountField = ({ onChange, value, t }: *) => ( |
|
|
|
</Box> |
|
|
|
) |
|
|
|
|
|
|
|
// TODO we should use isRecipientValid & provide a feedback to user
|
|
|
|
const RecipientField = ({ bridge, account, transaction, onChangeTransaction, t }: *) => ( |
|
|
|
<Box flow={1}> |
|
|
|
<Label> |
|
|
@ -26,9 +27,8 @@ const RecipientField = ({ bridge, account, transaction, onChangeTransaction, t } |
|
|
|
<RecipientAddress |
|
|
|
withQrCode |
|
|
|
value={bridge.getTransactionRecipient(account, transaction)} |
|
|
|
onChange={(recipient, { amount, currency }) => { |
|
|
|
console.log(recipient, amount, currency, account.currency) |
|
|
|
// TODO we should use isRecipientValid & provide a feedback to user
|
|
|
|
onChange={(recipient, maybeExtra) => { |
|
|
|
const { amount, currency } = maybeExtra || {} |
|
|
|
if (currency && currency.scheme !== account.currency.scheme) return false |
|
|
|
let t = transaction |
|
|
|
if (amount) { |
|
|
|