Skip to content

Commit

Permalink
Merge pull request #1 from utxo-one/dev-tryCatchPayment
Browse files Browse the repository at this point in the history
try catch lightning payments
  • Loading branch information
utxo-one authored Jul 4, 2023
2 parents ded5bb0 + 49047e6 commit 9fe1377
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/LightningPrism.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ public function zap(): array
$responses = [];
foreach($this->settings->getSettings() as $lightningAddress => $percentage) {
$satsAmount = round($this->amount * ($percentage / 100));
$responses[$lightningAddress] = $this->payLightningAddress($satsAmount, $lightningAddress);
try {
$responses[$lightningAddress] = $this->payLightningAddress($satsAmount, $lightningAddress);
} catch (\Exception $e) {
$responses[$lightningAddress] = $e->getMessage();
}
}

return $responses;
Expand Down

0 comments on commit 9fe1377

Please sign in to comment.