Comments (3)
Implementing this was pretty straightforward so I went ahead and made the BTC display unit configurable using a new metadata.checkout.display_unit
field. It can be set to one of msat
, sat
, bit
, milli
or btc
. For example:
$ curl $CHARGE/invoice -d msatoshi=150000 -d metadata[checkout][display_unit]=bit
Or with json:
$ curl $CHARGE/invoice -H 'Content-Type: application/json' -d '{"msatoshi":150000,"metadata":{"checkout":{"display_unit":"bit"}}}'
I also changed the default display unit to satoshis.
Cheers!
from lightning-charge.
I'm happy to implement this myself, but would like to get some discussion going first on how this should function.
from lightning-charge.
Great job! Closing this out and opening ElementsProject/wordpress-lightning-publisher#8 to track in Wordpress Lightning Publisher
from lightning-charge.
Related Issues (20)
- shesek/lightning-charge (standalone) is unable to start HOT 2
- shesek/lightning-charge:standalone - unable to start HOT 8
- Support for v0.8.0? HOT 3
- Look for lightning-rpc in the network subdirectory if it does not exists in the parent LN_PATH
- Change price from Bitcoin Average? HOT 2
- Weird 'forbidden' error HOT 2
- Can you use tini in the dockerfiles? HOT 1
- Adopt to changed lightningd api HOT 4
- Docker image error HOT 2
- Docker container stops on boot using latest version of charged HOT 3
- Support for v0.10.0? HOT 1
- Lightning Charge container keeps restarting in docker , ARM64 HOT 2
- Toks
- gyp: Undefined variable module_name in binding.gyp while trying to load binding.gyp HOT 4
- Unable to run Docker with existing bitcoind/lightningd
- build fail
- lightning-charge not answering
- Add lightning-network as a topic to this repository
- Compatibility with Core-Lightning v23.05 HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lightning-charge.