Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fmt and add pkg #3230

Merged
merged 2 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ evm/contracts/proto/** linguist-generated
*.lockb binary diff=lockb
*.zip filter=lfs diff=lfs merge=lfs -text
site/public/union-logo.zip filter=lfs diff=lfs merge=lfs -text
biome.json linguist-language=JSON-with-Comments
2 changes: 1 addition & 1 deletion app/src/lib/queries/balance/evm/multicall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export async function erc20ReadMulticall({
(accumulator, { result }, index) => {
if (index % functionNames.length === 0) accumulator.push({})

const currentResult = accumulator[accumulator.length - 1]
const currentResult = accumulator.at(-1)
const fn = functionNames[index % functionNames.length]
currentResult[fn === "balanceOf" ? "balance" : fn] = result ?? (fn === "decimals" ? 0 : "")
return accumulator
Expand Down
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@
"noSecrets": "off",
"noProcessEnv": "off",
"useStrictMode": "off",
"useExplicitType": "off",
"noNestedTernary": "off",
"noExportedImports": "off",
"useImportRestrictions": "off",
Expand Down
2 changes: 1 addition & 1 deletion ceremony/src/lib/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@ export function formatWaitTime(minutes: number) {
return parts[0]
}

return `${parts.slice(0, -1).join(", ")} and ${parts[parts.length - 1]}`
return `${parts.slice(0, -1).join(", ")} and ${parts.at(-1)}`
}
1 change: 1 addition & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -508,6 +508,7 @@ deferredacktypes
defi
delegators
dels
deno
denoms
denum
depinject
Expand Down
5 changes: 3 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -494,10 +494,11 @@
yq
])
++ (with jsPkgs; [
bun # for running TypeScript files on the fly
bun
deno
emmet-language-server
nodePackages.graphqurl
nodePackages_latest.nodejs
nodePackages_latest.graphqurl
nodePackages_latest.svelte-language-server
nodePackages_latest."@astrojs/language-server"
nodePackages_latest."@tailwindcss/language-server"
Expand Down
12 changes: 7 additions & 5 deletions site/src/lib/contentful/live-preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,13 @@ export function setupLivePreview({
}) {
const callback = (updatedData: any) => {
const domElement = findElementByDataAttribute({ entryId, fieldId })
if (domElement && updatedData.fields && updatedData.fields[fieldId]) {
// Check if the content is text
if (typeof updatedData.fields[fieldId] === "string") {
domElement.textContent = updatedData.fields[fieldId]
}
if (
domElement &&
updatedData.fields &&
updatedData.fields[fieldId] &&
typeof updatedData.fields[fieldId] === "string"
) {
domElement.textContent = updatedData.fields[fieldId]
}
}
const unsubscribe = ContentfulLivePreview.subscribe({
Expand Down