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

fix: add new objkt contract #443

Merged
merged 3 commits into from
Dec 17, 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
2 changes: 1 addition & 1 deletion src/context/userStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ export const useUserStore = create<UserState>()(
} else if (['OBJKT_ASK', 'OBJKT_ASK_V2'].includes(listing.type)) {
const contract = await Tezos.wallet.at(listing.contract_address)
batch = contract.methods.fulfill_ask(listing.ask_id)
} else if (['OBJKT_ASK_V3', 'OBJKT_ASK_V3_PRE'].includes(listing.type)) {
} else if (['OBJKT_ASK_V3', 'OBJKT_ASK_V3_PRE', 'OBJKT_ASK_V3_2'].includes(listing.type)) {
const contract = await Tezos.wallet.at(listing.contract_address)
batch = contract.methods.fulfill_ask(listing.ask_id, 1, null, null, MichelsonMap.fromLiteral({}))
} else if (['VERSUM_SWAP'].includes(listing.type)) {
Expand Down
2 changes: 1 addition & 1 deletion src/data/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ query objkt($id: String!) {
tags {
tag
}
events(where: { _or: [{ implements: {_eq: "SALE"} }, { type: {_in: ["HEN_MINT", "TEIA_SWAP", "HEN_SWAP", "HEN_SWAP_V2", "VERSUM_SWAP", "FA2_TRANSFER", "OBJKT_ASK", "OBJKT_ASK_V2", "OBJKT_ASK_V3", "OBJKT_ASK_V3_PRE"]} }]}, order_by: [{level: desc}, {opid: desc}]) {
events(where: { _or: [{ implements: {_eq: "SALE"} }, { type: {_in: ["HEN_MINT", "TEIA_SWAP", "HEN_SWAP", "HEN_SWAP_V2", "VERSUM_SWAP", "FA2_TRANSFER", "OBJKT_ASK", "OBJKT_ASK_V2", "OBJKT_ASK_V3", "OBJKT_ASK_V3_PRE", "OBJKT_ASK_V3_2"]} }]}, order_by: [{level: desc}, {opid: desc}]) {
timestamp
implements
ophash
Expand Down
5 changes: 4 additions & 1 deletion src/pages/objkt-display/tabs/History.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function UsernameAndLink({ event, attr }) {
<>
{get(event, `${attr}_profile.name`) ? (
<span>
<Button href={`/${encodeURIComponent(get(event, `${attr}_profile.name`))}`}>
<Button
href={`/${encodeURIComponent(get(event, `${attr}_profile.name`))}`}
>
{get(event, `${attr}_profile.name`)}
</Button>
</span>
Expand Down Expand Up @@ -149,6 +151,7 @@ export const History = () => {
'OBJKT_ASK_V2',
'OBJKT_ASK_V3',
'OBJKT_ASK_V3_PRE',
'OBJKT_ASK_V3_2',
'TEIA_SWAP',
'HEN_SWAP',
'HEN_SWAP_V2',
Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export type ListingType =
| 'OBJKT_ASK_V2'
| 'OBJKT_ASK_V3'
| 'OBJKT_ASK_V3_PRE'
| 'OBJKT_ASK_V3_2'
| 'VERSUM_SWAP'
export type MetadataAccessibility = {
/** resource that is physiologically dangerous to some users.*/
Expand Down
Loading