anchor verified build uses apr.dev (#26655)
Co-authored-by: Arrowana <8245419+Arrowana@users.noreply.github.com>
This commit is contained in:
parent
00ce805788
commit
ac915776c3
|
@ -74,10 +74,10 @@ export interface AnchorBuild {
|
||||||
* last verified build.
|
* last verified build.
|
||||||
*/
|
*/
|
||||||
export async function getAnchorVerifiableBuild(
|
export async function getAnchorVerifiableBuild(
|
||||||
programId: PublicKey,
|
programId: PublicKey
|
||||||
limit: number = 5
|
|
||||||
): Promise<VerifiableBuild> {
|
): Promise<VerifiableBuild> {
|
||||||
const url = `https://anchor.projectserum.com/api/v0/program/${programId.toString()}/latest?limit=${limit}`;
|
const programIdBase58 = programId.toBase58();
|
||||||
|
const url = `https://api.apr.dev/api/v0/program/${programIdBase58}/latest?limit=5`;
|
||||||
const latestBuildsResp = await fetch(url);
|
const latestBuildsResp = await fetch(url);
|
||||||
|
|
||||||
// Filter out all non successful builds.
|
// Filter out all non successful builds.
|
||||||
|
@ -96,7 +96,7 @@ export async function getAnchorVerifiableBuild(
|
||||||
...defaultAnchorBuild,
|
...defaultAnchorBuild,
|
||||||
verified_slot,
|
verified_slot,
|
||||||
id,
|
id,
|
||||||
url: `https://anchor.projectserum.com/build/${id}`,
|
url: `https://apr.dev/program/${programIdBase58}/build/${id}`,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue