Skip to content

Commit

Permalink
Merge pull request #34 from permaweb/jfrain99/absolute-path
Browse files Browse the repository at this point in the history
fix(specs): make spec upload dal fixed
  • Loading branch information
jfrain99 authored Oct 22, 2024
2 parents d4ab8c6 + 4e2de66 commit 3d6d02c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
4 changes: 3 additions & 1 deletion src/components/item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ const Asset = ({
onClick
}: AssetProps) => {

// TODO: timestamps for old vs new are different - fix
const timestamp = typeof Timestamp === 'string' && +Timestamp > 2000000000 ? Math.floor(Number(Timestamp) / 1000) : Math.floor(Number(Timestamp))
const date =
typeof Timestamp === 'string' && +Timestamp > 0
? format(fromUnixTime(Math.floor(Number(Timestamp))), 'M/d/yyyy')
? format(fromUnixTime(timestamp), 'M/d/yyyy')
: 'pending'
return (
<div className="pt-4 border-b-2 border-black-500 hover:bg-gray-100" onClick={onClick}>
Expand Down
2 changes: 1 addition & 1 deletion src/dal/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const uploadSchema = z
.args(
z.object({
data: z.string(),
tags: z.array(z.object({ name: z.string(), value: z.string() }))
tags: z.array(z.object({ name: z.string(), value: z.union([z.string(), z.array(z.string())]) }))
})
)
.returns(z.promise(z.string()))
Expand Down
9 changes: 0 additions & 9 deletions src/lib/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,6 @@ export default {
const stamp = fromPromise(stampSchema.implement(services.stamp))
const stampCounts = fromPromise(stampCountsSchema.implement(services.stampCounts))

// const stamp = fromPromise(services.stamp)

const isVouched = (addr) =>
fromPromise(isVouchedSchema.implement(services.isVouched))(addr).chain((res) =>
res
? Resolved(addr)
: Rejected(new Error("MUST be vouched!")),
)

return {
save: (md: string) =>
of(md)
Expand Down
1 change: 1 addition & 0 deletions src/services/ao.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const upload = async (md: {
data: md.data,
signer: createDataItemSigner(window.arweaveWallet)
}

const result = await message(args)

return result
Expand Down

0 comments on commit 3d6d02c

Please sign in to comment.