Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/(mobile-ui)/history/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const HistoryPage = () => {
return (
<div className="mx-auto mt-6 w-full space-y-3 md:max-w-2xl">
<h2 className="text-base font-bold">Transactions</h2>{' '}
<EmptyState icon="alert" title="Error loading transactions!" description="Please try again later" />
<EmptyState icon="alert" title="Error loading transactions!" description="Please contact support." />
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/AddWithdraw/AddWithdrawCountriesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ const AddWithdrawCountriesList = ({ flow }: AddWithdrawCountriesListProps) => {
return { error: result.error }
}
if (!result.data) {
return { error: 'Failed to process bank account. Please try again.' }
return { error: 'Failed to process bank account. Please try again or contact support.' }
}

// after successfully adding, we refetch user data to get the new account
Expand Down
6 changes: 3 additions & 3 deletions src/components/Common/ActionListDaimoPayButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ActionListDaimoPayButton = () => {

if (!parsedPaymentData) {
console.error('Invalid payment data')
dispatch(paymentActions.setError('Something went wrong. Please try again.'))
dispatch(paymentActions.setError('Something went wrong. Please try again or contact support.'))
return false
}

Expand Down Expand Up @@ -69,12 +69,12 @@ const ActionListDaimoPayButton = () => {
console.log('Charge created!!')
return true
} else if (result.status === 'Error') {
dispatch(paymentActions.setError('Something went wrong. Please try again.'))
dispatch(paymentActions.setError('Something went wrong. Please try again or contact support.'))
console.error('Payment initiation failed:', result)
return false
} else {
console.warn('Unexpected status from usePaymentInitiator:', result.status)
dispatch(paymentActions.setError('Something went wrong. Please try again.'))
dispatch(paymentActions.setError('Something went wrong. Please try again or contact support.'))
return false
}
}, [
Expand Down
2 changes: 1 addition & 1 deletion src/components/Home/HomeHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ const HomeHistory = ({ isPublic = false, username }: { isPublic?: boolean; usern
return (
<div className="mx-auto mt-6 w-full space-y-3 md:max-w-2xl">
<h2 className="text-base font-bold">Recent Transactions</h2>{' '}
<EmptyState icon="alert" title="Error loading transactions!" description="Please try again later" />
<EmptyState icon="alert" title="Error loading transactions!" description="Please contact Support." />
</div>
)
}
Expand Down
4 changes: 3 additions & 1 deletion src/components/Payment/Views/Confirm.payment.view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ export default function ConfirmPaymentView({
dispatch(paymentActions.setChargeDetails(null))
})
} else if (!chargeIdFromUrl && !chargeDetails) {
dispatch(paymentActions.setError('Payment details are missing. Please go back and try again.'))
dispatch(
paymentActions.setError('Payment details are missing. Please go back and try again or contact support.')
)
}
}, [chargeIdFromUrl, chargeDetails, dispatch])

Expand Down
2 changes: 1 addition & 1 deletion src/components/PintaReqPay/PintaReqViewWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const PintaReqViewWrapper = ({ children, view }: PintaReqViewWrapperProps) => {
},
ERROR: {
title: 'There was an error',
description: 'Please try again later.',
description: 'Please contact Support.',
},
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/Setup/Views/Signup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const SignupStep = () => {
return false
}
} catch (err) {
setError('Failed to check handle availability. Please try again.')
setError('Failed to check handle availability. Please try again or contact support.')
return false
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/constants/general.consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,4 +201,4 @@ export const pathTitles: { [key: string]: string } = {
export const STABLE_COINS = ['USDC', 'USDT', 'DAI', 'BUSD']

export const ROUTE_NOT_FOUND_ERROR =
'No route found for this token pair. You can try with a different token pair, or try again later'
'No route found for this token pair. You can try with a different token pair, or contact support.'
2 changes: 1 addition & 1 deletion src/hooks/useCreateOnramp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const useCreateOnramp = (): UseCreateOnrampReturn => {
return onrampData
} catch (error) {
console.error('Error creating onramp:', error)
setError('Failed to create bank transfer. Please try again.')
setError('Failed to create bank transfer. Please try again or contact support.')
throw error
} finally {
setIsLoading(false)
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/useKycFlow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ export const useKycFlow = ({ onKycSuccess, flow, onManualClose }: UseKycFlowOpti
closeConfirmMessage: 'Are you sure? Your KYC progress will be lost.',
})
} else {
const errorMsg = 'Could not retrieve verification links. Please try again.'
const errorMsg = 'Could not retrieve verification links. Please contact support.'
setError(errorMsg)
return { success: false, error: errorMsg }
}
Expand Down
28 changes: 14 additions & 14 deletions src/utils/sdkErrorHandler.utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,36 +12,36 @@ export const ErrorHandler = (error: any) => {
case peanut.interfaces.ESignAndSubmitTx.ERROR_INSUFFICIENT_NATIVE_TOKEN:
return 'Insufficient funds to complete the transaction.'
case peanut.interfaces.ECreateLinkStatusCodes.ERROR_GETTING_LINKS_FROM_TX:
return 'Something went wrong while getting the links from the transaction. Please try again later.'
return 'Something went wrong while getting the links from the transaction. Please contact support.'
case peanut.interfaces.ECreateLinkStatusCodes.ERROR_SIGNING_AND_SUBMITTING_TX:
return 'Something went wrong while signing and submitting the transaction. Please try again later.'
return 'Something went wrong while signing and submitting the transaction. Please contact support.'
case peanut.interfaces.ECreateLinkStatusCodes.ERROR_PREPARING_TX:
return 'Something went wrong while preparing the transaction. Please try again later.'
return 'Something went wrong while preparing the transaction. Please contact support.'
case peanut.interfaces.EClaimLinkStatusCodes.ERROR:
return 'Something went wrong while claiming. Please try again later.'
return 'Something went wrong while claiming. Please contact support.'
case peanut.interfaces.EGetLinkFromTxStatusCodes.ERROR_GETTING_TX_RECEIPT_FROM_HASH:
return 'Something went wrong while getting the transaction receipt from hash. Please try again later.'
return 'Something went wrong while getting the transaction receipt from hash. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_ESTIMATING_GAS_LIMIT:
return 'Something went wrong while estimating gas limit. Please try again later.'
return 'Something went wrong while estimating gas limit. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_GETTING_TX_COUNT:
return 'Something went wrong while getting the transaction count. Please try again later.'
return 'Something went wrong while getting the transaction count. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_MAKING_DEPOSIT:
return 'Something went wrong while making the deposit. Please try again later.'
return 'Something went wrong while making the deposit. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_PREPARING_APPROVE_ERC1155_TX:
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_PREPARING_APPROVE_ERC20_TX:
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_PREPARING_APPROVE_ERC721_TX:
return 'Something went wrong while preparing the approval transaction. Please try again later.'
return 'Something went wrong while preparing the approval transaction. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_SETTING_FEE_OPTIONS:
return 'Something went wrong while setting the fee options. Please try again later.'
return 'Something went wrong while setting the fee options. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_GETTING_DEFAULT_PROVIDER:
return 'Something went wrong while getting the default provider. Please try again later.'
return 'Something went wrong while getting the default provider. Please contact support.'
case peanut.interfaces.EPrepareCreateTxsStatusCodes.ERROR_VALIDATING_LINK_DETAILS:
return 'Something went wrong while validating the link details. Please try again later.'
return 'Something went wrong while validating the link details. Please contact support.'
case peanut.interfaces.ESignAndSubmitTx.ERROR_BROADCASTING_TX:
return 'Something went wrong while broadcasting the transaction. Please try again later.'
return 'Something went wrong while broadcasting the transaction. Please contact support.'

default:
return 'Something went wrong. Please try again later.'
return 'Something went wrong. Please contact support.'
}
} else {
console.log(error.toString())
Expand Down
Loading