Skip to content

Commit

Permalink
Manually trigger user callback on editTriggerOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
filipzeta committed Oct 6, 2023
1 parent d2f3317 commit 5cbc168
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@zetamarkets/sdk",
"repository": "https://github.com/zetamarkets/sdk/",
"version": "1.10.8",
"version": "1.10.9",
"description": "Zeta SDK",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down
12 changes: 11 additions & 1 deletion src/cross-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1444,14 +1444,24 @@ export class CrossClient {
triggerAccount
)
);
return await utils.processTransaction(
let txSig = await utils.processTransaction(
this._provider,
tx,
undefined,
undefined,
undefined,
this._useVersionedTxs ? utils.getZetaLutArr() : undefined
);

// Editing a trigger order doesn't prompt an account change because the bits stay the same.
// Therefore just manually fire this
if (this._callback !== undefined) {
this._callback(null, EventType.USER, Exchange.clockSlot, {
UserCallbackType: types.UserCallbackType.CROSSMARGINACCOUNTCHANGE,
});
}

return txSig;
}

public async editDelegatedPubkey(
Expand Down

0 comments on commit 5cbc168

Please sign in to comment.