Meriadec Pillet
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
7 additions and
2 deletions
-
package.json
-
src/bridge/EthereumJSBridge.js
|
|
@ -3,7 +3,7 @@ |
|
|
|
"productName": "Ledger Live", |
|
|
|
"description": "Ledger Live - Desktop", |
|
|
|
"repository": "https://github.com/LedgerHQ/ledger-live-desktop", |
|
|
|
"version": "1.1.3", |
|
|
|
"version": "1.1.4", |
|
|
|
"author": "Ledger", |
|
|
|
"license": "MIT", |
|
|
|
"scripts": { |
|
|
|
|
|
@ -9,6 +9,7 @@ import throttle from 'lodash/throttle' |
|
|
|
import flatMap from 'lodash/flatMap' |
|
|
|
import uniqBy from 'lodash/uniqBy' |
|
|
|
import type { Account, Operation } from '@ledgerhq/live-common/lib/types' |
|
|
|
import eip55 from 'eip55' |
|
|
|
import { apiForCurrency } from 'api/Ethereum' |
|
|
|
import type { Tx } from 'api/Ethereum' |
|
|
|
import { getDerivations } from 'helpers/derivations' |
|
|
@ -98,7 +99,11 @@ const txToOps = (account: Account) => (tx: Tx): Operation[] => { |
|
|
|
} |
|
|
|
|
|
|
|
function isRecipientValid(currency, recipient) { |
|
|
|
return !!recipient.match(/^0x[0-9a-fA-F]{40}$/) |
|
|
|
try { |
|
|
|
return eip55.verify(recipient) |
|
|
|
} catch (error) { |
|
|
|
return false |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
function mergeOps(existing: Operation[], newFetched: Operation[]) { |
|
|
|