From cbe61ac315ba214090b85b9e0ce848fb01075c07 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Wed, 4 Apr 2018 13:35:08 -0700 Subject: Fix missing key warnings in wallet component --- packages/website/ts/components/wallet/wallet.tsx | 13 ++++++++++--- packages/website/ts/components/wallet/wrap_ether_item.tsx | 6 ++++-- 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx index 39c95d31c..64e8bb53f 100644 --- a/packages/website/ts/components/wallet/wallet.tsx +++ b/packages/website/ts/components/wallet/wallet.tsx @@ -121,6 +121,10 @@ const ZRX_TOKEN_SYMBOL = 'ZRX'; const ETHER_SYMBOL = 'ETH'; const ICON_DIMENSION = 24; const TOKEN_AMOUNT_DISPLAY_PRECISION = 3; +const HEADER_ITEM_KEY = 'HEADER'; +const FOOTER_ITEM_KEY = 'FOOTER'; +const DISCONNECTED_ITEM_KEY = 'DISCONNECTED'; +const ETHER_ITEM_KEY = 'ETHER'; export class Wallet extends React.Component { private _isUnmounted: boolean; @@ -196,6 +200,7 @@ export class Wallet extends React.Component { const primaryText = 'wallet'; return ( } style={styles.paddedItem} @@ -206,6 +211,7 @@ export class Wallet extends React.Component { private _renderDisconnectedRows() { return ( { const primaryText = utils.getAddressBeginAndEnd(userAddress); return ( } style={{ ...styles.paddedItem, ...styles.borderedItem }} @@ -226,7 +233,7 @@ export class Wallet extends React.Component { } private _renderFooterRows() { const primaryText = '+ other tokens'; - return ; + return ; } private _renderEthRows() { const primaryText = this._renderAmount( @@ -245,7 +252,7 @@ export class Wallet extends React.Component { : { ...styles.tokenItem, ...styles.borderedItem, ...styles.paddedItem }; const etherToken = this._getEthToken(); return ( -
+
} @@ -304,7 +311,7 @@ export class Wallet extends React.Component { : { ...styles.tokenItem, ...styles.borderedItem, ...styles.paddedItem }; const etherToken = this._getEthToken(); return ( -
+
); @@ -123,10 +123,12 @@ export class WrapEtherItem extends React.Component
+ ) : ( + undefined ); } private _renderWrapEtherConfirmationButton() { -- cgit v1.2.3 From c396be42b9365b5f2e6274d0a4e25e3e6e25cdd0 Mon Sep 17 00:00:00 2001 From: Brandon Millman Date: Thu, 5 Apr 2018 12:13:55 -0700 Subject: Change undefined to null --- packages/website/ts/components/wallet/wrap_ether_item.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'packages') diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx index be394afb9..a38163770 100644 --- a/packages/website/ts/components/wallet/wrap_ether_item.tsx +++ b/packages/website/ts/components/wallet/wrap_ether_item.tsx @@ -127,9 +127,7 @@ export class WrapEtherItem extends React.Component
- ) : ( - undefined - ); + ) : null; } private _renderWrapEtherConfirmationButton() { const isWrappingEth = this.props.direction === Side.Deposit; -- cgit v1.2.3