Skip to content

Commit

Permalink
update: del code
Browse files Browse the repository at this point in the history
  • Loading branch information
TiyoSheng committed Oct 31, 2023
1 parent a23b7b5 commit b5b962e
Show file tree
Hide file tree
Showing 5 changed files with 4,555 additions and 4,558 deletions.
9 changes: 3 additions & 6 deletions packages/client/src/pages/home/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,17 @@ const Home = () => {
try {
let res = await pluginContract.multMint()
await res.wait()
let tid = await userContract.userList(0)
console.log(tid, 'res')
let blockNumber = await network.publicClient.getBlockNumber()
let interval = setInterval(async () => {
let currentBlockNumber = await network.publicClient.getBlockNumber()
if (currentBlockNumber - blockNumber > 2) {
if (currentBlockNumber - blockNumber >= 2) {
clearInterval(interval)
let tokenIds = await Promise.all([userContract.getUserTokenIdList(), lootContract.getUserTokenIdList()])
userTokenIds = tokenIds[0]
lootTokenIds = tokenIds[1]
console.log(userTokenIds, lootTokenIds, 'userTokenIds, lootTokenIds')
await pluginContract.multRevealNFT(lootTokenIds[lootTokenIds.length - 1].toString(), userTokenIds[userTokenIds.length - 1].toString())
let revealres = await pluginContract.multRevealNFT(lootTokenIds[lootTokenIds.length - 1].toString(), userTokenIds[userTokenIds.length - 1].toString())
await revealres.wait()
resolve('success')
}
}, 1000)
Expand Down Expand Up @@ -189,10 +188,8 @@ const Home = () => {
let userTokenId = userTokenIds[userTokenIds.length - 1].toString()
let lootTokenId = lootTokenIds[lootTokenIds.length - 1].toString()

console.log(userTokenId, lootTokenId, 'userTokenId, lootTokenId', userTokenIds, lootTokenIds)

let urls = await Promise.all([userContract.tokenURI(userTokenId), lootContract.tokenURI(lootTokenId)])
console.log(urls, 'urls')
let url = urls[0]
let lootUrl = urls[1]

Expand Down
5,084 changes: 2,542 additions & 2,542 deletions packages/contracts/out/Loot.sol/MLoot.json

Large diffs are not rendered by default.

Loading

0 comments on commit b5b962e

Please sign in to comment.