diff --git a/phone/src/apps/bank/hooks/useBankService.ts b/phone/src/apps/bank/hooks/useBankService.ts index 75ab4b9..b31cb0a 100644 --- a/phone/src/apps/bank/hooks/useBankService.ts +++ b/phone/src/apps/bank/hooks/useBankService.ts @@ -25,7 +25,7 @@ export const useBankService = () => { useNuiEvent('BANK', BankEvents.SEND_TRANSFERS, setTransaction); useNuiEvent('BANK', BankEvents.SEND_CREDENTIALS, setCredentials); - useNuiEvent('BANK', PhoneEvents.SET_ALERT, handleAddAlert); - useNuiEvent('BANK', PhoneEvents.SET_NOTIFICATION, setNotification); + useNuiEvent('BANK', BankEvents.SEND_ALERT, handleAddAlert); + useNuiEvent('BANK', BankEvents.SEND_NOTIFICATION, setNotification); return { useTransactions, useCredentials, useBankNotification }; }; diff --git a/resources/client/cl_bank.ts b/resources/client/cl_bank.ts index 63c9c5a..495fdd6 100644 --- a/resources/client/cl_bank.ts +++ b/resources/client/cl_bank.ts @@ -36,7 +36,7 @@ onNet(BankEvents.TRANSACTION_ALERT, (result: IAlertProps) => { SendNuiMessage( JSON.stringify({ app: 'BANK', - method: PhoneEvents.SET_ALERT, + method: BankEvents.SEND_ALERT, data: result, }), ); @@ -46,7 +46,7 @@ onNet(BankEvents.TRANSACTION_NOTIFICATION, (transfer: any) => { SendNuiMessage( JSON.stringify({ app: 'BANK', - method: PhoneEvents.SET_NOTIFICATION, + method: BankEvents.SEND_NOTIFICATION, data: transfer, }), ); diff --git a/typings/bank.ts b/typings/bank.ts index adcad62..328ca9a 100644 --- a/typings/bank.ts +++ b/typings/bank.ts @@ -27,4 +27,6 @@ export enum BankEvents { TRANSACTION_NOTIFICATION = 'npwd:bankTransactionNotification', SEND_CREDENTIALS = 'npwd:sendBankCredentials', GET_CREDENTIALS = 'npwd:getBankCredentials', + SEND_ALERT = 'npwd:sendBankAlert', + SEND_NOTIFICATION = 'npwd:sendBankNotification', }