diff --git a/js/tests/registration.test.ts b/js/tests/registration.test.ts index c9150092..f2eb7e84 100644 --- a/js/tests/registration.test.ts +++ b/js/tests/registration.test.ts @@ -1,11 +1,10 @@ require("dotenv").config(); import { test, jest } from "@jest/globals"; import { Connection, PublicKey, Transaction } from "@solana/web3.js"; -import { registerDomainName } from "../src/bindings/registerDomainName"; import { registerDomainNameV2 } from "../src/bindings/registerDomainNameV2"; import { registerWithNft } from "../src/bindings/registerWithNft"; import { randomBytes } from "crypto"; -import { REFERRERS, USDC_MINT } from "../src/constants"; +import { REFERRERS } from "../src/constants"; import { getAssociatedTokenAddressSync } from "@solana/spl-token"; import { getDomainKeySync } from "../src/utils/getDomainKeySync"; import { getReverseKeySync } from "../src/utils/getReverseKeySync"; @@ -21,43 +20,6 @@ const VAULT_OWNER = new PublicKey( "5D2zKog251d6KPCyFyLMt3KroWwXXPWSgTPyhV22K2gR", ); -test("Registration", async () => { - const tx = new Transaction(); - const ix = await registerDomainName( - connection, - randomBytes(10).toString("hex"), - 1_000, - VAULT_OWNER, - getAssociatedTokenAddressSync(USDC_MINT, VAULT_OWNER, true), - USDC_MINT, - ); - tx.add(...ix); - const { blockhash } = await connection.getLatestBlockhash(); - tx.recentBlockhash = blockhash; - tx.feePayer = VAULT_OWNER; - const res = await connection.simulateTransaction(tx); - expect(res.value.err).toBe(null); -}); - -test("Registration with ref", async () => { - const tx = new Transaction(); - const ix = await registerDomainName( - connection, - randomBytes(10).toString("hex"), - 1_000, - VAULT_OWNER, - getAssociatedTokenAddressSync(FIDA_MINT, VAULT_OWNER, true), - FIDA_MINT, - REFERRERS[1], - ); - tx.add(...ix); - const { blockhash } = await connection.getLatestBlockhash(); - tx.recentBlockhash = blockhash; - tx.feePayer = VAULT_OWNER; - const res = await connection.simulateTransaction(tx); - expect(res.value.err).toBe(null); -}); - test("Register with NFT", async () => { const tx = new Transaction(); const domain = randomBytes(10).toString("hex"); @@ -93,7 +55,7 @@ test("Register with NFT", async () => { test("Indempotent ATA creation ref", async () => { const tx = new Transaction(); for (let i = 0; i < 3; i++) { - const ix = await registerDomainName( + const ix = await registerDomainNameV2( connection, randomBytes(10).toString("hex"), 1_000,