|
|
@ -194,13 +194,16 @@ class Scrape extends Collection {
|
|
|
|
let rl = logDescription.args.offer.filter((l) => l.token.toLowerCase() === this.contractAddress.toLowerCase());
|
|
|
|
let rl = logDescription.args.offer.filter((l) => l.token.toLowerCase() === this.contractAddress.toLowerCase());
|
|
|
|
if (rl.length > 0) tokenId = rl[0].identifier.toString();
|
|
|
|
if (rl.length > 0) tokenId = rl[0].identifier.toString();
|
|
|
|
} else if (logDescription.args.offer[0].token.toLowerCase() == WETH_ADDRESS.toLowerCase()) {
|
|
|
|
} else if (logDescription.args.offer[0].token.toLowerCase() == WETH_ADDRESS.toLowerCase()) {
|
|
|
|
// seller has accepted buyer bid
|
|
|
|
// seller has accepted buyer bid (uses WETH)
|
|
|
|
sale = true;
|
|
|
|
// filter down only sales on the contract
|
|
|
|
toAddress = logDescription.args.offerer.toLowerCase();
|
|
|
|
|
|
|
|
fromAddress = logDescription.args.recipient.toLowerCase();
|
|
|
|
|
|
|
|
amountWei = BigNumber.from(logDescription.args.offer[0].amount).toString();
|
|
|
|
|
|
|
|
const _c = logDescription.args.consideration.filter((c) => c.token.toLowerCase() === this.contractAddress.toLowerCase());
|
|
|
|
const _c = logDescription.args.consideration.filter((c) => c.token.toLowerCase() === this.contractAddress.toLowerCase());
|
|
|
|
tokenId = _c[0].identifier.toString();
|
|
|
|
_c.map((o) => {
|
|
|
|
|
|
|
|
sale = true;
|
|
|
|
|
|
|
|
toAddress = logDescription.args.offerer.toLowerCase();
|
|
|
|
|
|
|
|
fromAddress = logDescription.args.recipient.toLowerCase();
|
|
|
|
|
|
|
|
amountWei = BigNumber.from(logDescription.args.offer[0].amount).toString();
|
|
|
|
|
|
|
|
tokenId = _c[0].identifier.toString();
|
|
|
|
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// unknown condition
|
|
|
|
// unknown condition
|
|
|
|
}
|
|
|
|
}
|
|
|
|