From 2619a06ec22667393417c9eef6ebbda3489d70c7 Mon Sep 17 00:00:00 2001 From: jordy25519 Date: Mon, 4 Nov 2024 12:53:05 +0800 Subject: [PATCH] order Uuid from utf8 (#284) --- src/experimental-bots/swift/makerExample.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/experimental-bots/swift/makerExample.ts b/src/experimental-bots/swift/makerExample.ts index 98d5757f..fbbc2a96 100644 --- a/src/experimental-bots/swift/makerExample.ts +++ b/src/experimental-bots/swift/makerExample.ts @@ -76,6 +76,7 @@ export class SwiftMaker { if (message['order'] && this.driftClient.isSubscribed) { const order = JSON.parse(message['order']); + console.info(`received order. uuid: ${order['uuid']}`); const takerAuthority = new PublicKey(order['taker_authority']); const takerSubaccountId = order['taker_sub_account_id'] ?? 0; const takerUserPubkey = await getUserAccountPublicKey( @@ -111,7 +112,7 @@ export class SwiftMaker { Buffer.from(order['swift_signature'], 'base64'), swiftOrderParamsBuf, Buffer.from(order['order_signature'], 'base64'), - order['uuid'], + decodeUTF8(order['uuid']), { taker: takerUserPubkey, takerUserAccount,