Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
nialexsan committed Dec 17, 2024
1 parent afba192 commit ad18b17
Show file tree
Hide file tree
Showing 5 changed files with 431 additions and 145 deletions.
4 changes: 2 additions & 2 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = function (api) {
const removeDataTestAttributes =
api.env("production") && !process.env.PRESERVE_DATA_TEST_ATTRIBUTES

const presets = [
const presets = [[
"next/babel",
{
"preset-react": {
Expand All @@ -13,7 +13,7 @@ module.exports = function (api) {
throwIfNamespace: false,
},
},
]
]]
const plugins = removeDataTestAttributes
? [["react-remove-properties", {properties: ["data-test"]}]]
: []
Expand Down
3 changes: 2 additions & 1 deletion lib/flow/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import publicConfig from "../publicConfig"
fcl.config().put("accessNode.api", publicConfig.accessAPIHost)

export const getAuthorization = (keyIndex: number) => {
return async (account: {addr?: string} = {}) => {
return (account: {addr?: string} = {}) => {
return {
...account,
sequenceNum: 0,
tempId: `${account.addr}-${keyIndex}`,
addr: fcl.sansPrefix(publicConfig.signerAddress) || "",
keyId: keyIndex,
Expand Down
10 changes: 0 additions & 10 deletions lib/validate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ import {
import {Link} from "theme-ui"
import * as yup from "yup"

const captchaSchemaShape = {
"h-captcha-response": yup.string().when("$apiKey", {
is: (val: string) => !val || val.length === 0,
then: yup.string().required(),
otherwise: yup.string(),
}),
}

const createAccountSchemaClientShape = {
publicKey: yup
.string()
Expand All @@ -40,7 +32,6 @@ const createAccountSchemaClientShape = {

const createAccountSchemaServerShape = {
...createAccountSchemaClientShape,
...captchaSchemaShape,
}

export const createAccountSchemaClient = yup
Expand Down Expand Up @@ -71,7 +62,6 @@ const fundAccountSchemaClientShape = {

const fundAccountSchemaServerShape = {
...fundAccountSchemaClientShape,
...captchaSchemaShape,
}

export const fundAccountSchemaClient = yup
Expand Down
Loading

0 comments on commit ad18b17

Please sign in to comment.