diff --git a/screen/wallets/hodlHodlMyContracts.js b/screen/wallets/hodlHodlMyContracts.js index e6efafe1e..2cdda0249 100644 --- a/screen/wallets/hodlHodlMyContracts.js +++ b/screen/wallets/hodlHodlMyContracts.js @@ -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 }); }