Browse Source
Save pubkey for Ripple and Ethereum accounts
master
Thibaut Boustany
7 years ago
No known key found for this signature in database
GPG Key ID: 32475B11A2B13EEC
2 changed files with
4 additions and
4 deletions
-
src/bridge/EthereumJSBridge.js
-
src/bridge/RippleJSBridge.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
|
|
|
|
|
|
@ -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 { |
|
|
|