Skip to content

Commit

Permalink
fix: build
Browse files Browse the repository at this point in the history
  • Loading branch information
quangdz1704 committed Jul 17, 2024
1 parent 6b98d89 commit fe5866f
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 6 deletions.
4 changes: 4 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn build
18 changes: 12 additions & 6 deletions components/page/bridge/hooks/useGetFee.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ const useGetFee = ({
const [bridgeFee, setBridgeFee] = useState(0);
const [tokenFee, setTokenFee] = useState(0);

const tonBridgeClient = new TonbridgeBridgeClient(
window.client,
oraiAddress,
network.CW_TON_BRIDGE
);

useEffect(() => {
(async () => {
if (token) {
Expand All @@ -32,6 +26,12 @@ const useGetFee = ({
return;
}

const tonBridgeClient = new TonbridgeBridgeClient(
window.client,
oraiAddress,
network.CW_TON_BRIDGE
);

const tokenFeeConfig = await tonBridgeClient.tokenFee({
remoteTokenDenom: tokenInTon?.contractAddress,
});
Expand All @@ -51,6 +51,12 @@ const useGetFee = ({

useEffect(() => {
(async () => {
const tonBridgeClient = new TonbridgeBridgeClient(
window.client,
oraiAddress,
network.CW_TON_BRIDGE
);

const config = await tonBridgeClient.config();
if (config) {
const { relayer_fee } = config;
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.4",
"husky": "^9.0.11",
"patch-package": "^8.0.0",
"sass": "^1.77.6",
"typescript": "^5"
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5561,6 +5561,11 @@ https-proxy-agent@^7.0.1, https-proxy-agent@^7.0.3, https-proxy-agent@^7.0.5:
agent-base "^7.0.2"
debug "4"

husky@^9.0.11:
version "9.0.11"
resolved "https://registry.yarnpkg.com/husky/-/husky-9.0.11.tgz#fc91df4c756050de41b3e478b2158b87c1e79af9"
integrity sha512-AB6lFlbwwyIqMdHYhwPe+kjOC3Oc5P3nThEoW/AaO2BX3vJDjWPFxYLxokUZOo6RNX20He3AaT8sESs9NJcmEw==

[email protected], iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
Expand Down

0 comments on commit fe5866f

Please sign in to comment.