add error handler for payment request
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "no-copy-frontend",
|
||||
"version": "0.76.0",
|
||||
"version": "0.77.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev -p 2999",
|
||||
|
||||
@@ -378,6 +378,10 @@ export async function createPayoutRequest(
|
||||
throw JSON.parse(responseText)?.message;
|
||||
}
|
||||
|
||||
if (response.status === 409) {
|
||||
throw 'insufficient-funds-to-receive-payment'
|
||||
}
|
||||
|
||||
if (response.ok) {
|
||||
const parsed = await response.json();
|
||||
console.log(parsed);
|
||||
@@ -403,6 +407,9 @@ export async function createPayoutRequest(
|
||||
case 'Min sum for pay 1000':
|
||||
typedError = 'min-sum-for-payout-1000';
|
||||
break;
|
||||
case 'insufficient-funds-to-receive-payment':
|
||||
typedError = 'insufficient-funds-to-receive-payment';
|
||||
break;
|
||||
default:
|
||||
typedError = 'payment-error';
|
||||
}
|
||||
|
||||
@@ -550,7 +550,7 @@ export default function VerificationUploadSection({
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{
|
||||
{/* {
|
||||
(fileType === 'image' && file.preview) && (
|
||||
<div
|
||||
className="image-preview-wrapper"
|
||||
@@ -565,7 +565,7 @@ export default function VerificationUploadSection({
|
||||
</div>
|
||||
|
||||
)
|
||||
}
|
||||
} */}
|
||||
|
||||
{
|
||||
file.status === 'pending' && (
|
||||
|
||||
@@ -389,7 +389,8 @@
|
||||
"deselect": "Deselect",
|
||||
"select-all": "Select all",
|
||||
"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"
|
||||
"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"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "and",
|
||||
|
||||
@@ -389,7 +389,8 @@
|
||||
"deselect": "Снять выделение",
|
||||
"select-all": "Выбрать все",
|
||||
"text-area-error-fill-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": "Недостаточно средств получения выплаты"
|
||||
},
|
||||
"Login-register-form": {
|
||||
"and": "и",
|
||||
|
||||
Reference in New Issue
Block a user