Code Monkey home page Code Monkey logo

kwh's Introduction

kWh

The companion browser extension for c-lightning, Eclair and Ptarmigan nodes.

Install for Firefox Install for Chrome

Features

  • Browse balance and latest transactions;
  • webln support;
  • Pay highlighted invoice with a context menu click;
  • Handle lightning: links;
  • "Generate invoice here" context menu;
  • Manual payments and invoice creation;
  • Instant notifications on received payments;
  • No window popups, all interactions happen in the browserAction popup.

Requirements

Either

Caveats

  • If you are using Google Chrome, consider enabling the Experimental Extension APIs flag on chrome://flags for a better experience. Read more in this issue.
  • If you are using Eclair, the WebSocket won't connect on Firefox, so you won't get notifications when a payment is sent or received, the experience will not be as nice as if it did.

Build instructions

You'll need: Node.js>=10, npm, Make

npm install
make extension.zip

Icons made by smalllikeart from Flaticon and licensed by CC 3.0 BY.

kwh's People

Contributors

fiatjaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

kwh's Issues

Paying invoices stops working after some time

I'm using kwh with firefox 66.0.2 on NixOS with an autossh ssh tunnel to my spark wallet server. That means that the connection might be interrupted at times, but it'll be restored eventually.

When I start a fresh firefox instance lightning:<bolt11> links, ´webln´ calls and pasting invoices works. But after some time (so far always with a connection interruption due to sleep in between) these features stop working. I can still list my transactions and generate invoices.

I attached two screenshots: one trying to pay a pasted invoice (blank area) and one after clicking a lightning: link and opening the menu to confirm the payment.

2019-04-17-165049_3840x1080_scrot
2019-04-17-164953_3840x1080_scrot

Thank you for building this great plugin, I was waiting for Joule c-lightning support for some time, this is a good alternative.

Needed design improvements

This extension layout and classes was done in 5 minutes by a pragmatic programmer using only Tachyons classes.

If anyone out there knows how to build a simple and yet beautiful interface using the fewer elements possible that help would be very welcomed.

Marginal improvements would be great. For example, just modifying the layout a little or changing the default colors.

Detached tabs don't work on Firefox

Firefox webextensions framework has an issue with tabs that are detached from the main window. I know there shouldn't be the concept of a "main window" and that each tab is its own process, but for some reason there is.

What happens is that when the background script tries to query or send a message to a detached tab it fails.

I can replicate the bug many times but don't know how to fix it.

Reduce clicks to confirm payment

Currently if one clicks an invoice link there is the following workflow to confirm the payment:

  1. click away (or wait for it to go away) the notification which is blocking the extension's button
  2. open kwh
  3. confirm payment

I think that's more interaction than necessary, for example one could get from 3 to 1 clicks using these two approaches:

  1. add a button to the notification (seems possible according to the API docs, but I have no practical experience with JS/plugins)
  2. remove the notification and open the kwh menu instead (I don't know if that's actually possible)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.