mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-09-20 23:18:00 +03:00
btc: default sign method to bridge to reduce master ticket exposure
This commit is contained in:
parent
2d76c3868e
commit
5a670b75cf
@ -48,7 +48,7 @@ export default class Send extends Component {
|
||||
showModal: false,
|
||||
note: '',
|
||||
choosingSignMethod: false,
|
||||
signMethod: 'Sign Transaction',
|
||||
signMethod: 'bridge',
|
||||
};
|
||||
|
||||
this.initPayment = this.initPayment.bind(this);
|
||||
@ -86,7 +86,7 @@ export default class Send extends Component {
|
||||
}
|
||||
|
||||
setSignMethod(signMethod) {
|
||||
this.setState({signMethod});
|
||||
this.setState({signMethod, choosingSignMethod: false});
|
||||
}
|
||||
|
||||
checkPayee(e){
|
||||
@ -204,7 +204,7 @@ export default class Send extends Component {
|
||||
const signReady = (this.state.ready && (parseInt(this.state.satsAmount) > 0)) && !signing;
|
||||
|
||||
let invoice = null;
|
||||
if (signMethod === 'Sign Transaction') {
|
||||
if (signMethod === 'masterTicket') {
|
||||
invoice =
|
||||
<Invoice
|
||||
network={network}
|
||||
@ -218,7 +218,7 @@ export default class Send extends Component {
|
||||
satsAmount={satsAmount}
|
||||
state={this.props.state}
|
||||
/>
|
||||
} else if (signMethod === 'Sign with Bridge') {
|
||||
} else if (signMethod === 'bridge') {
|
||||
invoice =
|
||||
<BridgeInvoice
|
||||
state={this.props.state}
|
||||
@ -439,6 +439,22 @@ export default class Send extends Component {
|
||||
border='none'
|
||||
style={{cursor: signReady ? 'pointer' : 'default'}} />
|
||||
</Row>
|
||||
{signMethod === 'masterTicket' &&
|
||||
<Row mt={4}>
|
||||
<Box
|
||||
backgroundColor='orange'
|
||||
color='white'
|
||||
borderRadius='32px'
|
||||
p={3}
|
||||
>
|
||||
<Col>
|
||||
<Text color='white' fontWeight='bold' fontSize={1}>
|
||||
To reduce the exposure of your master ticket we recommend signing transactions with Bridge
|
||||
</Text>
|
||||
</Col>
|
||||
</Box>
|
||||
</Row>
|
||||
}
|
||||
</Col>
|
||||
}
|
||||
</>
|
||||
|
@ -19,26 +19,26 @@ export default function Signer(props) {
|
||||
backgroundColor='transparent'
|
||||
fontWeight='bold'
|
||||
cursor='pointer'
|
||||
color={(signMethod === 'Sign Transaction') ? 'blue' : 'lightBlue'}
|
||||
color={(signMethod === 'masterTicket') ? 'blue' : 'lightBlue'}
|
||||
py='24px'
|
||||
px='24px'
|
||||
onClick={() => setSignMethod('Sign Transaction')}
|
||||
children='Sign Transaction' />
|
||||
onClick={() => setSignMethod('masterTicket')}
|
||||
children='Sign with Master Ticket' />
|
||||
<Button
|
||||
border='none'
|
||||
backgroundColor='transparent'
|
||||
fontWeight='bold'
|
||||
cursor='pointer'
|
||||
color={(signMethod === 'Sign with Bridge') ? 'blue' : 'lightBlue'}
|
||||
color={(signMethod === 'bridge') ? 'blue' : 'lightBlue'}
|
||||
py='24px'
|
||||
px='24px'
|
||||
onClick={() => setSignMethod('Sign with Bridge')}
|
||||
onClick={() => setSignMethod('bridge')}
|
||||
children='Sign with Bridge' />
|
||||
</Box>
|
||||
:
|
||||
<Button
|
||||
primary
|
||||
children={signMethod}
|
||||
children={signMethod === 'bridge' ? 'Sign with Bridge' : 'Sign with Master Ticket'}
|
||||
fontSize={1}
|
||||
fontWeight='bold'
|
||||
borderRadius='24px'
|
||||
|
Loading…
Reference in New Issue
Block a user