Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Fix local tx requests #3589

Merged
merged 4 commits into from
Nov 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions js/src/dapps/localtx/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand Down
10 changes: 5 additions & 5 deletions js/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,30 +207,30 @@ 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: {
'^/app': ''
}
},
{
context: '/parity-utils/*',
context: '/parity-utils',
target: 'http://127.0.0.1:3000',
changeOrigin: true,
pathRewrite: {
'^/parity-utils': ''
}
},
{
context: '/rpc/*',
target: 'http://localhost:8080',
context: '/rpc',
target: 'http://127.0.0.1:8080',
changeOrigin: true
}
]
Expand Down