We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e53398 commit 922ca4cCopy full SHA for 922ca4c
wallets/client/protocols/spark.js
@@ -26,7 +26,21 @@ async function withSdk (mnemonic, cb) {
26
}
27
28
export async function sendPayment (bolt11, { mnemonic }, { signal }) {
29
- // TODO(spark): implement
+ return await withSdk(
30
+ mnemonic,
31
+ async sdk => {
32
+ const prepareResponse = await sdk.prepareSendPayment({
33
+ paymentRequest: bolt11
34
+ })
35
+
36
+ const sendResponse = await sdk.sendPayment({
37
+ prepareResponse,
38
+ options: { type: 'bolt11Invoice', preferSpark: false }
39
40
41
+ return sendResponse.payment
42
+ }
43
+ )
44
45
46
export async function testSendPayment ({ mnemonic }, { signal }) {
0 commit comments