|
|
@ -239,7 +239,8 @@ const getServerInfo = (map => endpointConfig => { |
|
|
|
})({}) |
|
|
|
|
|
|
|
const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
scanAccountsOnDevice(currency, deviceId, { next, complete, error }) { |
|
|
|
scanAccountsOnDevice: (currency, deviceId) => |
|
|
|
Observable.create(o => { |
|
|
|
let finished = false |
|
|
|
const unsubscribe = () => { |
|
|
|
finished = true |
|
|
@ -282,7 +283,7 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
// account does not exist in Ripple server
|
|
|
|
// we are generating a new account locally
|
|
|
|
if (!legacy) { |
|
|
|
next({ |
|
|
|
o.next({ |
|
|
|
id: accountId, |
|
|
|
xpub: '', |
|
|
|
name: getNewAccountPlaceholderName(currency, index), |
|
|
@ -331,12 +332,12 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
lastSyncDate: new Date(), |
|
|
|
} |
|
|
|
account.operations = transactions.map(txToOperation(account)) |
|
|
|
next(account) |
|
|
|
o.next(account) |
|
|
|
} |
|
|
|
} |
|
|
|
complete() |
|
|
|
o.complete() |
|
|
|
} catch (e) { |
|
|
|
error(e) |
|
|
|
o.error(e) |
|
|
|
} finally { |
|
|
|
api.disconnect() |
|
|
|
} |
|
|
@ -344,8 +345,8 @@ const RippleJSBridge: WalletBridge<Transaction> = { |
|
|
|
|
|
|
|
main() |
|
|
|
|
|
|
|
return { unsubscribe } |
|
|
|
}, |
|
|
|
return unsubscribe |
|
|
|
}), |
|
|
|
|
|
|
|
synchronize: ({ endpointConfig, freshAddress, blockHeight }) => |
|
|
|
Observable.create(o => { |
|
|
|