Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ function PopupContent() {
transferrable: asset.transferable,
decimals: asset.decimals,
symbol: asset.symbol,
transferFromAddress: address,
});

const { value: transferToAddress, component: transferToAddressField } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ function PopupContent() {
transferrable: asset.transferrable,
decimals: asset.decimals,
symbol: asset.symbol,
transferFromAddress: address,
});

const { value: transferToAddress, component: transferToAddressField } =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ function TransferField({ extensionAccounts = [], onTransferChange = noop }) {
/>
<TransferAmount
showBalance={false}
transferFromAddress={targetAddress}
decimals={decimals}
symbol={symbol}
transferAmount={transferAmount}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ function TransferContent() {
/>
<TransferAmount
showBalance={false}
transferFromAddress={targetAddress}
transferAmount={transferAmount}
setTransferAmount={setTransferAmount}
decimals={decimals}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ function PopupContent() {
decimals,
symbol,
isLoading: loading,
transferFromAddress: address,
});
const { value: transferToAddress, component: transferToAddressField } =
useAddressComboField({ title: "To" });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export default function useNativeTransferAmount({ api, transferFromAddress }) {
decimals={decimals}
symbol={symbol}
isLoading={isLoading}
transferFromAddress={transferFromAddress}
transferAmount={transferAmount}
setTransferAmount={setTransferAmount}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export function TransferrableBalance({ value, isLoading, decimals }) {
</span>
{isLoading ? (
<Loading size={12} />
) : isNaN(value) ? (
<span className="text-textTertiary">--</span>
) : (
<BalanceDisplay balance={formatBalance(value, decimals)} />
)}
Expand All @@ -24,12 +26,11 @@ export default function TransferAmount({
decimals,
symbol,
isLoading,
transferFromAddress,
transferAmount,
setTransferAmount,
showBalance = true,
}) {
const balanceStatus = !!transferFromAddress && showBalance && (
const balanceStatus = showBalance && (
<TransferrableBalance
value={transferrable}
isLoading={isLoading}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ import { checkTransferAmount } from "next-common/utils/checkTransferAmount";
* @param {Omit<Parameters<typeof TransferAmount>[0], "transferAmount" | "setTransferAmount">} props
*/
export function useTransferAmount(props = {}) {
const { transferrable, decimals, symbol, transferFromAddress, isLoading } =
props;
const { transferrable, decimals, symbol, isLoading } = props;

const [transferAmount, setTransferAmount] = useState("");

Expand All @@ -17,7 +16,6 @@ export function useTransferAmount(props = {}) {
decimals={decimals}
symbol={symbol}
isLoading={isLoading}
transferFromAddress={transferFromAddress}
transferAmount={transferAmount}
setTransferAmount={setTransferAmount}
/>
Expand Down