-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(app): working balances queries on start page
- Loading branch information
Showing
7 changed files
with
239 additions
and
143 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
import { string, regex, object, type Input } from "valibot" | ||
import { string, regex, object, pipe, type InferOutput } from "valibot" | ||
|
||
export const unionAddressRegex = /^union[a-z0-9]{39}$/ | ||
|
||
export const faucetFormSchema = object({ | ||
address: string([regex(unionAddressRegex, "Invalid Union address")]) | ||
address: pipe(string(), regex(unionAddressRegex, "Invalid Union address")) | ||
}) | ||
|
||
export type FaucetSchema = typeof faucetFormSchema | ||
export type FaucetForm = Input<typeof faucetFormSchema> | ||
export type FaucetForm = InferOutput<typeof faucetFormSchema> | ||
|
||
export type Message = { status: "error" | "success" | "warning"; text: string } | ||
|
||
|