@zoralabs/nft-hooks
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -62,2 +62,4 @@ "use strict"; | ||
let amount = {}; | ||
let sender = tokenEvent.properties.address; | ||
tokenEvent.properties.properties; | ||
switch (tokenEvent.properties.v2AuctionEventType) { | ||
@@ -93,2 +95,28 @@ case queries_sdk_1.V2AuctionEventType.V2AuctionCreated: | ||
} | ||
const eventProperties = tokenEvent.properties.properties; | ||
switch (eventProperties.__typename) { | ||
case 'V2AuctionApprovalUpdatedEventProperties': | ||
sender = tokenEvent.properties.collectionAddress; | ||
break; | ||
case 'V2AuctionBidEventProperties': | ||
sender = eventProperties.sender; | ||
amount = (0, extractPrice_1.extractPrice)(tokenEvent); | ||
break; | ||
case 'V2AuctionApprovalUpdatedEventProperties': | ||
if (eventProperties.approved === false) { | ||
return; | ||
} | ||
break; | ||
case 'V2AuctionCreatedEventProperties': | ||
sender = eventProperties.tokenOwner; | ||
amount = (0, extractPrice_1.extractPrice)(tokenEvent); | ||
break; | ||
case 'V2AuctionEndedEventProperties': | ||
sender = eventProperties.winner; | ||
amount = (0, extractPrice_1.extractPrice)(tokenEvent); | ||
break; | ||
case 'V2AuctionReservePriceUpdatedEventProperties': | ||
sender = tokenEvent.collectionAddress; | ||
break; | ||
} | ||
if (!event) { | ||
@@ -101,4 +129,4 @@ return; | ||
event: event, | ||
sender: tokenEvent.properties.address, | ||
marketAddress: tokenEvent.properties.collectionAddress, | ||
sender: sender, | ||
marketAddress: tokenEvent.properties.address, | ||
eventType: types_1.TOKEN_TRANSFER_EVENT_CONTEXT_TYPES.TOKEN_MARKET_EVENT, | ||
@@ -105,0 +133,0 @@ blockInfo: { |
{ | ||
"name": "@zoralabs/nft-hooks", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Generic react hooks for fetching zora auctions, nfts, and data on arbitary 721s. Powers nft-components.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/ourzora/nft-hooks", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
957239
21683