Merge branch 'develop' into je-rns-integration
This commit is contained in:
commit
2c7aec997d
|
@ -2,6 +2,10 @@
|
|||
|
||||
## Current Master
|
||||
|
||||
- [#385](https://github.com/poanetwork/nifty-wallet/pull/385) - (Feature) Display value of current pending tx's nonce on send tx screen
|
||||
- [#384](https://github.com/poanetwork/nifty-wallet/pull/384) - (Fix) placement of HW Connect button title
|
||||
- [#383](https://github.com/poanetwork/nifty-wallet/pull/383) - (Chore) Replace POA-ETH Binance link to POA-BTC
|
||||
- [#382](https://github.com/poanetwork/nifty-wallet/pull/382) - (Fix) replace vulnerable npm dependencies with newer versions of packages, update chromedriver to match the latest Google Chrome release
|
||||
- [#381](https://github.com/poanetwork/nifty-wallet/pull/381) - (Feature) Add RNS integration
|
||||
- [#381](https://github.com/poanetwork/nifty-wallet/pull/381) - (Fix) ENS/RNS integration when sending tokens
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ function getExchanges ({network, amount, address}) {
|
|||
return [
|
||||
{
|
||||
name: 'Binance',
|
||||
link: 'https://www.binance.com/en/trade/POA_ETH',
|
||||
link: 'https://www.binance.com/en/trade/POA_BTC',
|
||||
},
|
||||
{
|
||||
name: 'BiBox',
|
||||
|
|
|
@ -444,6 +444,7 @@ module.exports = class MetamaskController extends EventEmitter {
|
|||
markPasswordForgotten: this.markPasswordForgotten.bind(this),
|
||||
unMarkPasswordForgotten: this.unMarkPasswordForgotten.bind(this),
|
||||
getGasPrice: (cb) => cb(null, this.getGasPrice()),
|
||||
getPendingNonce: nodeify(this.getPendingNonce, this),
|
||||
|
||||
// shapeshift
|
||||
createShapeShiftTx: this.createShapeShiftTx.bind(this),
|
||||
|
|
|
@ -29,6 +29,18 @@ const optionalDataValueStyle = {
|
|||
}
|
||||
|
||||
class SendTransactionScreen extends PersistentForm {
|
||||
constructor (props) {
|
||||
super(props)
|
||||
this.state = {
|
||||
pendingNonce: null,
|
||||
}
|
||||
}
|
||||
|
||||
async getPendingNonce () {
|
||||
const pendingNonce = await this.props.dispatch(actions.getPendingNonce(this.props.address))
|
||||
this.setState({pendingNonce: pendingNonce})
|
||||
}
|
||||
|
||||
render () {
|
||||
this.persistentFormParentId = 'send-tx-form'
|
||||
|
||||
|
@ -117,12 +129,17 @@ class SendTransactionScreen extends PersistentForm {
|
|||
dataset={{
|
||||
persistentFormid: 'tx-custom-nonce',
|
||||
}}
|
||||
defaultValue={this.state.pendingNonce}
|
||||
/>
|
||||
</section>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
this.getPendingNonce()
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
this.props.dispatch(actions.displayWarning(''))
|
||||
}
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
flex: 1;
|
||||
justify-content: center;
|
||||
text-transform: uppercase;
|
||||
line-height: 54px;
|
||||
}
|
||||
.hw-connect__connect-btn.disabled {
|
||||
cursor: not-allowed;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
14
package.json
14
package.json
|
@ -156,7 +156,7 @@
|
|||
"lodash.uniqby": "^4.7.0",
|
||||
"loglevel": "^1.4.1",
|
||||
"metamascara": "^2.0.0",
|
||||
"mkdirp": "^0.5.1",
|
||||
"mkdirp": "^0.5.5",
|
||||
"multihashes": "^0.4.12",
|
||||
"nanoid": "^2.1.6",
|
||||
"nifty-wallet-inpage-provider": "github:poanetwork/nifty-wallet-inpage-provider#1.5.1",
|
||||
|
@ -229,7 +229,7 @@
|
|||
"@storybook/addon-info": "^5.3.14",
|
||||
"@storybook/addon-knobs": "^5.3.14",
|
||||
"@storybook/react": "^5.3.14",
|
||||
"addons-linter": "^1.22.0",
|
||||
"addons-linter": "^1.25.0",
|
||||
"babel-eslint": "^10.0.2",
|
||||
"babel-loader": "^8.0.6",
|
||||
"babelify": "^10.0.0",
|
||||
|
@ -237,7 +237,7 @@
|
|||
"browserify": "^16.2.3",
|
||||
"browserify-derequire": "^1.0.1",
|
||||
"chai": "^4.1.0",
|
||||
"chromedriver": "^80.0.2",
|
||||
"chromedriver": "^83.0.0",
|
||||
"clipboardy": "^1.2.3",
|
||||
"compression": "^1.7.1",
|
||||
"coveralls": "^3.0.0",
|
||||
|
@ -276,14 +276,14 @@
|
|||
"gulp-util": "^3.0.7",
|
||||
"gulp-watch": "^5.0.1",
|
||||
"gulp-zip": "^4.0.0",
|
||||
"http-server": "^0.12.1",
|
||||
"http-server": "^0.12.3",
|
||||
"image-size": "^0.6.2",
|
||||
"isomorphic-fetch": "^2.2.1",
|
||||
"jsdoc": "^3.6.3",
|
||||
"jsdom": "^11.2.0",
|
||||
"jsdom-global": "^3.0.2",
|
||||
"jshint-stylish": "~2.2.1",
|
||||
"karma": "^4.4.1",
|
||||
"karma": "^5.0.9",
|
||||
"karma-chrome-launcher": "^2.2.0",
|
||||
"karma-cli": "^1.0.1",
|
||||
"karma-firefox-launcher": "^1.0.1",
|
||||
|
@ -294,7 +294,7 @@
|
|||
"mocha-jsdom": "^1.1.0",
|
||||
"mocha-sinon": "^2.0.0",
|
||||
"nock": "^9.0.14",
|
||||
"node-sass": "^4.12.0",
|
||||
"node-sass": "^4.14.1",
|
||||
"nyc": "^15.0.0",
|
||||
"path": "^0.12.7",
|
||||
"png-file-stream": "^1.1.0",
|
||||
|
@ -318,7 +318,7 @@
|
|||
"source-map": "^0.7.2",
|
||||
"static-server": "^2.2.1",
|
||||
"style-loader": "^0.21.0",
|
||||
"stylelint": "^9.10.1",
|
||||
"stylelint": "^13.6.0",
|
||||
"stylelint-config-standard": "^18.2.0",
|
||||
"tape": "^4.5.1",
|
||||
"testem": "^2.16.0",
|
||||
|
|
|
@ -71,7 +71,7 @@ describe('', function () {
|
|||
assert.deepEqual(exchanges, [
|
||||
{
|
||||
name: 'Binance',
|
||||
link: 'https://www.binance.com/en/trade/POA_ETH',
|
||||
link: 'https://www.binance.com/en/trade/POA_BTC',
|
||||
},
|
||||
{
|
||||
name: 'BiBox',
|
||||
|
|
|
@ -188,6 +188,7 @@ const actions = {
|
|||
signTokenTx: signTokenTx,
|
||||
updateTransaction,
|
||||
updateAndApproveTx,
|
||||
getPendingNonce,
|
||||
cancelTx,
|
||||
cancelTxs,
|
||||
completedTx: completedTx,
|
||||
|
@ -1304,6 +1305,24 @@ function updateAndApproveTx (txData) {
|
|||
}
|
||||
}
|
||||
|
||||
function getPendingNonce (address) {
|
||||
log.info('actions: getPendingNonce')
|
||||
return (dispatch) => {
|
||||
log.debug(`actions calling background.getPendingNonce`)
|
||||
dispatch(actions.showLoadingIndication())
|
||||
return new Promise((resolve, reject) => {
|
||||
background.getPendingNonce(address, (err, nonce) => {
|
||||
if (err) {
|
||||
dispatch(actions.displayWarning(err.message))
|
||||
return reject(err)
|
||||
}
|
||||
dispatch(actions.hideLoadingIndication())
|
||||
resolve(nonce)
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
function completedTx (id) {
|
||||
return {
|
||||
type: actions.COMPLETED_TX,
|
||||
|
|
Loading…
Reference in New Issue