diff --git a/package.json b/package.json index e753953be..d9834e5f4 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { "name": "interbtc-ui", - "version": "2.40.0", + "version": "2.40.1", "private": true, "dependencies": { "@craco/craco": "^6.1.1", "@headlessui/react": "^1.1.1", "@heroicons/react": "^2.0.18", - "@interlay/bridge": "^0.4.0", + "@interlay/bridge": "^0.4.1", "@interlay/interbtc-api": "2.5.1", "@interlay/monetary-js": "0.7.3", "@polkadot/api": "10.9.1", diff --git a/src/pages/Staking/components/StakingAccountDetails/StakingAccountDetails.tsx b/src/pages/Staking/components/StakingAccountDetails/StakingAccountDetails.tsx index 170a209e1..f89f9047e 100644 --- a/src/pages/Staking/components/StakingAccountDetails/StakingAccountDetails.tsx +++ b/src/pages/Staking/components/StakingAccountDetails/StakingAccountDetails.tsx @@ -31,11 +31,13 @@ const StakingAccountDetails = ({ const transaction = useTransaction(Transaction.ESCROW_WITHDRAW_REWARDS, { onSuccess: () => { onClaimRewards(); - setOpen(false); } }); - const handleSubmit = () => transaction.execute(); + const handleSubmit = () => { + transaction.execute(); + setOpen(false); + }; const handleOpen = () => transaction.fee.estimate(); diff --git a/src/pages/Staking/components/StakingWithdrawCard/StakingWithdrawCard.tsx b/src/pages/Staking/components/StakingWithdrawCard/StakingWithdrawCard.tsx index c6b876671..49f8ec108 100644 --- a/src/pages/Staking/components/StakingWithdrawCard/StakingWithdrawCard.tsx +++ b/src/pages/Staking/components/StakingWithdrawCard/StakingWithdrawCard.tsx @@ -25,11 +25,13 @@ const StakingWithdrawCard = ({ data, onWithdraw, ...props }: StakingWithdrawCard const transaction = useTransaction(Transaction.ESCROW_WITHDRAW, { onSuccess: () => { onWithdraw(); - setOpen(false); } }); - const handleSubmit = () => transaction.execute(); + const handleSubmit = () => { + transaction.execute(); + setOpen(false); + }; const handleOpen = () => transaction.fee.estimate(); diff --git a/src/utils/constants/currency.ts b/src/utils/constants/currency.ts index 5bc824cd4..99be40b07 100644 --- a/src/utils/constants/currency.ts +++ b/src/utils/constants/currency.ts @@ -24,10 +24,10 @@ const NATIVE_CURRENCIES: Array = isPolkadotChain ? [Polkadot, InterBtc, Interlay] : [KBtc, Kintsugi, Kusama]; -const BIFROST_RELAY_CHAIN_NATIVE_TOKEN = isPolkadotChain ? 'VDOT' : 'VKSM'; - const FEE_TICKERS = [...NATIVE_CURRENCIES.map(({ ticker }) => ticker), 'USDT']; +const BIFROST_RELAY_CHAIN_NATIVE_TOKEN = isPolkadotChain ? 'VDOT' : 'VKSM'; + const COINGECKO_ID_BY_CURRENCY_TICKER: Record = Object.freeze({ [Bitcoin.ticker]: 'bitcoin', [Kintsugi.ticker]: 'kintsugi', diff --git a/yarn.lock b/yarn.lock index e089fa3ff..d838d4961 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2966,10 +2966,10 @@ resolved "https://registry.yarnpkg.com/@iarna/toml/-/toml-2.2.5.tgz#b32366c89b43c6f8cefbdefac778b9c828e3ba8c" integrity sha512-trnsAYxU3xnS1gPHPyU961coFyLkh4gAD/0zQ5mymY4yOZ+CYvsPqUbOFSw0aDM4y0tV7tiFxL/1XfXPNC6IPg== -"@interlay/bridge@^0.4.0": - version "0.4.0" - resolved "https://registry.yarnpkg.com/@interlay/bridge/-/bridge-0.4.0.tgz#a8ee25a0bcec1579d1a0ad668345080c567ac254" - integrity sha512-884QMnnOcnzxUU9IgW3xLhzusQ36z2f7vdRTfB8CXkKEZwdMpq6pXlZM9GSWFyw5zvSeG8dn2IgFd4642eOp9w== +"@interlay/bridge@^0.4.1": + version "0.4.1" + resolved "https://registry.yarnpkg.com/@interlay/bridge/-/bridge-0.4.1.tgz#8df57a2c9f8d51cb7ee1028144f485828df9b625" + integrity sha512-7fW/j0TUEmpBA5zAUfbxxSQReM7LwwHQD10VzUA95+oasjR/hTMALXtSnMAT4tyWZzFk5KZvp5G5RG6Xypm1RA== dependencies: "@acala-network/api" "^5" "@acala-network/sdk" "^4.1.9-7"