diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index fd24447..2e6b648 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -45,7 +45,7 @@ jobs: if: steps.npm_version_check.outputs.version_exists == 'false' env: NODE_AUTH_TOKEN: ${{ secrets.NPM_CI_TOKEN }} - VUE_APP_APTOS_NODE_API_TOKEN: ${{ secrets.API_KEY }} + VITE_APP_APTOS_NODE_API_TOKEN: ${{ secrets.API_KEY }} run: | yarn yarn build @@ -55,7 +55,7 @@ jobs: if: steps.npm_version_check.outputs.version_exists == 'false' env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - VUE_APP_APTOS_NODE_API_TOKEN: ${{ secrets.API_KEY }} + VITE_APP_APTOS_NODE_API_TOKEN: ${{ secrets.API_KEY }} run: | current_version=${{ steps.version_check.outputs.current_version }} gh release create "v$current_version" \ diff --git a/package.json b/package.json index de6fd79..14dcde5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@pontem/liquidswap-widget", - "version": "0.5.6", + "version": "0.5.7", "homepage": "https://github.com/pontem-network/liquidswap-widget#readme", "description": "Liquidswap widget as custom web component", "files": [ @@ -29,8 +29,8 @@ "./dist/style.css": "./dist/style.css" }, "scripts": { - "dev": "vite", - "build": "rm -rf dist && vite build", + "dev": "NODE_ENV=development vite --open --mode development", + "build": "rm -rf dist && vite build --mode production", "build:gh-pages": "rm -rf docs && vite build -c 'vite.github.config.js'", "serve": "vite preview", "build:serve": "yarn build && yarn serve", diff --git a/src/constants/constants.ts b/src/constants/constants.ts index edf0388..d762517 100644 --- a/src/constants/constants.ts +++ b/src/constants/constants.ts @@ -67,7 +67,7 @@ export const NETWORKS: Network[] = [ id: MAINNET_CHAIN_ID, title: 'Aptos Mainnet', shortTitle: 'Aptos', - restUrl: 'https://aptos-mainnet.pontem.network/v1', + restUrl: 'https://api.mainnet.aptoslabs.com/v1', defaultToken: '0x1::aptos_coin::AptosCoin', modules: NETWORKS_MODULES, }, @@ -75,7 +75,7 @@ export const NETWORKS: Network[] = [ id: APTOS_TESTNET_CHAIN_ID, title: 'Aptos Testnet', shortTitle: 'Aptos', - restUrl: 'https://aptos-testnet.pontem.network/v1', + restUrl: 'https://api.testnet.aptoslabs.com/v1', defaultToken: '0x1::aptos_coin::AptosCoin', modules: NETWORKS_MODULES, }, @@ -101,4 +101,4 @@ export const WALLET_CHROME_STORE_URL = export const PONTEM_API_URL = 'https://control.pontem.network/api'; -export const API_KEY = process.env.VUE_APP_APTOS_NODE_API_TOKEN || '' +export const API_KEY = import.meta.env.VITE_APP_APTOS_NODE_API_TOKEN || '' diff --git a/vite.config.js b/vite.config.js index 6678019..9a683cb 100644 --- a/vite.config.js +++ b/vite.config.js @@ -62,7 +62,6 @@ export default defineConfig({ 'process.env.NODE_ENV': '"production"', 'process.env.VUE_APP_CORRECT_CHAIN': '"mainnet"', 'process.env.VERSION': `"${version}"`, - 'process.env.VUE_APP_APTOS_NODE_API_TOKEN': JSON.stringify(process.env.VUE_APP_APTOS_NODE_API_TOKEN), // For testnet environment: // 'process.env.VUE_APP_MODULES_ACCOUNT': '"0x190d44266241744264b964a37b8f09863167a12d3e70cda39376cfb4e3561e12"', // 'process.env.VUE_APP_MODULES_V05_ACCOUNT': '"0x45ef7a3a1221e7c10d190a550aa30fa5bc3208ed06ee3661ec0afa3d8b418580"', diff --git a/vite.github.config.js b/vite.github.config.js index e6ade9a..f6e52b8 100644 --- a/vite.github.config.js +++ b/vite.github.config.js @@ -8,7 +8,6 @@ import svgLoader from 'vite-svg-loader'; import dts from 'vite-plugin-dts'; - export default defineConfig({ plugins: [ vue({ @@ -43,7 +42,6 @@ export default defineConfig({ define: { 'process.env.NODE_ENV': '"production"', 'process.env.VUE_APP_CORRECT_CHAIN': '"mainnet"', - 'process.env.VUE_APP_APTOS_NODE_API_TOKEN': JSON.stringify(process.env.VUE_APP_APTOS_NODE_API_TOKEN), }, base: '/liquidswap-widget/',