From 1a993d2c8f5fdcca512d08b8f7650308ddd687b6 Mon Sep 17 00:00:00 2001 From: Overtorment Date: Sun, 19 Aug 2018 15:54:15 +0100 Subject: [PATCH] WIP: lnd integration --- BlueComponents.js | 8 +++++++- LightningCustodianWallet.test.js | 2 +- class/lightning-custodian-wallet.js | 16 ++++++++++++++-- 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/BlueComponents.js b/BlueComponents.js index 3b296b623..bd9f46362 100644 --- a/BlueComponents.js +++ b/BlueComponents.js @@ -10,6 +10,7 @@ import Carousel from 'react-native-snap-carousel'; import { HDLegacyP2PKHWallet } from './class/hd-legacy-p2pkh-wallet'; import { HDLegacyBreadwalletWallet } from './class/hd-legacy-breadwallet-wallet'; import { HDSegwitP2SHWallet } from './class/hd-segwit-p2sh-wallet'; +import { LightningCustodianWallet } from './class/lightning-custodian-wallet'; let loc = require('./loc/'); /** @type {AppStorage} */ let BlueApp = require('./BlueApp'); @@ -870,6 +871,11 @@ export class WalletsCarousel extends Component { gradient2 = '#9053fe'; } + if (new LightningCustodianWallet().type === item.type) { + gradient1 = '#f1be07'; + gradient2 = '#f79056'; + } + return ( { l1.generate(); l2.generate(); - assert.ok(l1.getSecret() !== l2.getSecret(), 'generated credentials should be the same'); + assert.ok(l1.getSecret() !== l2.getSecret(), 'generated credentials should not be the same'); }); diff --git a/class/lightning-custodian-wallet.js b/class/lightning-custodian-wallet.js index f3d1ac87c..4aed4b54b 100644 --- a/class/lightning-custodian-wallet.js +++ b/class/lightning-custodian-wallet.js @@ -13,6 +13,10 @@ export class LightningCustodianWallet extends LegacyWallet { }); } + getTypeReadable() { + return 'Lightning (custodian)'; + } + async createAccount() {} async authorize() {} @@ -33,11 +37,19 @@ export class LightningCustodianWallet extends LegacyWallet { async sendCoins() {} - async getTransactions() {} + getTransactions() { + return []; + } + + async fetchTransactions() { + return []; + } async getTransaction() {} - async getBalance() {} + getBalance() { + return 0; + } async getInfo() {} }