Skip to content

Commit

Permalink
order Uuid from utf8 (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordy25519 authored Nov 4, 2024
1 parent 541c961 commit 2619a06
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/experimental-bots/swift/makerExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 2619a06

Please sign in to comment.