Removed unused/buggy accountReserve

This commit is contained in:
AlexanderBuzz
2023-08-07 12:14:52 +02:00
parent da186bd2d6
commit b7cf61d02b
18 changed files with 13 additions and 64 deletions

View File

@@ -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}])