mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-11 07:15:49 +00:00
29 lines
889 B
JavaScript
29 lines
889 B
JavaScript
const { contextBridge, ipcRenderer } = require('electron');
|
|
|
|
contextBridge.exposeInMainWorld('electronAPI', {
|
|
// Step 5 code additions - start
|
|
onOpenSeedDialog: (callback) => {
|
|
ipcRenderer.on('open-seed-dialog', callback)
|
|
},
|
|
onEnterSeed: (seed) => {
|
|
ipcRenderer.send('seed-entered', seed)
|
|
},
|
|
onOpenPasswordDialog: (callback) => {
|
|
ipcRenderer.on('open-password-dialog', callback)
|
|
},
|
|
onEnterPassword: (password) => {
|
|
ipcRenderer.send('password-entered', password)
|
|
},
|
|
// Step 5 code additions - end
|
|
|
|
onUpdateLedgerData: (callback) => {
|
|
ipcRenderer.on('update-ledger-data', callback)
|
|
},
|
|
onUpdateAccountData: (callback) => {
|
|
ipcRenderer.on('update-account-data', callback)
|
|
},
|
|
onUpdateTransactionData: (callback) => {
|
|
ipcRenderer.on('update-transaction-data', callback)
|
|
}
|
|
})
|