From f44c5b2292c8688931127e3cb582edd36edfed75 Mon Sep 17 00:00:00 2001 From: fragosti Date: Thu, 8 Nov 2018 16:08:20 -0800 Subject: chore: PR feedback --- .../instant/src/components/payment_method_dropdown.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/packages/instant/src/components/payment_method_dropdown.tsx b/packages/instant/src/components/payment_method_dropdown.tsx index 6f3634301..bdce2a49d 100644 --- a/packages/instant/src/components/payment_method_dropdown.tsx +++ b/packages/instant/src/components/payment_method_dropdown.tsx @@ -9,16 +9,16 @@ import { format } from '../util/format'; import { Dropdown, DropdownItemConfig } from './ui/dropdown'; export interface PaymentMethodDropdownProps { - selectedEthAddress: string; - addressEthBaseAmount: BigNumber; + accountAddress: string; + accountEthBalanceInWei?: BigNumber; network: Network; } export class PaymentMethodDropdown extends React.Component { public render(): React.ReactNode { - const { selectedEthAddress, addressEthBaseAmount } = this.props; - const value = format.ethAddress(selectedEthAddress); - const label = format.ethBaseAmount(addressEthBaseAmount) as string; + const { accountAddress, accountEthBalanceInWei } = this.props; + const value = format.ethAddress(accountAddress); + const label = format.ethBaseAmount(accountEthBalanceInWei, 4, '') as string; return ; } private readonly _getDropdownItemConfigs = (): DropdownItemConfig[] => { @@ -33,12 +33,12 @@ export class PaymentMethodDropdown extends React.Component { - const { selectedEthAddress, network } = this.props; - const etherscanUrl = etherscanUtil.getEtherScanEthAddressIfExists(selectedEthAddress, network); + const { accountAddress, network } = this.props; + const etherscanUrl = etherscanUtil.getEtherScanEthAddressIfExists(accountAddress, network); window.open(etherscanUrl, '_blank'); }; private readonly _handleCopyToClipboardClick = (): void => { - const { selectedEthAddress } = this.props; - copy(selectedEthAddress); + const { accountAddress } = this.props; + copy(accountAddress); }; } -- cgit