Skip to content

Commit c81f55f

Browse files
authored
Merge pull request #411 from TokenScript/web-examples
switched npm package polyfill for bigint to big-integer, updated Sign…
2 parents 09ed5c0 + fce6c9b commit c81f55f

File tree

5 files changed

+80
-12965
lines changed

5 files changed

+80
-12965
lines changed

examples/sites/devcon-issuer/react/package-lock.json

Lines changed: 74 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/sites/devcon-issuer/react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"@testing-library/react": "^11.1.0",
99
"@testing-library/user-event": "^12.1.10",
1010
"asn1js": "^2.0.26",
11+
"big-integer": "^1.6.48",
1112
"bigint-polyfill": "^0.1.0",
1213
"isevn": "^2.0.2",
1314
"react": "^17.0.1",

examples/sites/devcon-issuer/react/src/Attestation/SignedDevonTicket.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
import { getParametersValue, clearProps, bufferToHexCodes } from "pvutils";
1010
import AlgorithmIdentifier from "./AlgorithmIdentifier.js";
1111
import PublicKeyInfo from "./PublicKeyInfo.js";
12-
import BigInt from "bigint-polyfill";
12+
import BigInt from "big-integer";
1313

1414
export class DevconTicket {
1515
//**********************************************************************************
@@ -89,17 +89,17 @@ export class DevconTicket {
8989

9090
if ("devconId" in asn1.result) {
9191
const devconId = asn1.result["devconId"].valueBlock._valueHex;
92-
this.devconId = new BigInt("0x" + bufferToHexCodes(devconId));
92+
this.devconId = new BigInt("0x" + bufferToHexCodes(devconId)).value;
9393
}
9494

9595
if ("ticketId" in asn1.result) {
9696
const ticketId = asn1.result["ticketId"].valueBlock._valueHex
97-
this.ticketId = new BigInt("0x" + bufferToHexCodes(ticketId));
97+
this.ticketId = new BigInt("0x" + bufferToHexCodes(ticketId)).value;
9898
}
9999

100100
if ("ticketClass" in asn1.result) {
101101
const ticketClass = asn1.result["ticketClass"].valueBlock._valueHex;
102-
this.ticketClass = new BigInt("0x" + bufferToHexCodes(ticketClass));
102+
this.ticketClass = new BigInt("0x" + bufferToHexCodes(ticketClass)).value;
103103
}
104104

105105
//endregion

examples/sites/devcon-issuer/react/src/TokenScript/Negotiator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,6 @@ export class Negotiator {
100100
}
101101

102102
// Return tickets for web
103-
return tickets.web ? tickets.web : [];
103+
return tickets.web;
104104
}
105105
}

0 commit comments

Comments
 (0)