Skip to content

Commit 8a84179

Browse files
committed
chore: pr review feedback
1 parent a7141f8 commit 8a84179

File tree

4 files changed

+12
-9
lines changed

4 files changed

+12
-9
lines changed

packages/apps/ability-hyperliquid/src/generated/lit-action.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"ipfsCid": "QmdFLepEXEa4E25yZGbiVdM6UEHoKNxmqt9MefDwy4H3EC"
2+
"ipfsCid": "QmSvtArdy1UQ4q7eVQCENTYtfTTYoGqVYMugH9Uk38RS3P"
33
}

packages/apps/ability-hyperliquid/src/lib/vincent-ability.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const vincentAbility = createVincentAbility({
5353
const transport = new hyperliquid.HttpTransport({ isTestnet: useTestnet });
5454
const infoClient = new hyperliquid.InfoClient({ transport });
5555

56-
let hyperLiquidAccountAlreadyExists = false;
56+
let hyperLiquidAccountAlreadyExists;
5757
try {
5858
await infoClient.clearinghouseState({ user: delegatorPkpInfo.ethAddress });
5959
hyperLiquidAccountAlreadyExists = true;
@@ -64,12 +64,12 @@ export const vincentAbility = createVincentAbility({
6464
);
6565

6666
const errorMessage = error instanceof Error ? error.message : String(error);
67-
if (!errorMessage.includes('does not exist')) {
67+
if (errorMessage.includes('does not exist')) {
6868
hyperLiquidAccountAlreadyExists = false;
69+
} else {
70+
// Unknown error occurred - not a "does not exist" error
71+
throw error;
6972
}
70-
71-
// Unknown error occurred
72-
throw error;
7373
}
7474

7575
switch (action) {

packages/apps/ability-hyperliquid/test/e2e/spot/cancel-order.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,10 @@ describe('Hyperliquid Ability E2E Spot Cancel Order Tests', () => {
137137
);
138138

139139
expect(precheckResult).toBeDefined();
140-
console.log('Spot Cancel Order] precheckResult', util.inspect(precheckResult, { depth: 10 }));
140+
console.log(
141+
'[Spot Cancel Order] precheckResult',
142+
util.inspect(precheckResult, { depth: 10 }),
143+
);
141144

142145
if (precheckResult.success === false) {
143146
throw new Error(precheckResult.runtimeError);

0 commit comments

Comments
 (0)