Feat/new let svg image#116
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 732cf75576
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| issuerAddress: contractAddress, | ||
| ownerAddress: owner.ownerAddress, | ||
| consideration: details.investmentAmountUSD, | ||
| blockNumber: block.number, |
There was a problem hiding this comment.
Stop using the current block in tokenURI metadata
For any certificate whose issue timestamp is otherwise stable, tokenURI() now changes on every block because the SVG embeds the block number from the read call rather than a stored issuance/signing block. That makes the base64 JSON/image churn over time and displays the viewer's query block as if it were the certificate's authorization block, which will confuse indexers and cached marketplace metadata.
Useful? React with 👍 / 👎.
| issueDate: data.issueDate, | ||
| isPartlyPaid: data.isPartlyPaid, | ||
| amountPaid: data.amountPaid, | ||
| totalConsideration: 0, |
There was a problem hiding this comment.
Preserve total consideration for partly paid shares
When ShareCertificateData.isPartlyPaid is true, this conversion always sets totalConsideration to zero, and _getPaymentPercentage treats zero total consideration as fully paid. As a result every partly-paid share certificate emits "paymentPercentage": "10000" regardless of amountPaid (for example a half-paid certificate), so the share metadata is materially wrong unless the actual consideration is carried into this calculation.
Useful? React with 👍 / 👎.
No description provided.