Question about the "Wallet based cost tracking" method

I purchase 1 btc for 1K per btc on wallet A in 2015
I purchase 1 btc for 10K per btc on wallet A in 2016
I purchase 1 btc for 20K per btc on wallet A in 2017

I transfer 1 btc for 10K per btc to wallet Z
I transfer 1 btc for 20K per btc to wallet Z

If I sell 1.5 btc on wallet Z for USD, will Koinly use the cost basis of $10K for the 1 btc and $20K for the .5 btc?

I purchase 1 btc for 1K per btc on wallet A in 2015
I purchase 1 btc for 10K per btc on wallet A in 2016
I purchase 1 btc for 20K per btc on wallet A in 2017

I transfer 1 btc to wallet Z but tag it with the cost basis of $20K.
Next, I transfer 1 btc to wallet Z with cost basis of $1K per btc.

My question is, will Koinly use cost basis of the btc in the order I tagged the transfers or will it follow the earlier purchase date?
If I sell 1BTC on wallet Z, will Koinly calculate tax as if I sold the $20K btc first, even though the $1K btc was purchased on a earlier date?