diff --git a/src/app/actions/referralsActions.ts b/src/app/actions/referralsActions.ts index 49dfe8f..69c42dc 100644 --- a/src/app/actions/referralsActions.ts +++ b/src/app/actions/referralsActions.ts @@ -385,6 +385,10 @@ export async function createPayoutRequest( if (responseText.includes('Not have money for payout')) { throw 'insufficient-funds-to-receive-payment' } + + if (responseText.includes('Not found payout method')) { + throw 'not-found-payout-method' + } } if (response.ok) { @@ -415,6 +419,9 @@ export async function createPayoutRequest( case 'insufficient-funds-to-receive-payment': typedError = 'insufficient-funds-to-receive-payment'; break; + case 'not-found-payout-method': + typedError = 'not-found-payout-method'; + break default: typedError = 'payment-error'; } diff --git a/src/i18n/messages/en.json b/src/i18n/messages/en.json index 37a5569..b4b9d40 100644 --- a/src/i18n/messages/en.json +++ b/src/i18n/messages/en.json @@ -392,6 +392,7 @@ "text-area-error-fill-complaint-text": "Fill out the complaint text", "to-view-a-file-match-click-on-the-card-from-the-list": "To view a file match, click on the card from the list", "insufficient-funds-to-receive-payment": "Insufficient funds to receive payment", + "not-found-payout-method": "Not found payout method", "failed-to-delete-bank-card": "Failed to delete bank card", "bank-card-has-been-successfully-deleted": "The bank card has been successfully deleted", "linked-bank-cards": "Linked bank cards", diff --git a/src/i18n/messages/ru.json b/src/i18n/messages/ru.json index 7ff5e2e..4dc1212 100644 --- a/src/i18n/messages/ru.json +++ b/src/i18n/messages/ru.json @@ -392,6 +392,7 @@ "text-area-error-fill-complaint-text": "Заполните текст жалобы", "to-view-a-file-match-click-on-the-card-from-the-list": "Для просмотра совпадения по файлу нажмите на карточку из списка", "insufficient-funds-to-receive-payment": "Недостаточно средств для получения выплаты", + "not-found-payout-method": "Метод выплаты не найден", "failed-to-delete-bank-card": "Не удалось удалить банковскую карту", "bank-card-has-been-successfully-deleted": "Банковская карта успешно удалена", "linked-bank-cards": "Привязанные банковские карты",