Skip to content

Commit

Permalink
refactor: update build and publish process for oraidex-common package
Browse files Browse the repository at this point in the history
  • Loading branch information
trungbach committed Dec 20, 2024
1 parent 93ab0e2 commit 14055df
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 21 deletions.
32 changes: 16 additions & 16 deletions .github/workflows/publish_package_common_v3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,27 +43,27 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
run: yarn --cwd packages/oraidex-common build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Oraidex Common
id: publish-common
continue-on-error: true
run: yarn deploy:beta packages/oraidex-common
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Oraiswap v3
id: publish-oraiswap-v3
continue-on-error: true
run: yarn deploy:beta packages/oraiswap-v3
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Publish Universal-swap
id: publish-universal-swap
continue-on-error: true
run: yarn deploy:beta packages/universal-swap
run: yarn deploy packages/oraidex-common
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish Oraiswap v3
# id: publish-oraiswap-v3
# continue-on-error: true
# run: yarn deploy:beta packages/oraiswap-v3
# env:
# CI: false
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
# - name: Publish Universal-swap
# id: publish-universal-swap
# continue-on-error: true
# run: yarn deploy:beta packages/universal-swap
# env:
# CI: false
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

# yarn test
yarn test
2 changes: 1 addition & 1 deletion packages/oraidex-common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oraichain/oraidex-common",
"version": "2.0.0-beta.24",
"version": "2.0.0",
"main": "./build/index.js",
"module": "./build/index.js",
"types": "./build/index.d.ts",
Expand Down
2 changes: 0 additions & 2 deletions packages/oraidex-common/src/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ export const parseAssetInfoFromContractAddrOrDenom = (addressOrDenomToken: strin
if (!addressOrDenomToken) return null;
const addressOrDenomLowerCase = addressOrDenomToken.toLowerCase();

// const cosmosTokens = getOraidexCommonAttribute<TokenItemType[]>("cosmosTokens");
const tokenItem = cosmosTokens.find((cosmosToken) => {
return !cosmosToken.contractAddress
? cosmosToken.denom.toLowerCase() === addressOrDenomLowerCase
Expand Down Expand Up @@ -229,7 +228,6 @@ export const findToTokenOnOraiBridge = (
toNetwork: string,
cosmosTokens: TokenItemType[]
) => {
// const cosmosTokens = getOraidexCommonAttribute<TokenItemType[]>("cosmosTokens");
return cosmosTokens.find(
(t) =>
t.chainId === "oraibridge-subnet-2" &&
Expand Down
27 changes: 26 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3753,7 +3753,7 @@
axios "0.21.4"
axios-extensions "3.1.6"
bech32 "^1.1.4"
cosmjs-types "^0.9.0"
cosmjs-types "^0.8.0"
ethers "^5.5.1"
lodash "^4.17.21"

Expand Down Expand Up @@ -3820,6 +3820,31 @@
resolved "https://registry.yarnpkg.com/@oraichain/immutable/-/immutable-4.3.9.tgz#ff8d5a7b39b5b01f3f72a902cffbfea32ccb20c3"
integrity sha512-INpHnhL970OCkR7I71Kssb2aLl2l4Y/x8W6FlyRO0KmC8GHjxc/hlNB1t44BiI7lkOYmcWMRQoC8dwParsp1RQ==

"@oraichain/oraidex-common@2.0.0-beta.24":
version "2.0.0-beta.24"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-2.0.0-beta.24.tgz#4d728f8ff4fe1a65cc9e7bfea9f8d698a1aeb53d"
integrity sha512-4MxWFhrDwbn5tPbtBomUNmgX+waDWrO6fQR8At86xV8TtEHw8H92LzJ4EJytElOtkfKMVK964TixM/ehsSp/AA==
dependencies:
"@cosmjs/amino" "^0.32.4"
"@cosmjs/cosmwasm-stargate" "^0.32.4"
"@cosmjs/crypto" "^0.32.4"
"@cosmjs/proto-signing" "^0.32.4"
"@cosmjs/stargate" "^0.32.4"
"@cosmjs/tendermint-rpc" "^0.32.4"
"@ethersproject/providers" "^5.0.10"
"@injectivelabs/sdk-ts" "1.12.1"
"@keplr-wallet/types" "^0.11.38"
"@oraichain/common" "^1.2.1-beta13"
"@oraichain/oraidex-contracts-sdk" latest
"@ton/core" "0.56.3"
"@ton/crypto" "3.3.0"
axios "1.7.2"
axios-extensions "3.1.7"
bignumber.js "^9.1.2"
cosmjs-types "^0.9.0"
ethers "^5.0.15"
tronweb "6.0.0-beta.4"

"@oraichain/oraidex-common@^1.1.27", "@oraichain/oraidex-common@^1.1.34":
version "1.1.34"
resolved "https://registry.yarnpkg.com/@oraichain/oraidex-common/-/oraidex-common-1.1.34.tgz#257d25408450c438dc2bf0870fa8de9125af92ed"
Expand Down

0 comments on commit 14055df

Please sign in to comment.