From 6f7d62570d0daf7d121b86d361e84c7fc97be6d9 Mon Sep 17 00:00:00 2001 From: Douglas Daniel Date: Wed, 17 Nov 2021 09:38:35 -0700 Subject: [PATCH] Passed Active Origin to Allow Spend Panel --- .../confirm-transaction-panel/index.tsx | 6 ++---- .../brave_wallet_ui/panel/container.tsx | 21 ++++++++++--------- .../stories/wallet-extension-panels.tsx | 1 + 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/components/brave_wallet_ui/components/extension/confirm-transaction-panel/index.tsx b/components/brave_wallet_ui/components/extension/confirm-transaction-panel/index.tsx index 2bb6e9862f78..74ca7d2d6e6a 100644 --- a/components/brave_wallet_ui/components/extension/confirm-transaction-panel/index.tsx +++ b/components/brave_wallet_ui/components/extension/confirm-transaction-panel/index.tsx @@ -74,6 +74,7 @@ import { export type confirmPanelTabs = 'transaction' | 'details' export interface Props { + siteURL: string accounts: WalletAccountType[] visibleTokens: ERCToken[] fullTokenList: ERCToken[] @@ -95,6 +96,7 @@ export interface Props { function ConfirmTransactionPanel (props: Props) { const { + siteURL, accounts, selectedNetwork, transactionInfo, @@ -129,10 +131,6 @@ function ConfirmTransactionPanel (props: Props) { const [currentTokenAllowance, setCurrentTokenAllowance] = React.useState('') const [isEditingAllowance, setIsEditingAllowance] = React.useState(false) - // Will remove this hardcoded value once we know - // where the site info will be coming from. - const siteURL = 'https://app.compound.finance' - const findSpotPrice = usePricing(transactionSpotPrices) const parseTransaction = useTransactionParser(selectedNetwork, accounts, transactionSpotPrices, visibleTokens, fullTokenList) const transactionDetails = parseTransaction(transactionInfo) diff --git a/components/brave_wallet_ui/panel/container.tsx b/components/brave_wallet_ui/panel/container.tsx index 53a84124b021..bd0bda482c3e 100644 --- a/components/brave_wallet_ui/panel/container.tsx +++ b/components/brave_wallet_ui/panel/container.tsx @@ -484,16 +484,16 @@ function Container (props: Props) { if (selectedPendingTransaction && selectedPanel === 'connectHardwareWallet') { return ( - - - - - + + + + + ) } @@ -502,6 +502,7 @@ function Container (props: Props) { { return (