File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -28,17 +28,15 @@ export async function testSendPayment ({ mnemonic }, { signal }) {
2828 paymentMethod : { type : 'sparkAddress' }
2929 } )
3030
31- // check and register lightning address here so we can test it in the next step
31+ // check and register lightning address here
32+ // if we haven't already so we can test it in the next step
3233 // https://sdk-doc-spark.breez.technology/guide/receive_lnurl_pay.html
3334 const username = getUsername ( sparkAddress )
3435
35- // TODO(spark): don't check lightning address again if we already registered it
3636 const available = await sdk . checkLightningAddressAvailable ( { username } )
37- if ( ! available ) {
38- // TODO(spark): better error message for user? but this should never happen with randomly generated mnemonics, right?
39- throw new WalletValidationError ( 'lightning address unavailable' )
37+ if ( available ) {
38+ await sdk . registerLightningAddress ( { username, description : 'Running Spark SDK' } )
4039 }
41- await sdk . registerLightningAddress ( { username, description : 'Running Spark SDK' } )
4240
4341 sdk . disconnect ( )
4442
You can’t perform that action at this time.
0 commit comments