From 57b0f3464e9ced866319338ced7a27c3f9d9fa09 Mon Sep 17 00:00:00 2001 From: Thibaut Boustany Date: Tue, 19 Jun 2018 16:18:51 +0200 Subject: [PATCH] Save pubkey for Ripple and Ethereum accounts --- src/bridge/EthereumJSBridge.js | 4 ++-- src/bridge/RippleJSBridge.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bridge/EthereumJSBridge.js b/src/bridge/EthereumJSBridge.js index 8bf3006e..7bf2854f 100644 --- a/src/bridge/EthereumJSBridge.js +++ b/src/bridge/EthereumJSBridge.js @@ -170,7 +170,7 @@ const EthereumBridge: WalletBridge = { async function stepAddress( index, - { address, path: freshAddressPath }, + { address, path: freshAddressPath, publicKey }, isStandard, ): { account?: Account, complete?: boolean } { const balance = await api.getAccountBalance(address) @@ -181,7 +181,7 @@ const EthereumBridge: WalletBridge = { if (finished) return { complete: true } const freshAddress = address - const accountId = `ethereumjs:${currency.id}:${address}` + const accountId = `ethereumjs:${currency.id}:${address}:${publicKey}` if (txs.length === 0) { // this is an empty account diff --git a/src/bridge/RippleJSBridge.js b/src/bridge/RippleJSBridge.js index a8fb4621..f3ebb0cd 100644 --- a/src/bridge/RippleJSBridge.js +++ b/src/bridge/RippleJSBridge.js @@ -258,12 +258,12 @@ const RippleJSBridge: WalletBridge = { for (const derivation of derivations) { for (let index = 0; index < 255; index++) { const freshAddressPath = derivation({ currency, x: index, segwit: false }) - const { address } = await await getAddress + const { address, publicKey } = await await getAddress .send({ currencyId: currency.id, devicePath: deviceId, path: freshAddressPath }) .toPromise() if (finished) return - const accountId = `ripplejs:${currency.id}:${address}` + const accountId = `ripplejs:${currency.id}:${address}:${publicKey}` let info try {