Removce teleport destination fees (#6745)

This commit is contained in:
Jaco 2021-12-28 15:47:01 +01:00 committed by GitHub
parent b984833d82
commit ac4e9c91bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 8 deletions

View File

@ -11,7 +11,7 @@ import React, { useMemo, useState } from 'react';
import { getTeleportWeight } from '@polkadot/apps-config';
import { ChainImg, Dropdown, InputAddress, InputBalance, MarkWarning, Modal, Spinner, TxButton } from '@polkadot/react-components';
import { useApi, useApiUrl, useTeleport, useWeightFee } from '@polkadot/react-hooks';
import { useApi, useApiUrl, useTeleport } from '@polkadot/react-hooks';
import { Available } from '@polkadot/react-query';
import { BN_ZERO, isFunction } from '@polkadot/util';
@ -80,7 +80,6 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
);
const destApi = useApiUrl(url);
const weightFee = useWeightFee(destWeight, destApi);
const params = useMemo(
() => {
@ -111,7 +110,7 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
[api, amount, call, destWeight, isParaTeleport, recipientId, recipientParaId]
);
const hasAvailable = !!amount && amount.gte(weightFee);
const hasAvailable = !!amount;
return (
<Modal
@ -171,11 +170,6 @@ function Teleport ({ onClose }: Props): React.ReactElement<Props> | null {
{destApi
? (
<>
<InputBalance
defaultValue={weightFee}
isDisabled
label={t<string>('destination transfer fee')}
/>
<InputBalance
defaultValue={destApi.consts.balances.existentialDeposit}
isDisabled

View File

@ -1,6 +1,8 @@
// Copyright 2017-2021 @polkadot/app-parachains authors & contributors
// SPDX-License-Identifier: Apache-2.0
import '@polkadot/api-augment';
import type { ParaId } from '@polkadot/types/interfaces';
import React, { useRef } from 'react';