diff --git a/src/flows/register/register.ts b/src/flows/register/register.ts index 8b2c3941..d859d92b 100644 --- a/src/flows/register/register.ts +++ b/src/flows/register/register.ts @@ -1,8 +1,8 @@ import Entropy from "@entropyxyz/sdk"; -import { RegsiterParams } from "./types"; +import { RegisterParams } from "./types"; import { print } from "src/common/utils"; -export async function register (entropy: Entropy, params?: RegsiterParams): Promise { +export async function register (entropy: Entropy, params?: RegisterParams): Promise { let verifyingKey: string try { const registerParams = params?.programModAddress && params?.programData ? { programDeployer: params.programModAddress, programData: params.programData } : undefined diff --git a/src/flows/register/types.ts b/src/flows/register/types.ts index df77d563..1a1dc573 100644 --- a/src/flows/register/types.ts +++ b/src/flows/register/types.ts @@ -1,4 +1,4 @@ -export interface RegsiterParams { +export interface RegisterParams { programModAddress?: string // TODO: Export ProgramInstance type from sdk programData?: any diff --git a/tests/register.test.ts b/tests/register.test.ts index bbd21618..0f16622b 100644 --- a/tests/register.test.ts +++ b/tests/register.test.ts @@ -13,7 +13,7 @@ test('Regsiter - Default Program', async (t) => { const fullAccount = entropy.keyring.getAccount() - t.equal(verifyingKey, fullAccount.registration.verifyingKeys[0], 'verifying key matches key added to regsitration account') + t.equal(verifyingKey, fullAccount.registration.verifyingKeys[0], 'verifying key matches key added to registration account') t.end() }) @@ -29,16 +29,16 @@ test('Register - Barebones Program', async t => { ) const verifyingKey = await run( - 'register', - entropy.register({ - programDeployer: entropy.keyring.accounts.registration.address, + 'register - using custom params', + register(entropy, { + programModAddress: entropy.keyring.accounts.registration.address, programData: [{ program_pointer: pointer, program_config: '0x' }], }) ) const fullAccount = entropy.keyring.getAccount() - t.equal(verifyingKey, fullAccount.registration.verifyingKeys[1], 'verifying key matches key added to regsitration account') + t.equal(verifyingKey, fullAccount.registration.verifyingKeys[1], 'verifying key matches key added to registration account') t.end() })