Kevin-Bronsdijk / kraken-net

Official Kraken.io .Net client
https://kraken.io
GNU General Public License v2.0
19 stars 5 forks source link

Makes logic check both connection sandbox mode and request params for the dev flag #24

Open ZloeSabo opened 4 years ago

ZloeSabo commented 4 years ago

Description

This change allows passing this flag either as a request parameter or specifying the sandbox mode for a connection.

The existing logic was a bit confusing because IRequest allows to specify the dev flag, but the Connection wasn't using it.

Steps to Test or Reproduce

I've checked that both of those send request with the correct dev flag:

            var connection = Connection.Create("your_key", "your_secret");
            var client = new Client(connection);
            var response = client.OptimizeWait("./example.jpg",
                new OptimizeUploadWaitRequest()
                {
                    Lossy = true,
                    Dev = true
                });
            var connection = Connection.Create("your_key", "your_secret", true);
            var client = new Client(connection);
            var response = client.OptimizeWait("./example.jpg",
                new OptimizeUploadWaitRequest()
                {
                    Lossy = true
                });

Todos

Kevin-Bronsdijk commented 4 years ago

Sorry for the delay in my response. I haven't worked on the Kraken client for a while and therefore not able to see the issue in the previous PR. In order to make sure all is working, I will create a new Kraken account today and rerun the integration tests in order to verify the changes.