Skip to content

Commit

Permalink
Fix typo and add test for invalid vaults. (#2535)
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentwschau authored Oct 22, 2024
1 parent 9c214d0 commit 317a74e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ describe('vault-controller#V4', () => {
});
});

it('Get /megavault/positions with 2 vault subaccount, 1 with no perpetual', async () => {
it('Get /megavault/positions with 2 vault subaccount, 1 with no perpetual, 1 invalid', async () => {
await Promise.all([
VaultTable.create({
...testConstants.defaultVault,
Expand All @@ -463,6 +463,11 @@ describe('vault-controller#V4', () => {
address: testConstants.vaultAddress,
clobPairId: testConstants.defaultPerpetualMarket2.clobPairId,
}),
VaultTable.create({
...testConstants.defaultVault,
address: 'invalid',
clobPairId: '999',
}),
]);
const response: request.Response = await sendRequest({
type: RequestMethod.GET,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ async function getVaultMapping(): Promise<VaultMapping> {
}
validVaultMapping[subaccountId] = vaultMapping[subaccountId];
}
return vaultMapping;
return validVaultMapping;
}

export default router;

0 comments on commit 317a74e

Please sign in to comment.