Issue with the deleted orders
Something strange is happening with deleting orders.
I saw in the log, that this order should have been deleted:

I cannot find it:
{
orders (where: {
orderId: 161
}) {
id,
cancelEpoch,
deleteEpoch
}
}

I asked for help in The graph channel, and although Dave tried to help, he didn't find the issue. We'll ask again and try to come up to how to reproduce this in local, but for now, I would like to leave this PR (#30) applied in master, and referencing it to the issue so we have a commit to revert once it's fixed.
Conversation regarding this: https://gnosisinc.slack.com/archives/CGMAENMEH/p1583573568011500
Message describing issue: I’m wondering if you could help me with one problem I’m having indexing dFusion.
https://thegraph.com/explorer/subgraph/gnosis/dfusion-staging?version=pending
As you see the subgraph is failing with Value is not a BigInt. This occurs indexing a delete order event, I’ve tracked down to the evaluation of this order.deleteEpoch == null
Not sure, but from that message, and the point where it fails, it looks like deleteEpoch has something that is not a BigInt and it fails when I try to read it for evaluating this expression.
I made a test where I make sure no-one writes in this nulable field, so I cannot understand why is not indexing, specially why the graph was working for 2 weeks and then it go to this event and failed to do so.
Can you help me find the issue?
This is the point in the code where it breaks: https://github.com/gnosis/dex-subgraph/blob/master/src/mappings/orders.ts#L58