fix(funding-required): get bitcoin address from correct payment method

This commit is contained in:
Artur
2024-10-09 16:57:22 -03:00
parent c458edfdac
commit 352ceaf8aa

View File

@@ -137,10 +137,9 @@ async function handle(
const { data: paymentMethods } = await btcpayApi.get<BtcPayGetPaymentMethodsRes>(
`/invoices/${invoice.id}/payment-methods`
)
console.log(paymentMethods)
paymentMethods.forEach((paymentMethod) => {
if (paymentMethod.paymentMethod === 'BTC-OnChain') {
if (paymentMethod.paymentMethod === 'BTC') {
bitcoinAddress = paymentMethod.destination
}