mirror of
https://github.com/aljazceru/breez-sdk-docs.git
synced 2025-12-18 06:14:21 +01:00
Change send_paymenet to use to msat
This commit is contained in:
committed by
Erdem Yerebasmaz
parent
04a91ade4b
commit
f717da5915
@@ -18,9 +18,9 @@ sdk.send_payment(bolt11.into(), None).await?;
|
|||||||
```swift
|
```swift
|
||||||
let bolt11 = "...";
|
let bolt11 = "...";
|
||||||
do {
|
do {
|
||||||
// The `amountSats` param is optional so nil can be passed if the
|
// The `amount_msat` param is optional and should only passed if the bolt11 doesn't specify an amount.
|
||||||
// bolt11 invoice spesifies an amount.
|
// The amount_msat is required in case an amount is not specified in the bolt11 invoice'.
|
||||||
let payment = try sdk.sendPayment(bolt11: bolt11, amountSats: 3000)
|
let payment = try sdk.sendPayment(bolt11: bolt11, amount_msat: 3000)
|
||||||
} catch {
|
} catch {
|
||||||
// handle error
|
// handle error
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ String bolt11 = "...";
|
|||||||
try {
|
try {
|
||||||
Payment payment = await sendPayment(
|
Payment payment = await sendPayment(
|
||||||
bolt11: bolt11,
|
bolt11: bolt11,
|
||||||
amountSats: 3000,
|
amount_msat: 3000,
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
// handle error
|
// handle error
|
||||||
@@ -75,9 +75,9 @@ try {
|
|||||||
```python
|
```python
|
||||||
bolt11 = "..."
|
bolt11 = "..."
|
||||||
try:
|
try:
|
||||||
# The `amountSats` param is optional so None can be passed if the
|
# The `amount_msat` param is optional and should only passed if the bolt11 doesn't specify an amount.
|
||||||
# bolt11 invoice spesifies an amount.
|
# The amount_msat is required in case an amount is not specified in the bolt11 invoice'.
|
||||||
sdk_services.send_payment(bolt11=bolt11, amount_sats=None)
|
sdk_services.send_payment(bolt11=bolt11, amount_msat=None)
|
||||||
except Exception as error:
|
except Exception as error:
|
||||||
# Handle error
|
# Handle error
|
||||||
```
|
```
|
||||||
@@ -88,8 +88,8 @@ except Exception as error:
|
|||||||
|
|
||||||
```go
|
```go
|
||||||
bolt11 := "bolt11 invoice"
|
bolt11 := "bolt11 invoice"
|
||||||
amountSats := uint64(3000)
|
amount_msat := uint64(3000)
|
||||||
if payment, err := sdk.SendPayment(bolt11, &amountSats); err == nil {
|
if payment, err := sdk.SendPayment(bolt11, &amount_msat); err == nil {
|
||||||
log.Printf("%#v", payment)
|
log.Printf("%#v", payment)
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user