File tree Expand file tree Collapse file tree 6 files changed +31
-26
lines changed
Expand file tree Collapse file tree 6 files changed +31
-26
lines changed Original file line number Diff line number Diff line change 11import React , { Component } from 'react'
22import PropTypes from 'prop-types'
33import Modal from '@material-ui/core/Modal'
4+ import InfoIcon from '../../icons/info.svg'
45
56import { Stepper , Step , StepLabel } from '@material-ui/core'
67
@@ -37,10 +38,9 @@ class WalletActionPopup extends Component {
3738 } ) }
3839 </ Stepper > : < div className = 'WalletActionPopup_step' > { activeStep . label } </ div > }
3940 < div className = 'WalletActionPopup_instructions' >
40- < div className = 'WalletActionPopup_message' >
41- < p > { activeStep . description } </ p >
42- { activeStep . image && < img src = { activeStep . image } alt = { activeStep . description } /> }
43- </ div >
41+ < p className = 'WalletActionPopup_instructions_description' > { activeStep . description } </ p >
42+ { activeStep . info && < p className = 'WalletActionPopup_instructions_info' > < img src = { InfoIcon } alt = 'info' /> { activeStep . info } </ p > }
43+ { activeStep . image && < img className = 'WalletActionPopup_instructions_image' src = { activeStep . image } alt = { activeStep . description } /> }
4444 </ div >
4545 </ div >
4646 </ div >
Original file line number Diff line number Diff line change 5656 font-size : $font-size-sm ;
5757
5858 p {
59- height : 40px ;
60- padding : 0 20px 6px 32px ;
59+ margin-bottom : 0 ;
6160 }
6261
63- img {
62+ & _description {
63+ padding : 0 20px 0 32px ;
64+ }
65+
66+ & _info {
67+ padding : 4px 20px 0 32px ;
68+ font-size : 11px ;
69+ img {
70+ width : 13px ;
71+ margin-top : -2px ;
72+ }
73+ }
74+
75+ & _image {
6476 display : block ;
6577 margin : 20px auto ;
6678 }
Original file line number Diff line number Diff line change 11import React , { Component } from 'react'
2- import _ from 'lodash'
32import Button from '../../components/Button/Button'
43import SwapPairPanel from '../../components/SwapPairPanel/SwapPairPanel'
54import AssetSelector from '../../components/AssetSelector/AssetSelector'
Original file line number Diff line number Diff line change @@ -2,11 +2,9 @@ import React, { Component } from 'react'
22import BrandCard from '../../components/BrandCard/BrandCard'
33import Button from '../../components/Button/Button'
44import cryptoassets from '@liquality/cryptoassets'
5- import { isETHNetwork } from '../../utils/networks'
65import { getClaimErrors } from '../../utils/validation'
76import ExpirationDetails from '../../components/ExpirationDetails'
87
9- import InfoIcon from '../../icons/info.svg'
108import './SwapRedemption.css'
119
1210class SwapRedemption extends Component {
@@ -25,8 +23,6 @@ class SwapRedemption extends Component {
2523 < div className = 'SwapRedemption_info' >
2624 < p > Before you claim < br />
2725 Connect the account that you provided as { claimCurrency . code } receiving address</ p >
28- { isETHNetwork ( this . props . assets . b . currency ) &&
29- < p className = 'SwapRedemption_info_eth' > < img src = { InfoIcon } alt = 'info' /> The zero balance when signing refers to the contract. After claiming you will receive the { claimCurrency . code } amount above.</ p > }
3026 </ div >
3127 < p >
3228 { ! errors . claim && < Button wide primary loadingMessage = { this . props . loadingMessage } onClick = { this . props . redeemSwap } > Claim Your { claimCurrency . code } </ Button > }
Original file line number Diff line number Diff line change 1313 width : 600px ;
1414 margin : 0 auto 30px auto ;
1515 text-align : left ;
16-
17- & _eth {
18- font-size : $font-size-sm ;
19- img {
20- width : 13px ;
21- margin-top : -2px ;
22- }
23- }
2416 }
2517
2618 & _errorMessage {
Original file line number Diff line number Diff line change @@ -73,6 +73,12 @@ function toRefundPopup (popup) {
7373 } ) }
7474}
7575
76+ function toEthereumClaimPopup ( popup ) {
77+ return { steps : toClaimPopup ( popup ) . steps . map ( step => {
78+ return step . id === WALLET_ACTION_STEPS . CONFIRM ? { ...step , info : 'The zero balance when signing refers to the contract. After claiming you will receive the correct amount.' } : step
79+ } ) }
80+ }
81+
7682const initiatePopups = {
7783 ledger : {
7884 btc : bitcoinLedgerPopup ,
@@ -93,17 +99,17 @@ const initiatePopups = {
9399const claimPopups = {
94100 ledger : {
95101 btc : toClaimPopup ( bitcoinLedgerPopup ) ,
96- eth : toClaimPopup ( ethereumLedgerPopup ) ,
97- erc20 : toClaimPopup ( ethereumLedgerPopup )
102+ eth : toEthereumClaimPopup ( ethereumLedgerPopup ) ,
103+ erc20 : toEthereumClaimPopup ( ethereumLedgerPopup )
98104 } ,
99105 metamask : {
100- eth : toClaimPopup ( ethereumMetamaskPopup ) ,
101- erc20 : toClaimPopup ( ERC20MetamaskPopup )
106+ eth : toEthereumClaimPopup ( ethereumMetamaskPopup ) ,
107+ erc20 : toEthereumClaimPopup ( ERC20MetamaskPopup )
102108 } ,
103109 default : {
104110 btc : toClaimPopup ( defaultPopup ) ,
105- eth : toClaimPopup ( defaultPopup ) ,
106- erc20 : toClaimPopup ( defaultERC20Popup )
111+ eth : toEthereumClaimPopup ( defaultPopup ) ,
112+ erc20 : toEthereumClaimPopup ( defaultERC20Popup )
107113 }
108114}
109115
You can’t perform that action at this time.
0 commit comments