Spinner Updated

Spinner Updated
pull/1/head
ShahanaFarooqui 6 years ago
parent f11a7a27bf
commit c3adde6cc9

@ -9,4 +9,4 @@
<body>
<rtl-root></rtl-root>
<script type="text/javascript" src="runtime.6afe30102d8fe7337431.js"></script><script type="text/javascript" src="polyfills.c7939909ac1e754960ad.js"></script><script type="text/javascript" src="main.9f8987438a12843bf4a9.js"></script></body></html>
<script type="text/javascript" src="runtime.6afe30102d8fe7337431.js"></script><script type="text/javascript" src="polyfills.c7939909ac1e754960ad.js"></script><script type="text/javascript" src="main.2a79e70dfbbf05eb030a.js"></script></body></html>

File diff suppressed because one or more lines are too long

@ -23,6 +23,7 @@ exports.getChannels = (req, res, next) => {
};
exports.postChannel = (req, res, next) => {
// setTimeout(()=>{res.status(201).json({message: 'Channel Open!'});}, 5000);
options.url = config.lnd_server_url + '/channels';
options.form = JSON.stringify({
node_pubkey_string: req.body.node_pubkey,

@ -5,14 +5,16 @@ var config = require('../config');
exports.getInfo = (req, res, next) => {
options.url = config.lnd_server_url + '/getinfo';
request.get(options, (error, response, body) => {
console.log('Information Received: ' + JSON.stringify(body));
if(undefined === body || body.error) {
const body_str = (undefined === body) ? '' : JSON.stringify(body);
const search_idx = (undefined === body) ? -1 : body_str.search('Not Found');
console.log('Information Received: ' + body_str);
if(undefined === body || search_idx > -1 || body.error) {
res.status(500).json({
message: "Fetching Info failed!",
error: (undefined === body) ? 'ERROR From Server!' : body.error
error: (undefined === body || search_idx > -1) ? 'ERROR From Server!' : body.error
});
} else {
res.status(200).json({body});
res.status(200).json(body);
}
});
};

@ -19,6 +19,7 @@ exports.getPeers = (req, res, next) => {
};
exports.postPeer = (req, res, next) => {
// setTimeout(()=>{res.status(201).json({message: 'Peer Added!'});}, 5000);
options.url = 'https://localhost:8080/v1/peers';
options.form = JSON.stringify({
addr: { host: req.body.host, pubkey: req.body.pubkey },

@ -24,11 +24,27 @@ exports.operateWallet = (req, res, next) => {
request.post(options, (error, response, body) => {
console.log('\nUnlock Wallet Response: ');
console.log(body);
if(undefined === body || body.error) {
const body_str = (undefined === body) ? '' : JSON.stringify(body);
const search_idx = (undefined === body) ? -1 : body_str.search('Not Found');
if(undefined === body) {
res.status(500).json({
message: err_message,
error: (undefined === body) ? 'ERROR From Server!' : body.error
error: 'Unlocking wallet failed! Verify that lnd is running!'
});
} else if(search_idx > -1) {
res.status(500).json({
message: err_message,
error: 'Unlocking wallet failed! Verify that lnd is running!'
});
} else if(body.error) {
if(body.code === 1 && body.error === 'context canceled') {
res.status(201).json({wallet: 'successful'});
} else {
res.status(500).json({
message: err_message,
error: body.error
});
}
} else {
res.status(201).json({wallet: 'successful'});
}

@ -1 +1 @@
{"name":"RTL","loadingSpinner":false,"fixedHeader":false,"sidenavIsOpened":true,"sidenavIsPinned":true,"sidenavUserBlock":true,"menu":"vertical","menuType":"default","theme":"red-light","rtl":false}
{"name":"RTL","loadingSpinner":false,"fixedHeader":false,"sidenavIsOpened":true,"sidenavIsPinned":true,"sidenavUserBlock":true,"menu":"vertical","menuType":"default","theme":"indigo-light","rtl":false}
Loading…
Cancel
Save