Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
fix(API): diff prod url (.com)
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Jul 17, 2017
1 parent 168a1d9 commit 3a92f1c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class API extends Exchange.API {

_url (endpoint) {
endpoint = endpoint || '';
return `https://${this._production ? '' : 'sandbox.'}unocoin.co/${endpoint}`;
return `https://${this._production ? 'www.' : ''}${this._production ? '' : 'sandbox.'}unocoin.${this._production ? 'com' : 'co'}/${endpoint}`;
}

_request (method, endpoint, data, extraHeaders = {}, authorized) {
Expand Down
6 changes: 3 additions & 3 deletions tests/api_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ describe('Unocoin API', function () {
});

describe('_url', () => {
it('should use unocoin.co in production', () => {
it('should use unocoin.com in production', () => {
api._production = true;
expect(api._url()).toEqual('https://unocoin.co/');
expect(api._url()).toEqual('https://www.unocoin.com/');
});

it('should use sandbox for testing', () => {
Expand All @@ -68,7 +68,7 @@ describe('Unocoin API', function () {

it('should include the endpoint', () => {
api._production = true;
expect(api._url('endpoint')).toEqual('https://unocoin.co/endpoint');
expect(api._url('endpoint')).toEqual('https://www.unocoin.com/endpoint');
});
});

Expand Down

0 comments on commit 3a92f1c

Please sign in to comment.