Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Commit

Permalink
minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
davincci9412-zz committed Apr 13, 2022
1 parent 8922653 commit 926578c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/lib/changenow-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ class ChangeAPIWorker {
}

async getMarketInfo() {
const url = `${this.API_URL}market-info/fixed-rate/${keys.CHANGENOW_TOKEN}`;
const url = `${this.API_URL}market-info/fixed-rate/${keys.CHANGENOW_API_KEY}`;

const [serverError, temp] = await Utils.to(
axios.get(url)
);
Expand All @@ -44,7 +45,7 @@ class ChangeAPIWorker {
url: url,
headers: {
'Content-Type': 'application/json',
'x-api-key': keys.CHANGENOW_API_KEY
'x-api-key': keys.SWAPZONE_API_KEY
}
};
const [serverError, temp] = await Utils.to(
Expand All @@ -63,7 +64,7 @@ class ChangeAPIWorker {
url: url,
headers: {
'Content-Type': 'application/json',
'Authorization': this.AUTHORIZATION
'Authorization': keys.EXOLIX_AUTHORIZATION
}
};
const [serverError, temp] = await Utils.to(
Expand All @@ -76,7 +77,7 @@ class ChangeAPIWorker {

return { error: null, response };
} else {
url = `${this.API_URL}transactions/${orderId}/${keys.CHANGENOW_TOKEN}`;
url = `${this.API_URL}transactions/${orderId}/${keys.CHANGENOW_API_KEY}`;
config = {
method: 'get',
url: url,
Expand All @@ -97,7 +98,7 @@ class ChangeAPIWorker {
}

async postOrder({ from, to, address, amount, extraId, refundAddress, refundExtraId, userId, payload, contactEmail }) {
const url = `${this.API_URL}transactions/fixed-rate//${keys.CHANGENOW_TOKEN}`;
const url = `${this.API_URL}transactions/fixed-rate//${keys.CHANGENOW_API_KEY}`;

const body = {
from,
Expand Down

0 comments on commit 926578c

Please sign in to comment.