Skip to content

Commit 5cbda06

Browse files
authored
feat: enabled USDT withdrawal (#652)
* refactor: rename from useXcmBridgeV3 to useXcmBridge * feat: enabled withdrawing USDt from Shiden to Statemine * feat: enables USDT withdrawal from Astar to Statemint * feat: enabled USDT withdrawal from Astar to Statemint
1 parent c4c209f commit 5cbda06

7 files changed

Lines changed: 8 additions & 13 deletions

File tree

src/components/assets/transfer/XcmBridge.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@
192192
import InputSelectChain from 'src/components/assets/transfer/InputSelectChain.vue';
193193
import SimpleInput from 'src/components/common/SimpleInput.vue';
194194
import SelectEvmWallet from 'src/components/assets/transfer/SelectEvmWallet.vue';
195-
import { pathEvm, useAccount, useTooltip, useXcmBridgeV3 } from 'src/hooks';
195+
import { pathEvm, useAccount, useTooltip, useXcmBridge } from 'src/hooks';
196196
import { truncate } from 'src/hooks/helper/common';
197197
import { Asset, ethWalletChains } from 'src/v2/models';
198198
import { computed, defineComponent, PropType, ref } from 'vue';
@@ -262,7 +262,7 @@ export default defineComponent({
262262
bridge,
263263
reverseChain,
264264
toggleIsInputDestAddrManually,
265-
} = useXcmBridgeV3(tokenData);
265+
} = useXcmBridge(tokenData);
266266
267267
const isReverseButton = computed<boolean>(() => {
268268
if (!srcChain.value || !destChain.value || isH160.value) return false;

src/components/assets/transfer/styles/xcm-bridge.scss

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,8 @@
228228
@media (min-width: $xs) {
229229
width: 344px;
230230
}
231-
@media (min-width: $md) {
232-
width: 400px;
233-
}
234-
@media (min-width: $xl) {
235-
width: 420px;
231+
@media (min-width: $sm) {
232+
width: 412px;
236233
}
237234
}
238235

src/components/common/styles/simple-input.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
@import 'src/css/quasar.variables.scss';
22

33
.input--address {
4-
width: 230px;
54
background-color: transparent;
65
width: 100%;
76
&:focus {

src/hooks/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export * from './dapps-staking/useDappRedirect';
3333
export * from './dapps-staking/useDispatchGetDapps';
3434
export * from './wallet/useWalletIcon';
3535
export * from './wallet/useEvmWallet';
36-
export * from './xcm/useXcmBridgeV3';
36+
export * from './xcm/useXcmBridge';
3737
export * from './transfer/useTokenTransfer';
3838
export * from './xcm/useTransferRouter';
3939
export * from './xvm/useXvmTransferRouter';
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import { useRouter } from 'vue-router';
4444

4545
const { Acala, Astar, Karura, Polkadot, Shiden } = xcmChainObj;
4646

47-
export function useXcmBridgeV3(selectedToken: Ref<Asset>) {
47+
export function useXcmBridge(selectedToken: Ref<Asset>) {
4848
const originChainApi = ref<ApiPromise | null>(null);
4949
const srcChain = ref<XcmChain>(Polkadot);
5050
const destChain = ref<XcmChain>(Astar);

src/modules/xcm/tokens/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ export const xcmToken = {
7272
logo: 'https://assets.coingecko.com/coins/images/325/small/Tether-logo.png?1598003707',
7373
isXcmCompatible: true,
7474
originChain: Chain.STATEMINT,
75-
minBridgeAmount: '0.21',
75+
minBridgeAmount: '1',
7676
},
7777
{
7878
symbol: 'IBTC',

src/v2/models/XcmModels.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ export interface XcmChain {
4949
export const isParachain = (network: XcmChain): boolean => !!network.parachainId;
5050
export const isRelayChain = (network: XcmChain): boolean => !isParachain(network);
5151

52-
// Memo: Chain.STATEMINE -> Bug related to https://github.com/polkadot-js/apps/issues/7812
53-
export const chainsNotSupportWithdrawal = [Chain.STATEMINE, Chain.STATEMINT];
52+
export const chainsNotSupportWithdrawal: Chain[] = [];
5453
export const astarChains = [Chain.ASTAR, Chain.SHIDEN, Chain.ASTAR_EVM, Chain.SHIDEN_EVM];
5554
export const ethWalletChains = [Chain.MOONBEAM, Chain.MOONRIVER];
5655

0 commit comments

Comments
 (0)