mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-29 16:15:48 +00:00
Removed unused/buggy accountReserve
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
const {app, BrowserWindow, ipcMain} = require('electron')
|
||||
const path = require('path')
|
||||
const xrpl = require("xrpl")
|
||||
const { prepareReserve, prepareAccountData, prepareLedgerData} = require('../library/3_helpers')
|
||||
const { prepareAccountData, prepareLedgerData} = require('../library/3_helpers')
|
||||
const { prepareTxData } = require('../library/4_helpers')
|
||||
|
||||
const TESTNET_URL = "wss://s.altnet.rippletest.net:51233"
|
||||
@@ -26,8 +26,6 @@ const main = async () => {
|
||||
|
||||
ipcMain.on('address-entered', async (event, address) => {
|
||||
|
||||
let reserve = null
|
||||
|
||||
const client = new xrpl.Client(TESTNET_URL)
|
||||
|
||||
await client.connect()
|
||||
@@ -41,7 +39,6 @@ const main = async () => {
|
||||
|
||||
// Reference: https://xrpl.org/subscribe.html#ledger-stream
|
||||
client.on("ledgerClosed", async (rawLedgerData) => {
|
||||
reserve = prepareReserve(rawLedgerData)
|
||||
const ledger = prepareLedgerData(rawLedgerData)
|
||||
appWindow.webContents.send('update-ledger-data', ledger)
|
||||
})
|
||||
@@ -56,7 +53,7 @@ const main = async () => {
|
||||
}
|
||||
|
||||
const accountInfoResponse = await client.request(accountInfoRequest)
|
||||
const accountData = prepareAccountData(accountInfoResponse.result.account_data, reserve)
|
||||
const accountData = prepareAccountData(accountInfoResponse.result.account_data)
|
||||
appWindow.webContents.send('update-account-data', accountData)
|
||||
|
||||
const transactions = prepareTxData([{tx: transaction.transaction}])
|
||||
|
||||
Reference in New Issue
Block a user