Skip to content

Commit b54b834

Browse files
committed
Fix test check.
1 parent a92a472 commit b54b834

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/tests/tokens/nf-token.test.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,9 @@ spec.test('safeTransfer does not call onERC721Received to constructing contract'
405405
contract: 'SendsToSelfOnConstruct',
406406
});
407407

408-
const receipt = sendsToSelfOnConstruct.receipt;
409-
console.log(receipt.events.Received());
410-
ctx.not(receipt.events.Received, undefined); // I want to confirm here that there is only one event (the mint(), and not the safeTransferFrom)
411-
});
408+
const logs = sendsToSelfOnConstruct.receipt.logs;
409+
ctx.is(logs.length, 2); // There need to be 2 logs. First transfer event for creating the token. Second transfer event for sending yourself a token.
410+
// There must not be a Receive event.
411+
ctx.is(logs[0].topics[0], '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // this represents transfer topic hash
412+
ctx.is(logs[1].topics[0], '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'); // this represents transfer topic hash
413+
});

0 commit comments

Comments
 (0)