fix js test rig

This commit is contained in:
Richard Holland
2022-12-19 16:36:12 +00:00
parent 6e001cf0bf
commit cc1d374e11

View File

@@ -200,7 +200,7 @@ module.exports = {
try try
{ {
return fs.readFileSync('wasm/' + x).toString('hex').toUpperCase(); return fs.readFileSync('' + x).toString('hex').toUpperCase();
} }
catch (e) {} catch (e) {}
@@ -301,6 +301,12 @@ module.exports = {
return acc return acc
}; };
const fromSeed = (x)=>
{
const acc = xrpljs.Wallet.fromSeed(x);
return acc
};
const pay_mock = (seed, amt, dest) => const pay_mock = (seed, amt, dest) =>
{ {
if (dest.classicAddress != undefined) if (dest.classicAddress != undefined)
@@ -351,7 +357,7 @@ module.exports = {
const hookHash = fn => const hookHash = fn =>
{ {
let b = fs.readFileSync('wasm/' + fn); let b = fs.readFileSync('' + fn);
return crypto.createHash('SHA512').update(b).digest().slice(0,32).toString('hex').toUpperCase() return crypto.createHash('SHA512').update(b).digest().slice(0,32).toString('hex').toUpperCase()
} }
@@ -579,6 +585,7 @@ module.exports = {
kp: kp, kp: kp,
genesis: genesis, genesis: genesis,
randomAccount: randomAccount, randomAccount: randomAccount,
fromSeed: fromSeed,
fundFromGenesis: fundFromGenesis, fundFromGenesis: fundFromGenesis,
err: err, err: err,
hsfOVERRIDE: 1, hsfOVERRIDE: 1,