WIP: lnd integration

This commit is contained in:
Overtorment 2018-08-19 15:54:15 +01:00
parent ac6ea1e3a7
commit 1a993d2c8f
3 changed files with 22 additions and 4 deletions

View File

@ -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 (
<TouchableOpacity
activeOpacity={1}
@ -882,7 +888,7 @@ export class WalletsCarousel extends Component {
>
<LinearGradient colors={[gradient1, gradient2]} style={{ padding: 15, borderRadius: 10, height: 145 }}>
<Image
source={require('./img/btc-shape.png')}
source={(new LightningCustodianWallet().type === item.type && require('./img/lnd-shape.png')) || require('./img/btc-shape.png')}
style={{
width: 99,
height: 94,

View File

@ -8,5 +8,5 @@ it('can generate auth secret', () => {
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');
});

View File

@ -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() {}
}