File tree 1 file changed +46
-20
lines changed
components/brave_new_tab_ui/components/default/binance
1 file changed +46
-20
lines changed Original file line number Diff line number Diff line change @@ -741,7 +741,6 @@ class Binance extends React.PureComponent<Props, State> {
741
741
const cleanName = this . currencyNames [ currentDepositAsset ]
742
742
const cleanNameDisplay = cleanName ? `(${ cleanName } )` : ''
743
743
const depositData = tag || address
744
- const label = tag ? 'binanceWidgetDepositMemo' : 'binanceWidgetDepositAddress'
745
744
746
745
return (
747
746
< >
@@ -769,27 +768,54 @@ class Binance extends React.PureComponent<Props, State> {
769
768
}
770
769
</ ListItem >
771
770
< DetailArea >
772
- < MemoArea >
773
- < MemoInfo >
774
- < DetailLabel >
775
- { `${ currentDepositAsset } ${ getLocale ( label ) } ` }
776
- </ DetailLabel >
777
- < DetailInfo >
778
- {
779
- depositData
780
- ? depositData
781
- : getLocale ( 'binanceWidgetAddressUnavailable' )
782
- }
783
- </ DetailInfo >
784
- </ MemoInfo >
785
- {
786
- depositData
787
- ? < CopyButton onClick = { this . copyToClipboard . bind ( this , depositData ) } >
771
+ {
772
+ ! depositData
773
+ ? < MemoArea >
774
+ < MemoInfo >
775
+ < DetailLabel >
776
+ { `${ currentDepositAsset } ` }
777
+ </ DetailLabel >
778
+ < DetailInfo >
779
+ { getLocale ( 'binanceWidgetAddressUnavailable' ) }
780
+ </ DetailInfo >
781
+ </ MemoInfo >
782
+ </ MemoArea >
783
+ : null
784
+ }
785
+ {
786
+ address
787
+ ? < MemoArea >
788
+ < MemoInfo >
789
+ < DetailLabel >
790
+ { `${ currentDepositAsset } ${ getLocale ( 'binanceWidgetDepositAddress' ) } ` }
791
+ </ DetailLabel >
792
+ < DetailInfo >
793
+ { address }
794
+ </ DetailInfo >
795
+ </ MemoInfo >
796
+ < CopyButton onClick = { this . copyToClipboard . bind ( this , address ) } >
788
797
{ getLocale ( 'binanceWidgetCopy' ) }
789
798
</ CopyButton >
790
- : null
791
- }
792
- </ MemoArea >
799
+ </ MemoArea >
800
+ : null
801
+ }
802
+ {
803
+ tag
804
+ ? < MemoArea >
805
+ < MemoInfo >
806
+ < DetailLabel >
807
+ { `${ currentDepositAsset } ${ getLocale ( 'binanceWidgetDepositMemo' ) } ` }
808
+ </ DetailLabel >
809
+ < DetailInfo >
810
+ { tag }
811
+ </ DetailInfo >
812
+ </ MemoInfo >
813
+ < CopyButton onClick = { this . copyToClipboard . bind ( this , tag ) } >
814
+ { getLocale ( 'binanceWidgetCopy' ) }
815
+ </ CopyButton >
816
+ </ MemoArea >
817
+ : null
818
+ }
793
819
</ DetailArea >
794
820
</ >
795
821
)
You can’t perform that action at this time.
0 commit comments