From 03cff76f065b6257526166a1678fc03269ace2f1 Mon Sep 17 00:00:00 2001 From: George Kudrayvtsev Date: Thu, 30 Nov 2023 14:03:32 -0800 Subject: [PATCH] Async/Await fixup for Node 20 --- test/unit/server/simulate_transaction_test.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/test/unit/server/simulate_transaction_test.js b/test/unit/server/simulate_transaction_test.js index fb4f068c..69ef23f5 100644 --- a/test/unit/server/simulate_transaction_test.js +++ b/test/unit/server/simulate_transaction_test.js @@ -4,6 +4,7 @@ const { Networks, SorobanDataBuilder, authorizeInvocation, + authorizeEntry, parseRawSimulation, xdr } = SorobanClient; @@ -153,8 +154,6 @@ describe('Server#simulateTransaction', async function (done) { }); xit('simulates fee bump transactions'); - - done(); }); function cloneSimulation(sim) { @@ -195,10 +194,10 @@ async function buildAuthEntry(address) { // do some voodoo to make this return a deterministic auth entry const kp = Keypair.fromSecret(randomSecret); - let entry = authorizeInvocation(kp, 1, root); - entry.credentials().address().nonce(new xdr.Int64(0xdeadbeef)); - - return authorizeEntry(entry, kp, 1); // overwrites signature w/ above nonce + return authorizeInvocation(kp, 1, root).then((entry) => { + entry.credentials().address().nonce(new xdr.Int64(0xdeadbeef)); + return authorizeEntry(entry, kp, 1); // overwrites signature w/ above nonce + }); } async function invokeSimulationResponse(address) {