Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.

Commit

Permalink
chore: stupid error (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
sxlwar authored Aug 4, 2021
1 parent 5952dd9 commit de8691e
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/page/CrossChain/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -707,9 +707,8 @@ class CrossChain extends Component {
const promises = [ethereumGenesisInfo, ethereumToDarwiniaCrossChainInfo];

if (config.IS_DEV) {
promises.push(getErc20TokenLockRecords({ sender: address, row: 200, page: 0 }))
}
Promise.all(promises)
promises.push(getErc20TokenLockRecords({ sender: address, row: 200, page: 0 }));
Promise.all(promises)
.then(([genesisHistory, crosschainHistory, erc20CrossChain]) => this.getSymbolMap(erc20CrossChain.list).then(symbolMap => [genesisHistory, crosschainHistory, erc20CrossChain, symbolMap]))
.then(([genesisHistory, crosschainHistory, erc20CrossChain, symbolMap]) => {
this.setState({
Expand All @@ -718,6 +717,16 @@ class CrossChain extends Component {
}).catch((error) => {
console.log('get history error', error);
})
} else {
Promise.all(promises)
.then(([genesisHistory, crosschainHistory]) => {
this.setState({
history: [...crosschainHistory.map((item) => ({ ...item, isCrossChain: true })), ...genesisHistory]
})
}).catch((error) => {
console.log('get history error', error);
})
}
break;
case "tron":
address = (window.tronWeb && window.tronWeb.address.toHex(account[networkType]))
Expand Down

1 comment on commit de8691e

@vercel
Copy link

@vercel vercel bot commented on de8691e Aug 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.