Skip to content

Commit

Permalink
Disable Moonpay selling for USDC
Browse files Browse the repository at this point in the history
Moonpay now only accepts the new native USDC for deposits.
  • Loading branch information
sisou committed Dec 14, 2023
1 parent d46d9cd commit da563d8
Show file tree
Hide file tree
Showing 12 changed files with 144 additions and 141 deletions.
4 changes: 3 additions & 1 deletion src/components/layouts/Sidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,9 @@ export default defineComponent({
const { activeCurrency } = useAccountStore();
const canSellCryptoWithMoonpay = computed(() => activeCurrency.value !== CryptoCurrency.NIM);
const canSellCryptoWithMoonpay = computed(
() => activeCurrency.value !== CryptoCurrency.NIM && activeCurrency.value !== CryptoCurrency.USDC,
);
return {
navigateTo,
Expand Down
8 changes: 4 additions & 4 deletions src/components/modals/MoonpayModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ export default defineComponent({
// for legacy or non-bitcoin-activated accounts.
const btcAddress = useBtcAddressStore().availableExternalAddresses.value[0] as string | undefined;
// Having a USDC address must be optional, so that the widget also works
// for legacy or non-polygon-activated accounts.
const usdcAddress = useUsdcAddressStore().activeAddress.value;
// // Having a USDC address must be optional, so that the widget also works
// // for legacy or non-polygon-activated accounts.
// const usdcAddress = useUsdcAddressStore().activeAddress.value;
const walletAddresses = {
// Remove spaces in NIM address, as spaces are invalid URI components
nim: useAddressStore().state.activeAddress?.replace(/\s/g, ''),
...(btcAddress ? { btc: btcAddress } : {}),
...(usdcAddress ? { usdc_polygon: usdcAddress } : {}),
// ...(usdcAddress ? { usdc_polygon: usdcAddress } : {}),
};
const { config } = useConfig();
Expand Down
9 changes: 5 additions & 4 deletions src/components/modals/MoonpaySellInfoModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
</header>

<main class="flex-column">
<h1 class="nq-h1">{{ $t('Sell BTC and USDC') }}</h1>
<!-- <h1 class="nq-h1">{{ $t('Sell BTC and USDC') }}</h1> -->
<h1 class="nq-h1">{{ $t('Sell BTC') }}</h1>
<p class="subline">{{ $t('MoonPay is a third-party service requiring registration and KYC.') }}</p>
<div class="crypto-logos flex-row">
<BitcoinIcon />
<UsdcIcon />
<!-- <UsdcIcon /> -->
</div>
<p class="fees flex-row">
{{ $t('{percentage} fees', { percentage: '1%'}) }}
Expand Down Expand Up @@ -46,7 +47,7 @@ import { defineComponent } from '@vue/composition-api';
import { PageBody, PageFooter, FiatAmount } from '@nimiq/vue-components';
import Modal from './Modal.vue';
import BitcoinIcon from '../icons/BitcoinIcon.vue';
import UsdcIcon from '../icons/UsdcIcon.vue';
// import UsdcIcon from '../icons/UsdcIcon.vue';
import { useFiatStore } from '../../stores/Fiat';
import { FiatCurrency } from '../../lib/Constants';
Expand All @@ -64,7 +65,7 @@ export default defineComponent({
PageBody,
PageFooter,
BitcoinIcon,
UsdcIcon,
// UsdcIcon,
FiatAmount,
},
});
Expand Down
28 changes: 14 additions & 14 deletions src/i18n/de.po
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ msgstr "{fee} Gebühr"
msgid "{perc}% of swap value."
msgstr "{perc}% des Tauschwerts."

#: src/components/modals/MoonpaySellInfoModal.vue:20
#: src/components/modals/MoonpaySellInfoModal.vue:21
msgid "{percentage} fees"
msgstr ""

Expand All @@ -98,7 +98,7 @@ msgstr "{value} verbleibend"
msgid "+ {count} more | + {count} more"
msgstr "+ {count} weitere | + {count} weitere"

#: src/components/modals/MoonpaySellInfoModal.vue:33
#: src/components/modals/MoonpaySellInfoModal.vue:34
msgid "+ network fees"
msgstr "+ Netzwerk­gebühren"

Expand Down Expand Up @@ -301,7 +301,7 @@ msgstr ""
"Jetzt aktualisieren um alle neuen Funktionen nutzen zu können. Es dauert "
"auch wirklich nur ein paar Sekunden!"

#: src/components/layouts/AddressOverview.vue:198
#: src/components/layouts/AddressOverview.vue:201
msgid ""
"All swaps are part of your transaction history and feature a small swap "
"icon."
Expand Down Expand Up @@ -663,7 +663,7 @@ msgstr "Klicke hier für mehr infos"
msgid "Click on ‘Troubleshooting’ to learn more."
msgstr "Klicke auf 'Fehlerbehebung' um mehr zu erfahren."

#: src/components/layouts/AddressOverview.vue:200
#: src/components/layouts/AddressOverview.vue:203
#: src/components/swap/SwapAnimation.vue:105
msgid "Close"
msgstr "Schließen"
Expand Down Expand Up @@ -757,7 +757,7 @@ msgstr "Weiter"
msgid "Continue Swap"
msgstr "Tausch fortsetzen"

#: src/components/modals/MoonpaySellInfoModal.vue:38
#: src/components/modals/MoonpaySellInfoModal.vue:39
msgid "Continue with Moonpay"
msgstr ""

Expand Down Expand Up @@ -1396,7 +1396,7 @@ msgstr "Mehr erfahren"
msgid "Learn more here"
msgstr "Hier erfährst du mehr"

#: src/components/layouts/AddressOverview.vue:185
#: src/components/layouts/AddressOverview.vue:188
msgid "Let's get started! Create your Nimiq account:"
msgstr "Los geht's! Erstelle jetzt dein Nimiq-Konto:"

Expand Down Expand Up @@ -1492,7 +1492,7 @@ msgstr "Höchst-Tauschbetrag ist {amount}"
#: src/components/modals/BuyOptionsModal.vue:31
#: src/components/modals/BuyOptionsModal.vue:48
#: src/components/modals/BuyOptionsModal.vue:67
#: src/components/modals/MoonpaySellInfoModal.vue:24
#: src/components/modals/MoonpaySellInfoModal.vue:25
#: src/components/swap/SwapFeesTooltip.vue:23
msgid "min {amount}"
msgstr "min {amount}"
Expand All @@ -1505,7 +1505,7 @@ msgstr "Mindest-Kaufbetrag ist {amount}"
msgid "Mobile phone"
msgstr "Handy"

#: src/components/modals/MoonpaySellInfoModal.vue:14
#: src/components/modals/MoonpaySellInfoModal.vue:15
msgid "MoonPay is a third-party service requiring registration and KYC."
msgstr ""

Expand Down Expand Up @@ -1538,7 +1538,7 @@ msgstr "Benenne den Empfänger..."
msgid "Name your contact"
msgstr "Benenne deinen Kontakt"

#: src/components/layouts/AddressOverview.vue:151
#: src/components/layouts/AddressOverview.vue:154
msgid "Native Polygon USDC"
msgstr ""

Expand Down Expand Up @@ -1988,8 +1988,8 @@ msgstr ""
msgid "Sell"
msgstr "Verkaufen"

#: src/components/modals/MoonpaySellInfoModal.vue:13
msgid "Sell BTC and USDC"
#: src/components/modals/MoonpaySellInfoModal.vue:14
msgid "Sell BTC"
msgstr ""

#: src/components/modals/SellCryptoModal.vue:180
Expand Down Expand Up @@ -2079,7 +2079,7 @@ msgstr "Sende USDC"
msgid "Send, receive and hold BTC in your wallet."
msgstr "Sende, empfange und verwahre BTC in deiner Wallet."

#: src/components/layouts/AddressOverview.vue:158
#: src/components/layouts/AddressOverview.vue:161
msgid "Sending Native Polygon USDC is not yet supported."
msgstr ""

Expand Down Expand Up @@ -2202,7 +2202,7 @@ msgstr "Wiederherstellungswörter anzeigen"
msgid "Show values as {currency}"
msgstr "Zeige Werte in {currency}"

#: src/components/layouts/AddressOverview.vue:186
#: src/components/layouts/AddressOverview.vue:189
msgid "Signup"
msgstr "Anmelden"

Expand Down Expand Up @@ -2925,7 +2925,7 @@ msgstr ""
msgid "Your payout is on its way"
msgstr "Deine Auszahlung ist unterwegs"

#: src/components/layouts/AddressOverview.vue:194
#: src/components/layouts/AddressOverview.vue:197
msgid "Your swap was successful!"
msgstr "Dein Tausch war erfolgreich!"

Expand Down
28 changes: 14 additions & 14 deletions src/i18n/en.po
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ msgstr ""
msgid "{perc}% of swap value."
msgstr ""

#: src/components/modals/MoonpaySellInfoModal.vue:20
#: src/components/modals/MoonpaySellInfoModal.vue:21
msgid "{percentage} fees"
msgstr ""

Expand All @@ -86,7 +86,7 @@ msgstr ""
msgid "+ {count} more | + {count} more"
msgstr ""

#: src/components/modals/MoonpaySellInfoModal.vue:33
#: src/components/modals/MoonpaySellInfoModal.vue:34
msgid "+ network fees"
msgstr ""

Expand Down Expand Up @@ -274,7 +274,7 @@ msgstr ""
msgid "All new features are exclusive to new accounts. Upgrade now, it only takes seconds."
msgstr ""

#: src/components/layouts/AddressOverview.vue:198
#: src/components/layouts/AddressOverview.vue:201
msgid "All swaps are part of your transaction history and feature a small swap icon."
msgstr ""

Expand Down Expand Up @@ -601,7 +601,7 @@ msgstr ""
msgid "Click on ‘Troubleshooting’ to learn more."
msgstr ""

#: src/components/layouts/AddressOverview.vue:200
#: src/components/layouts/AddressOverview.vue:203
#: src/components/swap/SwapAnimation.vue:105
msgid "Close"
msgstr ""
Expand Down Expand Up @@ -696,7 +696,7 @@ msgstr ""
msgid "Continue Swap"
msgstr ""

#: src/components/modals/MoonpaySellInfoModal.vue:38
#: src/components/modals/MoonpaySellInfoModal.vue:39
msgid "Continue with Moonpay"
msgstr ""

Expand Down Expand Up @@ -1269,7 +1269,7 @@ msgstr ""
msgid "Learn more here"
msgstr ""

#: src/components/layouts/AddressOverview.vue:185
#: src/components/layouts/AddressOverview.vue:188
msgid "Let's get started! Create your Nimiq account:"
msgstr ""

Expand Down Expand Up @@ -1359,7 +1359,7 @@ msgstr ""
#: src/components/modals/BuyOptionsModal.vue:31
#: src/components/modals/BuyOptionsModal.vue:48
#: src/components/modals/BuyOptionsModal.vue:67
#: src/components/modals/MoonpaySellInfoModal.vue:24
#: src/components/modals/MoonpaySellInfoModal.vue:25
#: src/components/swap/SwapFeesTooltip.vue:23
msgid "min {amount}"
msgstr ""
Expand All @@ -1372,7 +1372,7 @@ msgstr ""
msgid "Mobile phone"
msgstr ""

#: src/components/modals/MoonpaySellInfoModal.vue:14
#: src/components/modals/MoonpaySellInfoModal.vue:15
msgid "MoonPay is a third-party service requiring registration and KYC."
msgstr ""

Expand Down Expand Up @@ -1404,7 +1404,7 @@ msgstr ""
msgid "Name your contact"
msgstr ""

#: src/components/layouts/AddressOverview.vue:151
#: src/components/layouts/AddressOverview.vue:154
msgid "Native Polygon USDC"
msgstr ""

Expand Down Expand Up @@ -1815,8 +1815,8 @@ msgstr ""
msgid "Sell"
msgstr ""

#: src/components/modals/MoonpaySellInfoModal.vue:13
msgid "Sell BTC and USDC"
#: src/components/modals/MoonpaySellInfoModal.vue:14
msgid "Sell BTC"
msgstr ""

#: src/components/modals/SellCryptoModal.vue:180
Expand Down Expand Up @@ -1898,7 +1898,7 @@ msgstr ""
msgid "Send, receive and hold BTC in your wallet."
msgstr ""

#: src/components/layouts/AddressOverview.vue:158
#: src/components/layouts/AddressOverview.vue:161
msgid "Sending Native Polygon USDC is not yet supported."
msgstr ""

Expand Down Expand Up @@ -2020,7 +2020,7 @@ msgstr ""
msgid "Show values as {currency}"
msgstr ""

#: src/components/layouts/AddressOverview.vue:186
#: src/components/layouts/AddressOverview.vue:189
msgid "Signup"
msgstr ""

Expand Down Expand Up @@ -2654,7 +2654,7 @@ msgstr ""
msgid "Your payout is on its way"
msgstr ""

#: src/components/layouts/AddressOverview.vue:194
#: src/components/layouts/AddressOverview.vue:197
msgid "Your swap was successful!"
msgstr ""

Expand Down
Loading

0 comments on commit da563d8

Please sign in to comment.