Skip to content

Commit

Permalink
fixed typo from UpdatePulicKey to UpdatePublicKey (#3121)
Browse files Browse the repository at this point in the history
Co-authored-by: Salim Karim <metasal@gmx.com>
  • Loading branch information
metasal1 and metasal1 authored Mar 3, 2023
1 parent d4203f2 commit 24fa295
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions backend/native/backpack-api/src/routes/v1/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import {
} from "../../db/users";
import { getOrcreateXnftSecret } from "../../db/xnftSecrets";
import { logger } from "../../logger";
import { validatePulicKey } from "../../validation/publicKey";
import { validatePublicKey } from "../../validation/publicKey";
import { validateSignature } from "../../validation/signature";
import {
BlockchainPublicKey,
Expand All @@ -50,8 +50,8 @@ router.get("/", extractUserId, async (req, res) => {
// @ts-ignore
const limit: number = req.query.limit ? parseInt(req.query.limit) : 20;

const isSolPublicKey = validatePulicKey(usernamePrefix, "solana");
const isEthPublicKey = validatePulicKey(usernamePrefix, "ethereum");
const isSolPublicKey = validatePublicKey(usernamePrefix, "solana");
const isEthPublicKey = validatePublicKey(usernamePrefix, "ethereum");

let users;
if (isSolPublicKey) {
Expand Down
2 changes: 1 addition & 1 deletion backend/native/backpack-api/src/validation/publicKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { PublicKey } from "@solana/web3.js";
import type { BlockChain } from "auth/src/onramp/zodTypes";
import { ethers } from "ethers";

export const validatePulicKey = (address: string, chain: BlockChain) => {
export const validatePublicKey = (address: string, chain: BlockChain) => {
if (chain === "solana") {
try {
new PublicKey(address);
Expand Down
4 changes: 2 additions & 2 deletions backend/workers/auth/src/onramp/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Hono } from "hono";
import { updateSession, createSession, getSession } from "./db";
import { BlockChain, CreateSessionRequest } from "./zodTypes";
import { validatePulicKey } from "./validate";
import { validatePublicKey } from "./validate";
import stripe from "stripe";

const STRIPE_PROD_URL = "https://api.stripe.com/v1";
Expand Down Expand Up @@ -44,7 +44,7 @@ export const registerOnRampHandlers = (app: Hono) => {
return c.json({ message: "invalid input" }, 411);
}

if (!validatePulicKey(publicKey, chain)) {
if (!validatePublicKey(publicKey, chain)) {
return c.json({ message: "invalid public key" }, 411);
}
try {
Expand Down
2 changes: 1 addition & 1 deletion backend/workers/auth/src/onramp/validate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ethers } from "ethers";
import { PublicKey } from "@solana/web3.js";
import { BlockChain } from "../zodTypes";

export const validatePulicKey = (address: string, chain: BlockChain) => {
export const validatePublicKey = (address: string, chain: BlockChain) => {
if (chain === "solana") {
try {
new PublicKey(address);
Expand Down

1 comment on commit 24fa295

@vercel
Copy link

@vercel vercel bot commented on 24fa295 Mar 3, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.