fix anchoring proof document dynamic data (#105)
This commit is contained in:
commit
7a7dbecc6e
@ -53,7 +53,7 @@ export default class AnchoringProofService extends BaseService {
|
|||||||
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="12" letter-spacing="0.5px"><tspan x="333" y="187.364">[[ANCHORING_TIME]]</tspan></text>
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="12" letter-spacing="0.5px"><tspan x="333" y="187.364">[[ANCHORING_TIME]]</tspan></text>
|
||||||
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="21" font-weight="600" letter-spacing="0em"><tspan x="258" y="163.136">Certificat de dépôt international</tspan></text>
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="21" font-weight="600" letter-spacing="0em"><tspan x="258" y="163.136">Certificat de dépôt international</tspan></text>
|
||||||
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="262">Hash :</tspan></text>
|
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="262">Hash :</tspan></text>
|
||||||
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px"><tspan x="267" y="261.5">b834ce9229ee2c2283c837685772a473</tspan></text>
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px"><tspan x="267" y="261.5">[[ROOT_HASH]]</tspan></text>
|
||||||
<path d="M119 290H723" stroke="#E7E7E7"/>
|
<path d="M119 290H723" stroke="#E7E7E7"/>
|
||||||
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="14" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="327.091">Déposant(s)</tspan></text>
|
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="14" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="327.091">Déposant(s)</tspan></text>
|
||||||
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="356">Auteur :</tspan></text>
|
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="356">Auteur :</tspan></text>
|
||||||
@ -62,7 +62,7 @@ export default class AnchoringProofService extends BaseService {
|
|||||||
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px"><tspan x="267" y="377.5">Smart-Chain</tspan></text>
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px"><tspan x="267" y="377.5">Smart-Chain</tspan></text>
|
||||||
<path d="M119 406H723" stroke="#E7E7E7"/>
|
<path d="M119 406H723" stroke="#E7E7E7"/>
|
||||||
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="14" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="443.091">Explorateur blockchain</tspan></text>
|
<text fill="#320756" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="14" font-weight="600" letter-spacing="0.5px"><tspan x="119" y="443.091">Explorateur blockchain</tspan></text>
|
||||||
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px" text-decoration="underline"><tspan x="119" y="472"><a href="https://tzstats.com/opYWLHH96gbV8HPajRqmoRx3UBVbr6iXz43kuHqm8ey4LLPWqeC">https://tzstats.com/opYWLHH96gbV8HPajRqmoRx3UBVbr6iXz43kuHqm8ey4LLPWqeC</a></tspan></text>
|
<text fill="black" xml:space="preserve" style="white-space: pre" font-family="Inter" font-size="11" letter-spacing="0.5px" text-decoration="underline"><tspan x="119" y="472"><a href="[[TX_LINK]]">[[TX_LINK]]</a></tspan></text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
`;
|
`;
|
||||||
@ -85,7 +85,10 @@ export default class AnchoringProofService extends BaseService {
|
|||||||
</html>
|
</html>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
htmlContent = htmlContent.replace("[[ANCHORING_TIME]]", data.anchoringTime);
|
htmlContent = htmlContent
|
||||||
|
.replace("[[ROOT_HASH]]", data.rootHash)
|
||||||
|
.replace("[[ANCHORING_TIME]]", data.anchoringTime)
|
||||||
|
.replace(/\[\[TX_LINK\]\]/g, data.txLink);
|
||||||
|
|
||||||
await page.setContent(htmlContent);
|
await page.setContent(htmlContent);
|
||||||
await page.addStyleTag({
|
await page.addStyleTag({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user