mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-12-06 17:27:59 +00:00
Remove ledger methods from Connection (#1543)
* remove ledger subscription from connection * remove more client ledger stuff * resolve TS concerns * fix all tests except broadcast tests * fix broadcast tests * clean up more ledger stuff in testing * respond to comments
This commit is contained in:
@@ -2,10 +2,8 @@ import assert from 'assert-diff'
|
||||
import _ from 'lodash'
|
||||
import {Client} from 'xrpl-local'
|
||||
import {RecursiveData} from 'xrpl-local/ledger/utils'
|
||||
import {assertRejects, assertResultMatch} from './utils'
|
||||
import {assertRejects} from './utils'
|
||||
import addresses from './fixtures/addresses.json'
|
||||
import responses from './fixtures/responses'
|
||||
import ledgerClosed from './fixtures/rippled/ledger-close-newer.json'
|
||||
import setupClient from './setup-client'
|
||||
|
||||
const {validate, schemaValidator, ledgerUtils} = Client._PRIVATE
|
||||
@@ -44,14 +42,6 @@ describe('Client', function () {
|
||||
// to test that connect() times out after 2 seconds.
|
||||
})
|
||||
|
||||
it('ledger closed event', function (done) {
|
||||
this.client.on('ledger', (message) => {
|
||||
assertResultMatch(message, responses.ledgerEvent, 'ledgerEvent')
|
||||
done()
|
||||
})
|
||||
this.client.connection._ws.emit('message', JSON.stringify(ledgerClosed))
|
||||
})
|
||||
|
||||
describe('[private] schema-validator', function () {
|
||||
it('valid', function () {
|
||||
assert.doesNotThrow(function () {
|
||||
|
||||
Reference in New Issue
Block a user