Fix local tx requests (#3589)
* [localtx] Poll every second, dettach on unmount * Fixed webpack config for dapps * Fixed webpack PROXY config
This commit is contained in:
parent
2996499a06
commit
d429f5526f
@ -32,8 +32,13 @@ export default class Application extends Component {
|
||||
}
|
||||
|
||||
componentDidMount () {
|
||||
const poll = () => this.fetchTransactionData().then(poll).catch(poll);
|
||||
this._timeout = setTimeout(poll, 2000);
|
||||
const poll = () => {
|
||||
this._timeout = window.setTimeout(() => {
|
||||
this.fetchTransactionData().then(poll).catch(poll);
|
||||
}, 1000);
|
||||
};
|
||||
|
||||
poll();
|
||||
}
|
||||
|
||||
componentWillUnmount () {
|
||||
|
@ -207,13 +207,13 @@ module.exports = {
|
||||
autoRewrite: true
|
||||
},
|
||||
{
|
||||
context: '/api/*',
|
||||
context: '/api',
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
autoRewrite: true
|
||||
},
|
||||
{
|
||||
context: '/app/*',
|
||||
context: '/app',
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
@ -221,7 +221,7 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
{
|
||||
context: '/parity-utils/*',
|
||||
context: '/parity-utils',
|
||||
target: 'http://127.0.0.1:3000',
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
@ -229,8 +229,8 @@ module.exports = {
|
||||
}
|
||||
},
|
||||
{
|
||||
context: '/rpc/*',
|
||||
target: 'http://localhost:8080',
|
||||
context: '/rpc',
|
||||
target: 'http://127.0.0.1:8080',
|
||||
changeOrigin: true
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user