Skip to content

Commit

Permalink
fixed market keys hashing types
Browse files Browse the repository at this point in the history
  • Loading branch information
hubert-de-lalye committed Nov 4, 2024
1 parent 8bd9e26 commit de6e9fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sdk/src/configs/markets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*/
import { ARBITRUM, AVALANCHE, AVALANCHE_FUJI } from "./chains";

type MarketConfig = {
export type MarketConfig = {
marketTokenAddress: string;
indexTokenAddress: string;
longTokenAddress: string;
Expand Down
10 changes: 5 additions & 5 deletions sdk/src/utils/marketKeysAndConfigs.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { hashDataMap } from "../../src/utils/hash";
import { hashDataMap } from "utils/hash";

import { Market } from "types/markets";
import {
BORROWING_EXPONENT_FACTOR_KEY,
BORROWING_FACTOR_KEY,
Expand Down Expand Up @@ -40,9 +39,10 @@ import {
THRESHOLD_FOR_STABLE_FUNDING,
VIRTUAL_MARKET_ID_KEY,
VIRTUAL_TOKEN_ID_KEY,
} from "../../src/configs/dataStore";
} from "configs/dataStore";
import { MarketConfig } from "configs/markets";

export function hashMarketConfigKeys(market: Market) {
export function hashMarketConfigKeys(market: MarketConfig) {
const marketAddress = market.marketTokenAddress;
return hashDataMap({
isDisabled: [
Expand Down Expand Up @@ -240,7 +240,7 @@ export function hashMarketConfigKeys(market: Market) {
});
}

export function hashMarketValuesKeys(market: Market) {
export function hashMarketValuesKeys(market: MarketConfig) {
const marketAddress = market.marketTokenAddress;
const marketKeys = hashDataMap({
longPoolAmount: [
Expand Down

0 comments on commit de6e9fc

Please sign in to comment.