aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-11-09 08:08:20 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-11-09 08:08:20 +0800
commitf44c5b2292c8688931127e3cb582edd36edfed75 (patch)
treee57c13b95ca4ee04142af0586f0dd100150246ff /packages/instant
parent5d74421e438d0b56f31344f5fc4d4abbcb190722 (diff)
downloaddexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar.gz
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar.bz2
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar.lz
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar.xz
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.tar.zst
dexon-sol-tools-f44c5b2292c8688931127e3cb582edd36edfed75.zip
chore: PR feedback
Diffstat (limited to 'packages/instant')
-rw-r--r--packages/instant/src/components/payment_method_dropdown.tsx18
1 files 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<PaymentMethodDropdownProps> {
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 <Dropdown value={value} label={label} items={this._getDropdownItemConfigs()} />;
}
private readonly _getDropdownItemConfigs = (): DropdownItemConfig[] => {
@@ -33,12 +33,12 @@ export class PaymentMethodDropdown extends React.Component<PaymentMethodDropdown
return [viewOnEtherscan, copyAddressToClipboard];
};
private readonly _handleEtherscanClick = (): void => {
- 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);
};
}