ripple-binary-codec refactor (#88)

Refactored all components in ripple-binary-codec /src
This commit is contained in:
Nathan Nichols
2020-07-31 09:14:11 -05:00
parent 383ab88d62
commit 2e6c68ba73
37 changed files with 1932 additions and 1707 deletions

View File

@@ -1,5 +1,4 @@
const fs = require('fs')
const { parseBytes } = require('../dist/utils/bytes-utils')
function hexOnly (hex) {
return hex.replace(/[^a-fA-F0-9]/g, '')
@@ -7,8 +6,8 @@ function hexOnly (hex) {
function unused () {}
function parseHexOnly (hex, to) {
return parseBytes(hexOnly(hex), to)
function parseHexOnly (hex) {
return Buffer.from(hexOnly(hex), 'hex');
}
function loadFixture (relativePath) {