diff --git a/apps/portal/src/domains/bridge/index.ts b/apps/portal/src/domains/bridge/index.ts index 489b711cb..937e6751d 100644 --- a/apps/portal/src/domains/bridge/index.ts +++ b/apps/portal/src/domains/bridge/index.ts @@ -13,36 +13,6 @@ export const bridgeState = selector({ adapters: Object.values(bridgeConfig) .filter((x): x is NonNullable => x !== undefined) .map(x => x.adapter), - disabledRouters: [ - // Disable routes from asset hub - // due to reports of possible lost of funds from users - { from: 'assetHubPolkadot' }, - // Temporarily disable Kusama routes - // due to: https://github.com/paritytech/polkadot-sdk/issues/3050 - { from: 'altair' }, - { from: 'kusama' }, - { from: 'basilisk' }, - { from: 'bifrost' }, - { from: 'calamari' }, - { from: 'crab' }, - { from: 'khala' }, - { from: 'kintsugi' }, - { from: 'shiden' }, - { from: 'shadow' }, - { from: 'turing' }, - { from: 'heiko' }, - { from: 'integritee' }, - { from: 'kico' }, - { from: 'tinkernet' }, - { from: 'listen' }, - { from: 'pichiu' }, - { from: 'quartz' }, - { from: 'moonriver' }, - { from: 'karura' }, - { from: 'robonomics' }, - { from: 'tinkernet' }, - { from: 'assetHubKusama' }, - ], }) await bridge.isReady return bridge diff --git a/apps/portal/src/domains/staking/subtensor/hooks/forms.ts b/apps/portal/src/domains/staking/subtensor/hooks/forms.ts index ad322f5c0..d1f1590b6 100644 --- a/apps/portal/src/domains/staking/subtensor/hooks/forms.ts +++ b/apps/portal/src/domains/staking/subtensor/hooks/forms.ts @@ -23,11 +23,16 @@ export const useAddStakeForm = (account: Account, stake: Stake, delegate: string const [input, setInput] = useState('') const amount = useTokenAmount(input) - const feeEstimateTx: SubmittableExtrinsic = useMemo( - () => (api.tx as any)?.subtensorModule?.addStake?.(delegate, accountInfo.data.free.toBigInt() ?? 0n), - [accountInfo.data.free, api.tx, delegate] + const tx: SubmittableExtrinsic = useMemo( + () => + api.tx.utility.batchAll([ + (api.tx as any)?.subtensorModule?.addStake?.(delegate, amount.decimalAmount?.planck ?? 0n), + api.tx.system.remarkWithEvent(`talisman-bittensor`), + ]), + [api.tx, delegate, amount.decimalAmount?.planck] ) - const [feeEstimate, isFeeEstimateReady] = useStakeFormFeeEstimate(account.address, feeEstimateTx) + + const [feeEstimate, isFeeEstimateReady] = useStakeFormFeeEstimate(account.address, tx) const existentialDeposit = useMemo( () => api.consts.balances.existentialDeposit.toBigInt(), @@ -88,14 +93,6 @@ export const useAddStakeForm = (account: Account, stake: Stake, delegate: string transferable.decimalAmount.planck, ]) - const tx: SubmittableExtrinsic = useMemo( - () => - api.tx.utility.batchAll([ - (api.tx as any)?.subtensorModule?.addStake?.(delegate, amount.decimalAmount?.planck ?? 0n), - api.tx.system.remarkWithEvent(`talisman-bittensor`), - ]), - [api.tx, delegate, amount.decimalAmount?.planck] - ) const extrinsic = useExtrinsic(tx) const ready = isFeeEstimateReady && (amount.decimalAmount?.planck ?? 0n) > 0n && error === undefined