mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2025-02-24 15:36:59 +01:00
Merge pull request #2047 from BlueWallet/sort-hodlhodl-my-contracts
FIX: hodlhodl - my contracts - sorted by creation time (closes #2037)
This commit is contained in:
commit
a27fe63dc6
1 changed files with 3 additions and 1 deletions
|
@ -112,7 +112,7 @@ export default class HodlHodlMyContracts extends Component {
|
|||
});
|
||||
|
||||
const hodlApi = this.state.hodlApi;
|
||||
const contracts = [];
|
||||
let contracts = [];
|
||||
let contractToDisplay = this.state.contractToDisplay;
|
||||
|
||||
const contractIds = await this.context.getHodlHodlContracts();
|
||||
|
@ -151,6 +151,8 @@ export default class HodlHodlMyContracts extends Component {
|
|||
}
|
||||
}
|
||||
|
||||
contracts = contracts.sort((a, b) => (a.created_at >= b.created_at ? -1 : 1)); // new contracts on top
|
||||
|
||||
this.setState({ hodlApi: hodlApi, contracts, contractToDisplay, isLoading: false });
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue