We have some XDC in an inactive wallet that was purchased in 2017. The XDC blockchain is not yet supported by Koinly so we created a custom wallet on Koinly and manually entered the relevant transactions into it. This wallet on the XDC blockchain (and its manually-entered custom equivalent on Koinly) is completely isolated from the rest of our holdings. There are no transfers or communications between it and any of our other holdings.
We also have bought and sold some XDC on the Coinspot exchange in 2021. As mentioned, there are NO transactions connecting those other isolated wallets above to Coinspot (or to anywhere else). All Coinspot transactions were imported by API. When the Coinspot SELL transactions are going through, Koinly is incorrectly using the low-cost-base tranches of XDC from the isolated CUSTOM wallets above as the input XDC units for the sale rather than the XDC units that are located on the exchange.
If I delete the custom XDC wallets, then the cost base calculations for the Coinspot sales correct themselves as the correct tranches (the ones actually located on Coinspot) are then used as the inputs for the sales.
The issue recurs on recreating the older custom XDC wallet on Koinly again. After recreating the older CUSTOM XDC wallet, Koinly misattributes the older tranches from the CUSTOM wallet as the input units again to the ON-EXCHANGE sale happening on Coinspot.
Please advise on next steps to resolve this.