Skip to content

Commit

Permalink
updated types imports, fixed workflow config
Browse files Browse the repository at this point in the history
  • Loading branch information
hubert-de-lalye committed Dec 18, 2024
1 parent 405f163 commit b351725
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 101 deletions.
15 changes: 11 additions & 4 deletions .github/workflows/publish-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,16 @@ jobs:
scope: "@gmx-io"
auth-token: ${{ secrets.NPM_TOKEN }}

- name: Import GPG Key
run: |
echo "${{ secrets.GPG_KEY }}" | gpg --batch --yes --import
git config --global gpg.program gpg
git config --global commit.gpgsign true
git config user.name "GMX Release Bot"
git config user.email "[email protected]"
env:
GPG_KEY: ${{ secrets.GPG_KEY }}

- name: Install dependencies
working-directory: ./sdk
run: yarn install --immutable
Expand Down Expand Up @@ -64,10 +74,8 @@ jobs:
- name: Commit version bump
working-directory: ./sdk
run: |
git config user.name "GMX Release Bot"
git config user.email "[email protected]"
git add package.json
git commit -m "Bump SDK version to $(jq -r .version package.json)"
git commit -S -m "Bump SDK version to $(jq -r .version package.json)"
- run: npm publish --access public
working-directory: ./sdk
Expand All @@ -79,5 +87,4 @@ jobs:
if [ "${{ github.event.inputs.version_type }}" == "custom" ]; then
exit 0
fi
git push origin HEAD:${{ github.ref_name }}
2 changes: 1 addition & 1 deletion src/components/Exchange/ChartTokenSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { BigNumberish } from "ethers";
import { USD_DECIMALS } from "config/factors";
import { getTokens, getWhitelistedV1Tokens } from "sdk/configs/tokens";
import { getUsd } from "domain/tokens";
import { InfoTokens, Token } from "domain/tokens/types";
import { InfoTokens, Token } from "sdk/types/tokens";
import { bigMath } from "lib/bigmath";
import { LONG, SHORT, SWAP, USDG_DECIMALS } from "lib/legacy";
import { expandDecimals, formatAmount } from "lib/numbers";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { OrderType } from "domain/synthetics/orders";
import type { TokenData } from "domain/synthetics/tokens";
import { adaptToV1TokenInfo, getTokensRatioByAmounts } from "domain/synthetics/tokens/utils";
import { SwapTradeAction, TradeActionType } from "domain/synthetics/tradeHistory/types";
import type { Token, TokenInfo } from "domain/tokens/types";
import type { Token, TokenInfo } from "sdk/types/tokens";
import { getExchangeRateDisplay } from "lib/legacy";
import { formatTokenAmount } from "lib/numbers";

Expand Down
2 changes: 1 addition & 1 deletion src/domain/synthetics/claimHistory/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { MarketInfo } from "../markets";
import { Token } from "domain/tokens/types";
import { Token } from "sdk/types/tokens";

export enum ClaimType {
ClaimPriceImpact = "ClaimPriceImpact",
Expand Down
2 changes: 1 addition & 1 deletion src/domain/synthetics/tokens/useTokensFavorites.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
TOKEN_FAVORITE_PREFERENCE_SETTINGS_KEY,
} from "config/localStorage";

import type { TokenCategory } from "domain/tokens/types";
import type { TokenCategory } from "sdk/types/tokens";
import { useChainId } from "lib/chains";
import { useLocalStorageByChainId } from "lib/localStorage";
import { EMPTY_ARRAY, EMPTY_OBJECT } from "lib/objects";
Expand Down
2 changes: 1 addition & 1 deletion src/domain/tokens/approveTokens.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Link } from "react-router-dom";
import { getChainName, getExplorerUrl } from "config/chains";
import { getNativeToken } from "sdk/configs/tokens";
import { helperToast } from "lib/helperToast";
import { InfoTokens, TokenInfo } from "./types";
import { InfoTokens, TokenInfo } from "sdk/types/tokens";

import ExternalLink from "components/ExternalLink/ExternalLink";
import { ToastifyDebug } from "components/ToastifyDebug/ToastifyDebug";
Expand Down
2 changes: 1 addition & 1 deletion src/domain/tokens/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export * from "./utils";
export * from "./types";
export * from "sdk/types/tokens";
export * from "./useInfoTokens";
export * from "./approveTokens";
89 changes: 0 additions & 89 deletions src/domain/tokens/types.ts

This file was deleted.

2 changes: 1 addition & 1 deletion src/domain/tokens/useInfoTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { USD_DECIMALS } from "config/factors";
import { expandDecimals } from "lib/numbers";
import { PRICES_UPDATE_INTERVAL } from "lib/timeConstants";

import { InfoTokens, Token, TokenInfo } from "./types";
import { InfoTokens, Token, TokenInfo } from "sdk/types/tokens";
import { getSpread } from "./utils";

import VaultReader from "sdk/abis/VaultReader.json";
Expand Down
2 changes: 1 addition & 1 deletion src/domain/tokens/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from "lib/legacy";
import { USD_DECIMALS } from "config/factors";
import { expandDecimals, PRECISION } from "lib/numbers";
import { InfoTokens, Token, TokenInfo, TokenPrices } from "./types";
import { InfoTokens, Token, TokenInfo, TokenPrices } from "sdk/types/tokens";
import { convertToTokenAmount } from "domain/synthetics/tokens/utils";

const { ZeroAddress } = ethers;
Expand Down

0 comments on commit b351725

Please sign in to comment.