diff --git a/CHANGELOG.md b/CHANGELOG.md index 3e4576736b0..e543f826e1e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - added: "Change Username" setting - added: Support for Zano alias name resolution. +- added: Add `walletAddress` param to Moonpay buy quotes. - changed: Don't allow multiple pending EVM transactions. ## 4.30.0 (2025-06-24) diff --git a/src/plugins/gui/providers/moonpayProvider.ts b/src/plugins/gui/providers/moonpayProvider.ts index 9bb8ca50c4b..dc92fc9c4ae 100644 --- a/src/plugins/gui/providers/moonpayProvider.ts +++ b/src/plugins/gui/providers/moonpayProvider.ts @@ -539,8 +539,14 @@ export const moonpayProvider: FiatProviderFactory = { const fiatCode = removeIsoPrefix(params.fiatCurrencyCode).toLowerCase() let url + const walletAddress = ( + await params.wallet?.getAddresses({ tokenId: null }) + )?.[0]?.publicAddress + const walletAddressParam = + walletAddress == null ? '' : `&walletAddress=${walletAddress}` + if (direction === 'buy') { - url = `https://api.moonpay.com/v3/currencies/${cryptoCurrencyObj.code}/buy_quote/?apiKey=${apiKey}"eCurrencyCode=${cryptoCurrencyObj.code}&baseCurrencyCode=${fiatCode}&paymentMethod=${paymentMethod}&areFeesIncluded=true&${amountParam}` + url = `https://api.moonpay.com/v3/currencies/${cryptoCurrencyObj.code}/buy_quote/?apiKey=${apiKey}"eCurrencyCode=${cryptoCurrencyObj.code}&baseCurrencyCode=${fiatCode}&paymentMethod=${paymentMethod}&areFeesIncluded=true&${amountParam}${walletAddressParam}` } else { url = `https://api.moonpay.com/v3/currencies/${cryptoCurrencyObj.code}/sell_quote/?apiKey=${apiKey}"eCurrencyCode=${fiatCode}&payoutMethod=${paymentMethod}&areFeesIncluded=true&${amountParam}` }