Skip to content

Commit

Permalink
book: fix NIP-47 get balance display unit
Browse files Browse the repository at this point in the history
Update balance display unit to mSAT

Closes #779
Fixes 6c03bb2
Fixes 5745d76

Signed-off-by: Yuki Kishimoto <yukikishimoto@protonmail.com>
  • Loading branch information
yukibtc committed Feb 22, 2025
1 parent 75d56ee commit 2f064ae
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion book/snippets/js/src/nip47.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async function main() {

// Get balance
let balance = await nwc.getBalance();
console.log("Balance: " + balance + " SAT");
console.log("Balance", balance, "mSAT");

// Pay an invoice
let payInvoiceParams = new PayInvoiceRequest();
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/kotlin/src/main/kotlin/nip47.kt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ suspend fun nip47() {

// Get balance
val balance = nwc.getBalance()
println("Balance: $balance SAT")
println("Balance: $balance mSAT")

// Pay an invoice
val payInvoiceParams = PayInvoiceRequest(invoice = "lnbc...", amount = null, id = null)
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/python/src/nip47.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ async def main():

# Get balance
balance = await nwc.get_balance()
print(f"Balance: {balance} SAT")
print(f"Balance: {balance} mSAT")

# Pay an invoice
params = PayInvoiceRequest(invoice = "lnbc..", id = None, amount = None)
Expand Down
2 changes: 1 addition & 1 deletion book/snippets/rust/src/nip47.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub async fn run() -> Result<()> {

// Get balance
let balance = nwc.get_balance().await?;
println!("Balance: {balance} SAT");
println!("Balance: {balance} mSAT");

// Pay an invoice
let params = PayInvoiceRequest::new("lnbc..");
Expand Down

0 comments on commit 2f064ae

Please sign in to comment.