Browse Source

Save pubkey for Ripple and Ethereum accounts

master
Thibaut Boustany 7 years ago
parent
commit
57b0f3464e
No known key found for this signature in database GPG Key ID: 32475B11A2B13EEC
  1. 4
      src/bridge/EthereumJSBridge.js
  2. 4
      src/bridge/RippleJSBridge.js

4
src/bridge/EthereumJSBridge.js

@ -170,7 +170,7 @@ const EthereumBridge: WalletBridge<Transaction> = {
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<Transaction> = {
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

4
src/bridge/RippleJSBridge.js

@ -258,12 +258,12 @@ const RippleJSBridge: WalletBridge<Transaction> = {
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 {

Loading…
Cancel
Save