Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update API paths to use API domain #107

Merged
merged 2 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/lookups.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import logger from 'winston'
export async function isSubdomainRegistered(fullyQualifiedAddress: String) {

try {
const nameInfoUrl = bskConfig.network.coreApiUrl + '/v1/names/' + fullyQualifiedAddress
const nameInfoUrl = bskConfig.network.blockstackAPIUrl + '/v1/names/' + fullyQualifiedAddress
const nameInfoRequest = await fetch(nameInfoUrl)
const { status } = nameInfoRequest
if (status == 200) {
Expand Down
4 changes: 2 additions & 2 deletions src/operations.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ export async function submitUpdate(
throw new Error('Invalid domain name')
}

const nameInfoUrl = bskConfig.network.coreApiUrl + '/v1/names/' + domainName
const nameInfoUrl = bskConfig.network.blockstackAPIUrl + '/v1/names/' + domainName
const nameInfoRequest = await fetch(nameInfoUrl)
const nameInfo = await nameInfoRequest.json()

Expand Down Expand Up @@ -267,7 +267,7 @@ export async function checkTransactions(
if (!tx.blockHeight || tx.blockHeight <= 0) {
// const txInfo = await bskConfig.network.getTransactionInfo(tx.txHash)
const url = new URL(
bskConfig.network.coreApiUrl + `/extended/v1/tx/0x${tx.txHash}`
bskConfig.network.blockstackAPIUrl + `/extended/v1/tx/0x${tx.txHash}`
);
const httpRequest = await fetch(url);
const reqText = await httpRequest.text();
Expand Down
Loading