mirror of
https://github.com/status-im/MyCrypto.git
synced 2025-02-03 14:54:17 +00:00
Merge branch 'develop' into prep-1-2-0
This commit is contained in:
commit
dbb151671f
@ -76,6 +76,16 @@ class SimpleGas extends React.Component<Props> {
|
||||
min: gasEstimates ? gasEstimates.safeLow : gasPriceDefaults.min
|
||||
};
|
||||
|
||||
/**
|
||||
* @desc On retrieval of gas estimates,
|
||||
* the current gas price may be lower than the lowest recommended price.
|
||||
* `rc-slider` will force the onChange if the value is too low, so we
|
||||
* ensure it at least passes the lower boundary.
|
||||
* When this occurs, the logic in `UNSAFE_componentWillReceiveProps` fires,
|
||||
* and it cannot happen again from that point forward.
|
||||
*/
|
||||
const actualGasPrice = Math.max(this.getGasPriceGwei(gasPrice.value), bounds.min);
|
||||
|
||||
return (
|
||||
<div className="SimpleGas row form-group">
|
||||
<div className="SimpleGas-title">
|
||||
@ -103,7 +113,7 @@ class SimpleGas extends React.Component<Props> {
|
||||
min={bounds.min}
|
||||
max={bounds.max}
|
||||
step={bounds.min < 1 ? 0.1 : 1}
|
||||
value={this.getGasPriceGwei(gasPrice.value)}
|
||||
value={actualGasPrice}
|
||||
tipFormatter={this.formatTooltip}
|
||||
disabled={isGasEstimating}
|
||||
/>
|
||||
|
@ -17,6 +17,13 @@ interface Props {
|
||||
onUnlock(param: any): void;
|
||||
}
|
||||
|
||||
interface SignerAddress {
|
||||
address: string;
|
||||
chainId: number;
|
||||
}
|
||||
|
||||
type SignerQrContent = SignerAddress | string;
|
||||
|
||||
class ParitySignerDecryptClass extends PureComponent<Props> {
|
||||
public render() {
|
||||
return (
|
||||
@ -36,13 +43,13 @@ class ParitySignerDecryptClass extends PureComponent<Props> {
|
||||
);
|
||||
}
|
||||
|
||||
private unlockAddress = (address: string) => {
|
||||
if (!isValidETHAddress(address)) {
|
||||
private unlockAddress = (content: SignerQrContent) => {
|
||||
if (typeof content === 'string' || !isValidETHAddress(content.address)) {
|
||||
this.props.showNotification('danger', 'Not a valid address!');
|
||||
return;
|
||||
}
|
||||
|
||||
this.props.onUnlock(new ParitySignerWallet(address));
|
||||
this.props.onUnlock(new ParitySignerWallet(content.address));
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ interface Props extends ReactSelectProps {
|
||||
|
||||
export default class Dropdown extends React.Component<Props> {
|
||||
public state = {
|
||||
selectedOption: { value: '', label: '' },
|
||||
selectedOption: { value: undefined, label: '' },
|
||||
hasBlurred: false
|
||||
};
|
||||
|
||||
@ -43,13 +43,13 @@ export default class Dropdown extends React.Component<Props> {
|
||||
});
|
||||
}
|
||||
}}
|
||||
{...this.props}
|
||||
className={`${this.props.className} ${this.state.hasBlurred ? 'has-blurred' : ''}`}
|
||||
value={value}
|
||||
onChange={obj => {
|
||||
this.handleChange(obj as any);
|
||||
onChange();
|
||||
onChange(obj as any);
|
||||
}}
|
||||
{...this.props}
|
||||
onBlur={e => {
|
||||
this.setState({ hasBlurred: true });
|
||||
if (this.props && this.props.onBlur) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import { addHexPrefix } from 'ethereumjs-util';
|
||||
import translate, { translateRaw } from 'translations';
|
||||
import { AppState } from 'features/reducers';
|
||||
import { paritySignerActions } from 'features/paritySigner';
|
||||
@ -95,7 +95,7 @@ class QrSignerModal extends React.Component<Props, State> {
|
||||
return;
|
||||
}
|
||||
|
||||
this.props.finalizeSignature(signature);
|
||||
this.props.finalizeSignature(addHexPrefix(signature));
|
||||
this.setState({ scan: false });
|
||||
};
|
||||
}
|
||||
|
@ -195,6 +195,12 @@ class InteractForm extends Component<Props, State> {
|
||||
abiJson: fullContract.abi || '',
|
||||
contract
|
||||
});
|
||||
} else {
|
||||
this.props.setCurrentTo('');
|
||||
this.setState({
|
||||
abiJson: '',
|
||||
contract
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -10,17 +10,17 @@
|
||||
"npm": ">= 5.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@parity/qr-signer": "0.3.1",
|
||||
"@ledgerhq/hw-app-eth": "4.7.3",
|
||||
"@ledgerhq/hw-transport-node-hid": "4.7.6",
|
||||
"@ledgerhq/hw-transport-u2f": "4.12.0",
|
||||
"@parity/qr-signer": "0.2.1",
|
||||
"babel-polyfill": "6.26.0",
|
||||
"bip39": "2.5.0",
|
||||
"bn.js": "4.11.8",
|
||||
"bootstrap-sass": "3.3.7",
|
||||
"classnames": "2.2.5",
|
||||
"electron-updater": "2.21.10",
|
||||
"ethereum-blockies-base64": "1.0.1",
|
||||
"ethereum-blockies-base64": "1.0.2",
|
||||
"ethereumjs-abi": "git://github.com/ethereumjs/ethereumjs-abi.git#09c3c48fd3bed143df7fa8f36f6f164205e23796",
|
||||
"ethereumjs-tx": "1.3.4",
|
||||
"ethereumjs-util": "5.1.5",
|
||||
|
25
yarn.lock
25
yarn.lock
@ -73,11 +73,16 @@
|
||||
dependencies:
|
||||
events "^2.0.0"
|
||||
|
||||
"@parity/qr-signer@0.2.1":
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@parity/qr-signer/-/qr-signer-0.2.1.tgz#f8b0e0ff5d8ee90b1788951c8524cdf8b1aadf27"
|
||||
"@parity/erc681@0.1.1":
|
||||
version "0.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@parity/erc681/-/erc681-0.1.1.tgz#0ade5233751011c15d5e75bd2bb583a9ba450a5e"
|
||||
|
||||
"@parity/qr-signer@0.3.1":
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@parity/qr-signer/-/qr-signer-0.3.1.tgz#00a983c7311a3d14701fae0b95f014e8a2a77618"
|
||||
dependencies:
|
||||
qrcode-generator "1.3.1"
|
||||
"@parity/erc681" "0.1.1"
|
||||
qrcode-generator "1.4.0"
|
||||
react-qr-reader "2.1.0"
|
||||
|
||||
"@sindresorhus/is@^0.7.0":
|
||||
@ -3915,9 +3920,9 @@ etag@~1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887"
|
||||
|
||||
ethereum-blockies-base64@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/ethereum-blockies-base64/-/ethereum-blockies-base64-1.0.1.tgz#e8c52bee8d71a089a7732b917a4c4ae23f679ba4"
|
||||
ethereum-blockies-base64@1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/ethereum-blockies-base64/-/ethereum-blockies-base64-1.0.2.tgz#4aebca52142bf4d16a3144e6e2b59303e39ed2b3"
|
||||
dependencies:
|
||||
pnglib "0.0.1"
|
||||
|
||||
@ -9066,9 +9071,9 @@ qr.js@0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/qr.js/-/qr.js-0.0.0.tgz#cace86386f59a0db8050fa90d9b6b0e88a1e364f"
|
||||
|
||||
qrcode-generator@1.3.1:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.3.1.tgz#eedcbe967ceba5585f0f4b8d9d7916961a335369"
|
||||
qrcode-generator@1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/qrcode-generator/-/qrcode-generator-1.4.0.tgz#23521ae5d13658adb745a38f19e00c00f9b8488c"
|
||||
|
||||
qrcode.react@0.8.0:
|
||||
version "0.8.0"
|
||||
|
Loading…
x
Reference in New Issue
Block a user