feat(bank/client): events for alert and notification

This commit is contained in:
chip committed 2020-11-04 16:15:50 +01:00
1 parent 198d9937ab
commit 8f0b6efd01
1 file changed
+12 -2
+12 -2
View File
@@ -32,12 +32,22 @@ on(`__cfx_nui:${events.BANK_ADD_TRANSFER}`, (data: any) => {
}, 500)
})
onNet(events.BANK_TRANSACTION_ALERT, (message: string, alert: string) => {
onNet(events.BANK_TRANSACTION_ALERT, (bool: boolean) => {
SendNuiMessage(
JSON.stringify({
app: 'BANK',
method: 'setAlert',
data: { message, alert }
data: bool
})
)
})
onNet(events.BANK_TRANSACTION_NOTIFICATION, (transfer: any) => {
SendNuiMessage(
JSON.stringify({
app: "BANK",
method: 'setNotification',
data: transfer
})
)
})